News for hackers. Stuff that matters.
Re:C’s Biggest Mistake (2009) by Koshkin on Saturday September 12, 2020 @06:41PM (#24456510)
I wonder if a better idea (in principle) would be to have some kind of hardware implementation, sort of like a finer-grained memory segmentation.
Re:C’s Biggest Mistake (2009) by knaq on Saturday September 12, 2020 @11:04PM (#24457922)
CHERI is an attempt. DARPA paid to have it for RISC-V and ARMv8. It was originally for MIPS.

https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/

It is fundamentally like the 80286 segments, but with all sorts of usability troubles solved. The 80286 segments were impractical because there were a small number available and because the OS couldn't safely hand over direct control. Every little segment adjustment required calling the OS.

Re:C’s Biggest Mistake (2009) by ksherlock on Saturday September 12, 2020 @08:05PM (#24457017)
x86 has a BOUND instruction which generates an exception if an index is out of bounds. It didn't make it into x64.
Re:C’s Biggest Mistake (2009) by saagarjha on Saturday September 12, 2020 @10:34PM (#24457730)
This is likely coming in ARM soon. (And I'm hopeful it's not even soon™, or "it came but nobody used it" as has happened on x86.)
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @02:41AM (#24458901)
Going forward Android will require hardware metadata extensions on ARM devices, as of Android 11.
Re:C’s Biggest Mistake (2009) by saagarjha on Sunday September 13, 2020 @05:55AM (#24459717)
You bring this up often and I ask you to modify your wording about every time I see it. Android will not require these extensions, no hardware ships with it yet. Android says they will support it.
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @06:12AM (#24459791)
And I give you the official wording of Google every time.

> Google is committed to supporting MTE throughout the Android software stack. We are working with select Arm System On Chip (SoC) partners to test MTE support and look forward to wider deployment of MTE in the Android software and hardware ecosystem. Based on the current data points, MTE provides tremendous benefits at acceptable performance costs. We are considering MTE as a possible foundational requirement for certain tiers of Android devices.

https://security.googleblog.com/2019/08/adopting-arm-memory-...

> Starting in Android 11, for 64-bit processes, all heap allocations have an implementation defined tag set in the top byte of the pointer on devices with kernel support for ARM Top-byte Ignore (TBI). Any application that modifies this tag is terminated when the tag is checked during deallocation. This is necessary for future hardware with ARM Memory Tagging Extension (MTE) support.

>....

> This will disable the Pointer Tagging feature for your application. Please note that this does not address the underlying code health problem. This escape hatch will disappear in future versions of Android, because issues of this nature will be incompatible with MTE

https://source.android.com/devices/tech/debug/tagged-pointer...

So unless you have other official feedback from Google management, I will keep repeating myself.

Re:C’s Biggest Mistake (2009) by saagarjha on Sunday September 13, 2020 @07:03AM (#24460024)
I am not sure if I have made myself clear, because I have no issues with the Google documents on this and I believe they are very clear: this feature is optional! Optional optional optional, only on hardware that supports it will Google implement these things because they literally cannot use it otherwise. Your wording has always implied that this is a requirement to run Android 11 and it is not, and that is what I am asking you to change. Like, what’s wrong with being accurate and saying “Google is implementing support for this in Android 11”? “This feature may be used to classify Android devices”?