| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks.
PR: 211947
|
|
|
|
|
|
| |
Handle races with listening socket close when connecting a unix socket.
PR: 211531
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sem_post(): wake up the sleeper only after adjusting has_waiters
If the caller of sem_post() wakes up a thread sleeping via sem_wait()
before it clears the has_waiters flag, the caller of sem_wait() has no way of
knowing when it is safe to destroy the semaphore and reuse the memory. This is
because the caller of sem_post() may be interrupted between the wake step and
the clearing of has_waiters. It will then write into the has_waiters flag in
userspace after being preempted for some unknown amount of time.
Approved by: vangyzen (mentor)
Sponsored by: Dell Inc.
|
|
|
|
|
| |
Rewrite subr_sleepqueue.c use of callouts to not depend on the
specifics of callout KPI.
|
|
|
|
|
|
|
| |
Add callout_when(9).
MFC r303919:
Fix indentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define SBT_MAX.
MFC r267896 (by davide):
Improve r264388.
MFC note. The SBT_MAX definition already existed on stable/10, but without
the refinement from r267896. Also, consumers of SBT_MAX were not converted,
since r264388 was not merged properly.
Reviewed by: mav
|
|
|
|
| |
Remove duplicated code.
|
|
|
|
| |
Fix some handling of P2_PTRACE_FSTP.
|
|
|
|
| |
VOP_FSYNC() does not take cred as an argument. Correct comment.
|
|
|
|
|
|
|
|
|
| |
First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when
the new child was created via vfork() rather than fork(). Second, a
new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK
event mask. This new stop is reported after the vfork parent resumes
due to the child calling exit or exec. Debuggers can use this stop to
reinsert breakpoints in the vfork parent process before it resumes.
|
|
|
|
| |
Re-schedule signals after kthread exits.
|
|
|
|
| |
Force SIGSTOP to be the first signal reported after the attach.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a mask of optional ptrace() events.
302900:
Add a test for user signal delivery.
This test verifies we get the correct ptrace event details when a signal
is posted to a traced process from userland.
302902:
Add a mask of optional ptrace() events.
ptrace() now stores a mask of optional events in p_ptevents. Currently
this mask is a single integer, but it can be expanded into an array of
integers in the future.
Two new ptrace requests can be used to manipulate the event mask:
PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK
sets the current event mask.
The current set of events include:
- PTRACE_EXEC: trace calls to execve().
- PTRACE_SCE: trace system call entries.
- PTRACE_SCX: trace syscam call exits.
- PTRACE_FORK: trace forks and auto-attach to new child processes.
- PTRACE_LWP: trace LWP events.
The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have
been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces
P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS.
The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for
compatibility but now simply toggle corresponding flags in the
event mask.
While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both
modify the event mask and continue the traced process.
302921:
Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL.
303461:
Note that not all optional ptrace events use SIGTRAP.
New child processes attached due to PTRACE_FORK use SIGSTOP instead of
SIGTRAP. All other ptrace events use SIGTRAP.
304009:
Remove description of P_FOLLOWFORK as this flag was removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
292894:
Add ptrace(2) reporting for LWP events.
Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting
thread creation and destruction. Newly created threads will stop to report
PL_FLAG_BORN before returning to userland and exiting threads will stop to
report PL_FLAG_EXIT before exiting completely. Both of these events are
only enabled and reported if PT_LWP_EVENTS is enabled on a process.
292896:
Document the recently added support for ptrace(2) LWP events.
|
|
|
|
|
| |
If a thread is created bound to a cpuset it might already be bound before
its very first timeslice, and td_lastcpu will be NOCPU in that case.
|
|
|
|
|
|
| |
cred: add proc_set_cred_init helper
PR: D7431
|
|
|
|
|
|
|
|
|
| |
r280330:
fork: assign refed credentials earlier
r282567:
Fix up panics when fork fails due to hitting proc limit
PR: D7431
|
|
|
|
| |
Remove mention of Giant from the fork_return() description.
|
|
|
|
|
|
|
|
| |
Revive the check, disabled in r197963.
MFC r302999:
On first exec after vfork(), call signotify() to handle pending
reenabled signals.
|
|
|
|
| |
Implement mtx_trylock_spin(9).
|
|
|
|
|
|
|
| |
Provide counter_warning(9) KPI.
MFC r303155:
Hide counted_warning(9) under #ifdef _KERNEL braces.
|
|
|
|
|
|
|
|
| |
In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called,
if vnode is VMIO. For VMIO vnodes, set BO_DEAD in vm_object_terminate().
MFC r302580:
Fix grammar.
|
|
|
|
| |
Explicitely check for the valid range of file descriptor values.
|
|
|
|
|
| |
In ptrace_vm_entry(), do not call vmspace_free() while owning a vm
object lock.
|
|
|
|
| |
Do not allow creation of char or block special nodes with VNOVAL dev_t.
|
|
|
|
| |
Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls.
|
|
|
|
| |
Ensure that spinlock sections are balanced even after a panic.
|
| |
|
|
|
|
|
|
|
| |
read.
While reading the code, I noticed that shm_read() returns without unlocking
foffset and rangelock if mac_posixshm_check_read() rejects the read.
|
|
|
|
| |
exec: Provide execpath in imgp for the process_exec hook.
|
|
|
|
|
|
|
|
|
|
|
|
| |
r300792:
exec: Add credential change information into imgp for process_exec hook.
r300851:
exec: get rid of one vnode lock/unlock pair in do_execve
r301580:
Old process credentials for setuid execve must not be dereferenced when the
process credentials were not changed. This can happen if an error occured
trying to activate the setuid binary. And on error, if new credentials
were not yet assigned, they must be freed to not create the leak.
|
|
|
|
|
|
| |
Fix style issues around existing SDT probes.
** Changes to sys/netinet/in_kdtrace.c and sys/netinet/in_kdtrace.h skipped.
|
|
|
|
| |
sys/kern: spelling fixes in comments.
|
|
|
|
| |
Remove some NULL checks for M_WAITOK allocations.
|
|
|
|
| |
exec: textvp -> oldtextvp; binvp -> newtextvp
|
|
|
|
| |
exec plug a redundant vref + vrele of the image vnode
|
|
|
|
| |
Plug unnecessary binvp NULL initialization and test.
|
|
|
|
| |
cred: add proc_set_cred helper
|
|
|
|
| |
Correct a comment.
|
|
|
|
| |
Remove XXX comments from kern_thread.c.
|
|
|
|
| |
Remove code duplication.
|
|
|
|
|
| |
Do not assume that we own the use reference on the covered vnode until
we set MNTK_UNMOUNT flag on the mp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r297203,r297256:
r297156:
Track filemon usage via a proc.p_filemon pointer rather than its own lists.
r297157:
Stop tracking stat(2).
r297158:
Consolidate open(2) and openat(2) code.
r297159:
Use curthread for vn_fullpath.
r297161:
Attempt to use the namecache for openat(2) path resolution.
r297172:
Consolidate common link(2) logic.
r297200:
Follow-up r297156: Close the log in filemon_dtr rather than in the last
reference.
r297201:
Return any log write failure encountered when closing the filemon fd.
r297202:
Remove unused done argument to copyinstr(9).
r297203:
Handle copyin failures.
r297256:
Remove unneeded return left from refactoring.
Relnotes: yes (filemon stability/performance updates)
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
| |
Fix a vnode leak when giving a child jail a too-long path when
debug.disablefullpath=1.
|
|
|
|
| |
Re-order some jail parameter reading to prevent a vnode leak.
|
|
|
|
|
| |
Clean up some logic in jail error messages, replacing a missing test and
a redundant test with a single correct test.
|
|
|
|
|
|
|
|
| |
Make sure the OSD methods for jail set and remove can't run concurrently,
by holding allprison_lock exclusively (even if only for a moment before
downgrading) on all paths that call PR_METHOD_REMOVE. Since they may run
on a downgraded lock, it's still possible for them to run concurrently
with PR_METHOD_GET, which will need to use the prison lock.
|
|
|
|
|
| |
Remove a comment that was part of copied code, and is misleading in
the new location.
|
|
|
|
|
| |
Mark jail(2), and the sysctls that it (and only it) uses as deprecated.
jail(8) has long used jail_set(2), and those sysctl only cause confusion.
|
|
|
|
|
|
|
|
|
|
|
| |
r299494 (by cem):
subr_vmem: Fix double-free in error case of vmem_create
If vmem_init() fails, 'vm' is already destroyed and freed. Don't free it
again.
CID: 1042110
|