What happened to “we don't break the userspace” idea?
What happened to “we don't break the userspace” idea?
Posted Mar 4, 2025 1:01 UTC (Tue) by WolfWings (subscriber, #56790)In reply to: What happened to “we don't break the userspace” idea? by khim
Parent article: Guard pages for file-backed memory
There's quite a few that won't even load if you have Developer mode enabled on Android, doesn't matter if you're using it just to keep the screen on, or to override bluetooth versions to work with an older car radio, they just straight refuse to load.
Posted Mar 4, 2025 3:50 UTC (Tue)
by wtarreau (subscriber, #51152)
[Link] (3 responses)
We're still missing a portable way to attempt a safe kernel-assisted memory copy from one area to another that would simply return EFAULT when either area is not accessible. I'm using some hacks using syscalls when I need to do that but that's ugly. I suspect one could also use vmsplice() to move the data into a pipe then from it, though I have not tried.
Posted Mar 4, 2025 8:41 UTC (Tue)
by fw (subscriber, #26023)
[Link]
Posted Mar 4, 2025 9:38 UTC (Tue)
by khim (subscriber, #9252)
[Link] (1 responses)
Well… using
Posted Mar 5, 2025 4:36 UTC (Wed)
by wtarreau (subscriber, #51152)
[Link]
What happened to “we don't break the userspace” idea?
What happened to “we don't break the userspace” idea?
> I'm using some hacks using syscalls when I need to do that but that's ugly.
What happened to “we don't break the userspace” idea?
write
for read looks a fit… quaint, but works well, in practice.pipe
, then fork
with one side reading with write
syscall (specify memory argument that you want to look into as buffer, pipe as target, kernel will return EFAULT
if memory can not be read) and the other getting information from pipe… this trick is decades old and portable (even if I'm not sure how portable, but it certainly works fine with very old versions of Linux), but don't see why would it stop working… because of fork
?What happened to “we don't break the userspace” idea?