| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.
|
|
|
|
|
| |
Make SIGSTOP working for sleeps done while waiting for fifo readers or
writers in open(2), when the fifo is located on an NFS mount.
|
|
|
|
|
|
|
|
|
| |
Improve style and fix a possible use-after-free case introduced in r268384
by reinitializing the 'freestate' pointer after freeing the memory.
Obtained from: HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb)
PR: 194525
Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
|
|
|
|
|
| |
For sigaction(2), ignore possible garbage in sa_flags for sa_handler
== SIG_DFL or SIG_IGN.
|
|
|
|
| |
Revert r263475: TDP_DEVMEMIO no longer needed.
|
|
|
|
|
| |
Allow clock_getcpuclockid() on the CPU-time clock for zombie process.
Posix does not prohibit this.
|
|
|
|
|
|
| |
Don't set prison's pr_ip4s or pr_ip6s to -1.
PR: 196474
|
|
|
|
|
|
|
|
| |
The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or
witness printouts in the console driver clients can cause this mutex
to recurse by calls to "printf()" from witness for example. In
particular this can happen if "debug.witness.skipspin=0" is set in the
boot environment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cast *path to silence clang -Wpointer-sign warning.
Indeed, instead of hiding the kern___getcwd() bug by bogus cast
in r276564, change path type to char * (pathnames are always char *).
And remove bogus casts of malloc().
kern___getcwd() internally doesn't actually use or support u_char *
paths, except to copy them to a normal char * path.
These changes are not visible to libc as libc/gen/getcwd.c misdeclares
__getcwd() as taking a plain char * path.
While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as
we always have sysproto.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r270443 (by mjg):
Properly reparent traced processes when the tracer dies.
MFC r273452 (by mjg):
Plug unnecessary PRS_NEW check in kern_procctl.
MFC 275800:
Add a facility for non-init process to declare itself the reaper of
the orphaned descendants.
MFC r275821:
Add missed break.
MFC r275846 (by mckusick):
Add some additional clarification and fix a few gammer nits.
MFC r275847 (by bdrewery):
Bump Dd for r275846.
|
|
|
|
|
| |
Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
the created file name was cached. Use the flag for core dumps.
|
|
|
|
|
| |
Set NOCACHE flag for CREATE namei() calls, do not specially handle
MAKEENTRY in VOP_LOOKUP().
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify vop_stdadvlock{async}() so that it only
locks/unlocks the vnode and does a VOP_GETATTR()
for the SEEK_END case. This is safe to do, since
lf_advlock{async}() only uses the size argument
for the SEEK_END case.
The NFSv4 server needs this when
vfs.nfsd.enable_locallocks!=0 since locking the
vnode results in a LOR that can cause a deadlock
for the nfsd threads.
|
|
|
|
| |
Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.
|
|
|
|
|
| |
Remove lock recursion for the pipe pair mutex, and disable the
recursion on mutex initialization.
|
|
|
|
| |
Fix draining in ttydev_leave().
|
|
|
|
| |
Don't return ERESTART when the device is gone.
|
|
|
|
|
|
|
|
|
|
| |
Add facility to stop all userspace processes.
MFC r275753:
Fix gcc build.
MFC r275820:
Add missed break.
|
| |
|
| |
|
|
|
|
|
| |
Only sleep interruptible while waiting for suspension end when
filesystem specified VFCF_SBDRY flag, i.e. for NFS.
|
|
|
|
| |
Put the buffer cleanup code after inactivation.
|
|
|
|
|
|
|
| |
For architectures where time_t is wide enough, in particular, 64bit
platforms, avoid overflow after year 2038 in clock_ct_to_ts().
PR: 195868
|
|
|
|
| |
Extend kqueue's EVFILT_TIMER by adding precision unit flags support.
|
|
|
|
|
|
|
|
|
| |
Fix overflow for timeout values of more than 68 years, which is the maximum
covered by sbintime (LONG_MAX seconds).
MFC r259633 (by se):
Fix compilation on 32 bit architectures and use INT64_MAX instead of
LONG_MAX for the upper bound check.
|
|
|
|
|
|
|
| |
Add functions syncer_suspend() and syncer_resume().
MFC r275637:
Remove local variable for real.
|
|
|
|
|
|
| |
Check for bo_bufobj->bo_object for NULL and cache the value in local
variable to avoid NULL dereference in getnewbuf_reuse_bp(). The vnode
owning the buffer is not locked there.
|
|
|
|
| |
Do some refactoring and minor cleanups of the thread_single() code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thread waiting for the vfork(2)-ed child to exec or exit, must allow
for the suspension.
MFC r275683 (by andreast):
Fix build for powerpc(32|64) kernels.
MFC r275686 (by andreast):
Fix kernel build for booke.
r275639 (by andrew) is not merged, since arm/arm/syscall.c is not
present on the stable/10 branch, and arm/arm/trap.c already includes
sys/kernel.h.
|
|
|
|
|
| |
When process is exiting, check for suspension regardless of
multithreaded status of the process.
|
|
|
|
|
| |
Assert the state of the process lock and sigact mutex in
kern_sigprocmask() and reschedule_signals().
|
|
|
|
|
| |
Fix SA_SIGINFO | SA_RESETHAND handling, reset disposition after sv_sendsig()
is called.
|
|
|
|
|
|
| |
Provide an on-stack temporary buffer for small IOCTL requests.
Avoiding a memory allocation per IOCTL request can give a significant
speedup for applications which heavily rely on IOCTLs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new terminal_set_cursor() is added: it wraps the existing
teken_set_cursor() function.
In vtbuf_grow(), the cursor position is adjusted at the end of the
function. In vt_change_font(), we call terminal_set_cursor() just after
terminal_set_winsize_blank(), while the terminal is mute.
This fixes a bug where, after loading a kernel video driver which
increases the terminal window size, the cursor remains at its old
position, in other words, in the middle of the display content.
PR: 194421
MFC of: r273932
|
|
|
|
|
| |
In vfs_write_suspend_umnt(), if suspension cannot be established, do
not forget to restore write ops count when returning the error.
|
|
|
|
|
| |
Fix assertion, &uc->uc_busy is never zero, the intent is to test the
uc_busy value, and not its address.
|
|
|
|
| |
Do not try to dereference thread pointer when the value is not a pointer.
|
|
|
|
| |
Remove fossil.
|
|
|
|
|
|
| |
For posix_fallocate(2) and posix_fadvise(2), return ESPIPE
when underlying file does not have DFLAG_SEEKABLE set. For
posix_fallocate(2), simplify error handling logic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r273783:
Add fueword(9) and casueword(9) functions.
MFC note: ia64 is handled like arm, with NO_FUEWORD define.
MFC r273784:
Replace some calls to fuword() by fueword() with proper error checking.
MFC r273785:
Convert kern_umtx.c to use fueword() and casueword().
MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not
converted, they are removed from HEAD, and not used. The do_sem2*()
family is not yet merged to stable/10, corresponding chunk will be
merged after do_sem2* are committed.
MFC r273788 (by jkim):
Actually install casuword(9) to fix build.
MFC r273911:
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).
|
|
|
|
|
| |
When sleeping waiting for the profiling stop, always set P_STOPPROF
before dropping process lock. Clear P_STOPPROF when doing wakeup.
|
|
|
|
|
| |
When other end of the pipe closed during the write, but some bytes
were written, return short write instead of EPIPE.
|
|
|
|
|
|
|
|
| |
Fix two issues with lockmgr(9) LK_CAN_SHARE() test, related
to the exclusive locker starvation.
MFC r273986:
Fix the build with ADAPTIVE_LOCKMGRS kernel option.
|
|
|
|
| |
Clean up confusing comment.
|
|
|
|
|
| |
Fix a typo from r189544, which replaced unp_global_rwlock with unp_list_lock
and unp_link_rwlock.
|
|
|
|
|
|
| |
[SA-14:26] Fix remote command execution in ftp(1).
Approved by: so (des)
|
|
|
|
|
|
|
|
|
| |
Improve transmit sending offload, TSO, algorithm in general. This
change allows all HCAs from Mellanox Technologies to function properly
when TSO is enabled. See r271946 and r272595 for more details about
this commit.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
| |
The SYSCTL data pointers can come from userspace and must not be
directly accessed. Although this will work on some platforms, it can
throw an exception if the pointer is invalid and then panic the kernel.
Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert somewhat hackish geom_disk optimization, committed as part of r256880,
and the following r273143 commit, supposed to workaround introduced issue by
quite innocent-looking change.
While there is no clear understanding why, but r273143 is accused in data
corruption in some environments with high I/O load. I personally don't see
any problem in that commit, and possibly it is just a trigger to some other
bug somewhere, but better safe then sorry for now.
Requested by: scottl@
|