1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00
openbsd-src/sys/kern
claudio 3edd791eb4 cursig() can return a normally ignored signal if the process is ptraced.
So make sure that sleep_signal_check() returns ERESTART in that case so
that the syscall is retried once ptrace intercepted the signal.

This should fix unexpected EINTR returns of waitpid for precesses that
left SIGCHLD ignored (default). Not the perfect fix but a good enough
bandaid to allow people to debug processes doing forks and waitpid calls.

Problem reported and fix tested by stsp@
OK kettenis@ stsp@
2024-12-05 14:53:55 +00:00
..
clock_subr.c
dma_alloc.c
exec_conf.c Delete the last emulation callbacks: we're Just ELF, so declare 2021-12-07 22:17:02 +00:00
exec_elf.c Invalid pintables in ELF binaries can crash the kernel. 2024-09-15 23:13:19 +00:00
exec_script.c
exec_subr.c Always use new_vmcmd() from exec_subr.c, remove the macro which 2024-11-02 10:02:23 +00:00
genassym.sh Tweak genassym code generation to force preprocessor conditional directives 2024-10-07 15:41:46 +00:00
init_main.c avoid lock contention in __thrsleep and __thrwakeup syscalls 2024-11-28 02:01:57 +00:00
init_sysent.c regen 2024-08-02 14:35:56 +00:00
kern_acct.c Rework per proc and per process time usage accounting 2024-07-08 13:17:11 +00:00
kern_bufq.c zap a pile of dangling tabs 2022-12-05 23:18:37 +00:00
kern_clock.c Rework per proc and per process time usage accounting 2024-07-08 13:17:11 +00:00
kern_clockintr.c Constify strings in symbol-related ddb interfaces, and make the iterator 2024-11-07 16:02:29 +00:00
kern_descrip.c Unlock KERN_MAXFILES. 2024-08-20 13:29:25 +00:00
kern_event.c Stop using KERNEL_LOCK to protect the per process kqueue list 2024-08-06 08:44:54 +00:00
kern_exec.c Remove code after exit1() and NOTREACHED comment. Nothing will ever get there. 2024-09-30 11:49:44 +00:00
kern_exit.c Indicate that a process has stopped by setting PS_STOPPED flag 2024-10-15 13:49:26 +00:00
kern_fork.c replace uvm.h includes with uvm_extern.h where possible 2024-11-10 06:51:59 +00:00
kern_intrmap.c add intrmap_one, some temp code to help us write pci_intr_establish_cpu. 2020-06-23 01:40:03 +00:00
kern_kthread.c Mark exit1() and sigexit() as non-returning 2021-11-26 04:42:13 +00:00
kern_ktrace.c provide the pieces for ktrace/kdump to observe pinsyscall violations. 2023-12-15 15:12:08 +00:00
kern_lock.c remove __mp_release_all_but_one(), unused since sched_bsd.c rev 1.92 2024-07-03 01:36:50 +00:00
kern_malloc.c return type on a dedicated line when declaring functions 2024-06-26 01:40:49 +00:00
kern_physio.c Remove Softdep. 2024-02-03 18:51:57 +00:00
kern_pledge.c remove unused DEBUG_PLEDGE lines; ok deraadt@ 2024-10-06 23:39:24 +00:00
kern_proc.c Protect the ps_pgrp pointer by either the KERNEL_LOCK or the ps_mtx. 2024-10-22 11:54:04 +00:00
kern_prot.c Adjust lock requirements for ps_pptr, ps_ppid and ps_oppid. 2024-10-08 09:05:40 +00:00
kern_resource.c no need to include both uvm.h and uvm_extern.h 2024-11-10 06:45:36 +00:00
kern_rwlock.c Revert the new rwlock implementation for now. 2024-12-03 12:50:16 +00:00
kern_sched.c Add KASSERT on P_WSLEEP in setrunqueue() and sched_chooseproc(). 2024-11-24 13:05:14 +00:00
kern_sensors.c zap a pile of dangling tabs 2022-12-05 23:18:37 +00:00
kern_sig.c Do not clear P_WSLEEP in ptsigna's SIGCONT handling. cursig() no longer 2024-11-24 12:58:06 +00:00
kern_smr.c Introduce sched_unpeg_curproc() to abstract the current implementation. 2024-07-08 14:46:47 +00:00
kern_srp.c srp_finalize(9): tsleep(9) -> tsleep_nsec(9) 2020-12-06 19:18:30 +00:00
kern_subr.c On systems without xonly mmu hardware-enforcement, we can still mitigate 2023-01-31 15:18:51 +00:00
kern_synch.c cursig() can return a normally ignored signal if the process is ptraced. 2024-12-05 14:53:55 +00:00
kern_sysctl.c Cast atomic_load_int(9) to signed int when loading `securelevel'. 2024-11-18 08:42:53 +00:00
kern_task.c remove prototypes with no matching function 2024-05-14 08:26:13 +00:00
kern_tc.c timecounting: start system uptime at 0.0 instead of 1.0 2024-02-23 23:01:15 +00:00
kern_time.c Fix the clock_gettime() handler for pthread_getcpuclockid() to 2024-10-03 10:18:29 +00:00
kern_timeout.c Constify strings in symbol-related ddb interfaces, and make the iterator 2024-11-07 16:02:29 +00:00
kern_unveil.c zap a pile of dangling tabs 2022-12-05 23:18:37 +00:00
kern_uuid.c
kern_watchdog.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
kern_xxx.c zap a pile of dangling tabs 2022-12-05 23:18:37 +00:00
Makefile add powerpc64 and riscv64 to tags arch list 2024-11-03 07:58:42 +00:00
makesyscalls.sh Error out if one syscall ever takes more than 6 arguments. 2024-01-07 20:52:44 +00:00
sched_bsd.c In setrunnable() also check for P_WSLEEP in the SSTOP case. 2024-11-24 13:02:37 +00:00
spec_vnops.c Put the bowels of the various VOP_PRINT routines under 2024-10-18 05:52:32 +00:00
subr_autoconf.c introduce a new kern.autoconf_serial sysctl that can be used by userland 2022-11-07 14:25:44 +00:00
subr_blist.c spelling 2023-05-30 08:30:00 +00:00
subr_disk.c directly use dev_t for swdevt[], remove struct swdevt 2024-10-30 06:16:27 +00:00
subr_evcount.c Allow counters_read(9) to take an optional scratch buffer. 2023-09-16 09:33:27 +00:00
subr_extent.c Implement extent_alloc_region_with_descr(9) which is the equivalent of 2024-01-19 22:12:24 +00:00
subr_hibernate.c directly use dev_t for swdevt[], remove struct swdevt 2024-10-30 06:16:27 +00:00
subr_kubsan.c Fix KUBSAN by adding invalid builtin detection, as needed by our current clang. 2024-09-06 13:31:59 +00:00
subr_log.c Use a different mutex to protect the kqueue klist in logsoftc. 2024-07-24 13:37:05 +00:00
subr_percpu.c Allow counters_read(9) to take an optional scratch buffer. 2023-09-16 09:33:27 +00:00
subr_poison.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
subr_pool.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
subr_prf.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
subr_prof.c clockintr: switch from callee- to caller-allocated clockintr structs 2024-01-24 19:23:38 +00:00
subr_suspend.c Garbage collect sleep_abort(); it doesn't do anything useful anymore. 2024-05-28 09:40:40 +00:00
subr_tree.c
subr_userconf.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
subr_witness.c Do not crash in witness code if interrupt fires early. 2024-09-25 18:24:13 +00:00
subr_xxx.c
sys_futex.c Remove non-MULTIPROCESSOR chunk defining copyin32 as copyin now that all 2023-08-14 07:42:34 +00:00
sys_generic.c Unlock ptsignal by using the ps_mtx instead of KERNEL_LOCK to ensure 2024-11-05 09:14:19 +00:00
sys_pipe.c Remove KERNEL_LOCK() dance around km_alloc(9) & km_free(9). 2024-10-27 15:42:48 +00:00
sys_process.c remove unneeded fpu.h include to unbreak the build on archs without it 2024-11-27 12:29:14 +00:00
sys_socket.c Lock send socket buffer for fstat syscall. 2024-11-10 13:03:22 +00:00
syscalls.c regen 2024-08-02 14:35:56 +00:00
syscalls.master Push kernel lock down to sysctl(2). 2024-08-02 14:34:45 +00:00
sysv_ipc.c
sysv_msg.c fix double words in comments 2023-04-11 00:45:06 +00:00
sysv_sem.c change format strings to fix SEM_DEBUG build 2024-07-09 04:42:48 +00:00
sysv_shm.c Prevent a double free by unlinking the descriptor before unmaping & freeing it. 2024-11-05 15:34:30 +00:00
tty_conf.c
tty_endrun.c
tty_msts.c
tty_nmea.c Update an old comment 2022-04-02 22:45:18 +00:00
tty_pty.c remove VATTR_NULL() define, directly call vattr_null() 2024-11-05 06:03:19 +00:00
tty_subr.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
tty_tty.c Use ps_ppid instead of ps_pptr->ps_pid in all places. 2024-09-30 12:32:26 +00:00
tty.c Rework per proc and per process time usage accounting 2024-07-08 13:17:11 +00:00
uipc_domain.c Introduce PR_MPSYSCTL flag to mark mp-safe (*pr_sysctl)() handlers and 2024-08-16 09:20:34 +00:00
uipc_mbuf2.c In m_pulldown() replace memmove() with memcpy(). 2024-08-29 16:42:30 +00:00
uipc_mbuf.c Use atomic load and store operations for sbchecklowmem(). 2024-11-06 14:37:45 +00:00
uipc_proto.c Split out handlers for SOCK_DGRAM unix(4) sockets from SOCK_STREAM and 2022-11-13 16:01:32 +00:00
uipc_socket2.c Use atomic load and store operations for sbchecklowmem(). 2024-11-06 14:37:45 +00:00
uipc_socket.c Use read once in socket filter functions. 2024-11-08 21:47:03 +00:00
uipc_syscalls.c Unlock ptsignal by using the ps_mtx instead of KERNEL_LOCK to ensure 2024-11-05 09:14:19 +00:00
uipc_usrreq.c remove VATTR_NULL() define, directly call vattr_null() 2024-11-05 06:03:19 +00:00
vfs_bio.c Return the number of freed pages in bufbackoff(). 2024-11-05 17:28:31 +00:00
vfs_biomem.c Return the number of freed pages in bufbackoff(). 2024-11-05 17:28:31 +00:00
vfs_cache.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
vfs_default.c vgone() is vgonel() with curproc as 2nd argument. Use vgonel() like the 2022-04-27 14:52:25 +00:00
vfs_getcwd.c zap a pile of dangling tabs 2022-12-05 23:18:37 +00:00
vfs_init.c Drop MNT_LOCAL flag in corresponding `vfsconflist' fuse(4) entry instead 2024-05-20 09:11:21 +00:00
vfs_lockf.c remove unneeded includes in sys/kern 2022-08-14 01:58:27 +00:00
vfs_lookup.c Replace last user of copystr() with strlcpy(). NFCI 2023-01-06 19:08:36 +00:00
vfs_subr.c Unlock fs_sysctl(). It is the only `suid_clear' variable - atomically 2024-10-31 10:06:51 +00:00
vfs_sync.c Put the bowels of the various VOP_PRINT routines under 2024-10-18 05:52:32 +00:00
vfs_syscalls.c remove VATTR_NULL() define, directly call vattr_null() 2024-11-05 06:03:19 +00:00
vfs_vnops.c remove VATTR_NULL() define, directly call vattr_null() 2024-11-05 06:03:19 +00:00
vfs_vops.c Put the bowels of the various VOP_PRINT routines under 2024-10-18 05:52:32 +00:00