| Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
timer_getoverrun(), and timer_delete()) to COMPAT_LINUX and COMPAT_LINUX32.
|
|
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.
|
|
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.
- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while
here.
ok chs@
|
|
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.
|
|
|
|
Map the COMPAT_LINUX futex calls to the native ones.
|
|
release the locks fewer times. Proposed on tech-kern a very long time go.
|
|
|
|
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
|
|
|
|
fpu_save_area_clear -> fpu_clear
fpu_save_area_reset -> fpu_sigreset
Clearer, and reduces a future diff. No real functional change.
|
|
pcb_flags to zero, and the moment cpu_segregs64_zero resets pcb_gs, we may
be preempted.
If this happens, and if the calling LWP was a 32bit thread, when switching
back to that LWP, the context switcher sees that PCB_COMPAT32 is not set in
pcb_flags and tries to perform a 64bit context switch; but pcb_gs contains
a 32bit GDT descriptor, and not a 64bit GS.base value. The wrmsr therefore
faults because the value is non-canonical, and this fault is fatal.
Rearrange the code so that the update of pcb_flags and pcb_gs/pcb_fs is non
interruptible. This fixes the problem, tested with a reproducer (which
therefore doesn't work anymore).
Likely fixes PR/53993.
|
|
|
|
|
|
|
|
extend the uint64_t's when building it, so we're leaking 48 bits of kernel
stack to userland.
Having said that, it appears that I unintentionally fixed most of this
issue in locore.S::rev1.127 - by building the frame with interrupts
disabled, we are implicitly guaranteeing that the structure doesn't get
overwritten by the kernel. Which means, we are leaking to userland data
that comes from userland anyway.
(still other places with this issue, but I'll fix them differently)
|
|
way segment registers work on amd64 will diverge between 32bit and 64bit
LWPs.
|
|
in which case the kernel would always use iret (slower).
|
|
|
|
userland is made with iret instead of sysret in this path. While here, use
size_t.
|
|
again.
|
|
|
|
|
|
|
|
|
|
XXX: mips looks busted (the syscalls file has lots of NOARGS syscalls that
should be STD).
|
|
|
|
|
|
|
|
|
|
This lets Matlab R2016A run on NetBSD/amd64
|
|
|
|
native.
|
|
ports that support it.
|
|
|
|
|
|
|
|
|