| Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
disable it - which defaults to disabled. The following command is now
required to use linux binaries:
sysctl -w emul.linux.enabled=1
After a discussion on tech-kern@. All the other ideas to reduce the attack
surface have drawbacks, and this sysctl seems to be the best option.
|
|
now that we don't have vm86 anymore.
|
|
This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.
This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.
This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.
Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h
Reduce code complexity after removal of this functionality.
Update TODO.ptrace accordingly: remove two entries about /proc tracing.
Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.
All filesystem tracing utility users are encouraged to switch to ptrace(2).
Sponsored by <The NetBSD Foundation>
|
|
Pass 3.
|
|
Pass 2.
|
|
While here, remove wrong comment.
Noted by kre@.
|
|
Not really keen to invent a new kauth cookie for this useless purpose.
From Ilja Van Sprundel.
|
|
Controllable via puffs from userland.
From Ilja Van Sprundel.
|
|
in which case the kernel would always use iret (slower).
|
|
|
|
use with mprotect(2), but without enabling them immediately.
Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.
Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.
Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.
Improve test cases to ensure correct operation of the changed
interfaces.
|
|
|
|
as specified by _lwp_create(2)
- Reset the signal stack for threads created with _lwp_create(2)
|
|
|
|
|
|
ptrace needs to use it that way.
|
|
- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static
|
|
|
|
|
|
userland is made with iret instead of sysret in this path. While here, use
size_t.
|
|
again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
amd64, and makes it easier to track down these variables on nxr - 'ldt'
and 'gdt' being common keywords.
|
|
|
|
|
|
|
|
syscalls...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XXX: fix base?
|
|
|
|
|
|
|
|
|
|
|