Originally posted by jpg44
View Post
Announcement
Collapse
No announcement yet.
The Linux Kernel Might Drop Memory Protection Extensions Support
Collapse
X
-
Originally posted by jpg44 View PostDropping MPX is utterly insane. Its pure laziness and outright negligence. The internet is awash in security disasters, there is bad C++ code everywhere, and we want to REMOVE protections against this? What the hell is wrong with these people?
Last edited by starshipeleven; 29 April 2018, 04:51 AM.
- Likes 1
Comment
-
Originally posted by starshipeleven View PostThey have already a generic system that works better. https://en.wikipedia.org/wiki/AddressSanitizer
Ouch. Thats a big performance hit. You would think that by moving this operation onto the CPU logic it can be paralellized and pipelined to give you much better performance than that. AMD/Intel need to work on this, I would not be surprised if MPX will end up giving you far, far better performance, perhaps no performance hit at all, if it is properly optimized into on chip circuitry.
I've had discussions with others as well about how x86 Memory Segmentation could be updated and repurposed to be used similarly to provide better protection form buffer overruns, with a larger LDT updated for 64 bits. You give each memory buffer its own segment, configured in LDT, you set the segment register before writing to a buffer, it can generate a memory protection error if it blows past the end of the memory region. To further optimize, use special "far pointers" that contain both the segment selector and the address offset in a single pointer value and the segment register is automatically loaded when you dereference the pointer for a MOV.
Generally with very small feature sizes on CPUs, transistor code is cheap, so you can speed things up by implementing these security protections on chip without slowing down the instructions at all.
Comment
-
Originally posted by jpg44 View Post
Ouch. Thats a big performance hit. You would think that by moving this operation onto the CPU logic it can be paralellized and pipelined to give you much better performance than that. AMD/Intel need to work on this, I would not be surprised if MPX will end up giving you far, far better performance, perhaps no performance hit at all, if it is properly optimized into on chip circuitry.
Source: https://intel-mpx.github.io/performance/
Observation 2: AddressSanitizer, despite being a software-only approach, performs on par with ICC-MPX and better than GCC-MPX. This unexpected result testifies that the HW-assisted performance improvements of MPX are offset by its complicated design.
The reasoning now for dropping MPX support is that since MPX is so hard to maintain and performs just as slowly as AddressSanitizer in the best case, why not just go with the vendor-agnostic implementation.
Last edited by Sachiru; 29 April 2018, 11:35 PM.
- Likes 2
Comment
-
Originally posted by jpg44 View PostFrom Wikipedia, on AddressSanitizer: On average, the instrumentation increases processing time by about 73% and memory usage by 340%.[3].
Ouch. Thats a big performance hit. You would think that by moving this operation onto the CPU logic it can be paralellized and pipelined to give you much better performance than that. AMD/Intel need to work on this, I would not be surprised if MPX will end up giving you far, far better performance, perhaps no performance hit at all, if it is properly optimized into on chip circuitry.
Jpg44 just because a hardware vendor makes a feature does not mean it works. MPX and TSX are fairly broken.
Originally posted by jpg44 View PostGenerally with very small feature sizes on CPUs, transistor code is cheap, so you can speed things up by implementing these security protections on chip without slowing down the instructions at all.
As I say I totally understand dropping MPX support as MPX needs to go back to the drawing board and be redone right this time. If nothing is using MPX existing defective feature can be removed and a working on put in it place.
- Likes 2
Comment
Comment