HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hansendc

no profile record

comments

hansendc
·4 miesiące temu·discuss
"On x86-64, there are two CPU settings which control the kernel’s ability to access memory."

There are a couple more than two, even in 2021.

Memory Protection Keys come to mind, as do the NPT/EPT tables when virtualization is in play. SEV and SGX also have their own ways of preventing the kernel from writing to memory. The CPU also has range registers that protect certain special physical address ranges, like the TDX module's range. You can't write there either.

That's all that comes to mind at the moment. It's definitely a fun question!
hansendc
·5 miesięcy temu·discuss
Here's an implementation that one of the OpenStreetmap applications uses:

https://josm.openstreetmap.de/browser/josm/trunk/src/org/ope...

It used to use a linear list of points, but it was VERY slow to draw, so I hacked this in to the code base a few years ago.