News for hackers. Stuff that matters.
Re:OpenBSD System-Call Pinning by saagarjha on Saturday February 03, 2024 @05:19AM (#39239034)
> reading kernel memory directly

God I hope not

Re:OpenBSD System-Call Pinning by epcoa on Saturday February 03, 2024 @08:11AM (#39240037)
https://man.freebsd.org/cgi/man.cgi?query=kvm&sektion=3&n=1

The aforementioned tools use these interfaces.

Most of the sundry information for the live kernel comes from sysctl (abstracted by kvm), I note the mem/kmem interface for completeness.

Re:OpenBSD System-Call Pinning by adrian_b on Saturday February 03, 2024 @07:16AM (#39239621)
I do not know what the previous poster was talking about, but, while unrestricted access to kernel memory is of course unacceptable, a perfectly secure and useful means for the kernel to provide information to a user process is to map a page as read-only in the user address space, from where the user process could get the information without the overhead of a system call.

For information of general interest such a special kernel page could be mapped as read-only in the address space of all user processes.

Much of the information that is provided in the special file systems /proc and /sys could have been provided in some appropriate data structures in such read-only shared memory, for a faster access, by avoiding the overhead of file system calls and of file text parsing.