Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.
XXX pullup-8
XXX pullup-9
XXX pullup-10
be applied to compat/linux32/common/linux_termios.c, and reduce diff.
- remove duplicate fd_putfile(). This will be done after "goto out;".
- catch up from compat/linux/common/linux_termios.c r1.26 TIOCSPTLCK
- catch up from compat/linux/common/linux_termios.c r1.37 (TCOOFF/TCOON) of the TCXONC
- catch up from compat/linux/common/linux_termios.c r1.39 FIOCLEX and FIONCLEX
it is now defined in each arch same as the other *_SIGNATURE definitions.
- add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
- The AT_EMPTY_PATH processing from the modification of
sys/compat/linux/common/linux_file64.c r1.63 has been separated, and made
common to linux_statat(), so that it can be used not only by
linux32_sys_fstatat64() but also by other *statat() variants.
Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
- Don't need to count anonpages+filepages any more; clean+unknown+dirty for
each kind of page can be summed to get the totals.
- Track the number of free pages with a counter so that it's one less thing
for the allocator to do, which opens up further options there.
- Remove cpu_count_sync_one(). It has no users and doesn't save a whole lot.
For the cheap option, give cpu_count_sync() a boolean parameter indicating
that a cached value is okay, and rate limit the updates for cached values
to hz.
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
exist in different namespace depending on FUTEX_PRIVATE_FLAG. This appears
not to be the case in Linux, and some futex users will mix private and non-
private ops on the same futex object. Provide a convenience wrapper that
puts this logic in one place witn a comment explaining why.
While here, move the Linux futex wrapper out of its own file and plop
it in linux_misc.c, which is where it lives in the linux32 module.
when allocating a PID.
- Per above, proc_free_pid() no longer decrements nprocs. It's now done
in proc_free() right after proc_free_pid().
- Ensure nprocs is accessed using atomics everywhere.
automate installation of sysctl nodes.
Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself. These are not changed.
this is needed so that glibc falls back to emulation and apps behaving
properly, since EOPNOTSUPP is a documented and expected return code, but
ENOSYS is not
right now there are no filesystems in NetBSD tree supporting the fallocate
VOP, so no point trying to map this to a native call
supposed to help with problem reported in
https://mail-index.netbsd.org/tech-kern/2019/11/03/msg025641.html
Linux accepts garbage as timeout and attempts to set it to something
meaningful. Instead of checking for valid ranges of usec, just convert
the type safely, regardless of what is inside it.