5 ms·
GPUs don't respect CPU memory protection -- they can write to any region of mapped memory. If you happen to have some of your program code living there you can
by maximilianburke 15y ago
GPUs don't respect CPU memory protection -- they can write to any region of mapped memory. If you happen to have some of your program code living there you can "draw" over it with replacement code.
- recoiledsnake 15y agoWhat you wrote doesn't make any sense whatsoever, you seem to imply that there is an inherent problem by design with this, but there is no such thing. There are possible bugs etc. that could lead to arbitrary code execution by exploiting as-yet-not-found holes in current drivers. But saying that you can draw over program code would allow even browser content to overwrite program code, especially in these days of GPU accelerated browsers.
- daeken 15y agoTo be fair, it's possible for the GPU to write to arbitrary memory, but it wouldn't happen as a matter of standard usage by any means.
- maximilianburke 15y agoIt's only a problem if the bits of memory you want to enforce special protection rights on (ie: no execute, read only, etc.) is also mapped into the GPU's address space. It's not something that "just happens" normally, it most often requires clear intent to do so, but it can be done.