1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys
Konstantin Belousov 888d4d4f86 When vforked child is traced, the debugging events are not generated
until child performs exec().  The behaviour is reasonable when a
debugger is the real parent, because the parent is stopped until
exec(), and sending a debugging event to the debugger would deadlock
both parent and child.

On the other hand, when debugger is not the parent of the vforked
child, not sending debugging signals makes it impossible to debug
across vfork.

Fix the issue by declining generating debug signals only when vfork()
was done and child called ptrace(PT_TRACEME).  Set a new process flag
P_PPTRACE from the attach code for PT_TRACEME, if P_PPWAIT flag is
set, which indicates that the process was created with vfork() and
still did not execed. Check P_PPTRACE from issignal(), instead of
refusing the trace outright for the P_PPWAIT case.  The scope of
P_PPTRACE is exactly contained in the scope of P_PPWAIT.

Found and tested by:  zont
Reviewed by:	pluknet
MFC after:	2 weeks
2013-02-07 15:34:22 +00:00
..
amd64 Compute the number of initial kernel page table pages (NKPT) dynamically. 2013-02-06 04:53:00 +00:00
arm Use and set gpio pin to high to power up usb. 2013-02-06 01:03:13 +00:00
boot * Add the integer div & mod functions and ARM EABI support functions to 2013-02-05 20:03:58 +00:00
bsm
cam Format CDB output as 2 digit hex correcting the length 2013-01-31 14:07:24 +00:00
cddl zfs: fix, improve and re-organize page_lookup and page_unlock 2013-02-03 18:42:20 +00:00
compat Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h 2013-01-29 18:41:30 +00:00
conf allow for large KTR_ENTRIES values by allocating ktr_buf using malloc(9) 2013-02-03 09:57:39 +00:00
contrib Merge two bug fixes from the vendor branch. 2013-01-28 20:37:32 +00:00
crypto
ddb
dev This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
fs Stop translating the ERESTART error from the open(2) into EINTR. 2013-02-07 14:53:33 +00:00
gdb
geom g_mirror: g_getattr() failure should not be fatal 2013-01-26 10:50:04 +00:00
gnu/fs
i386 cpususpend_handler: mark AP as resumed only after fully setting up lapic 2013-02-02 12:04:32 +00:00
ia64
isa
kern When vforked child is traced, the debugging events are not generated 2013-02-07 15:34:22 +00:00
kgssapi
libkern Add __aeabi_ulcmp to allow building of the LINT kernel. 2013-01-23 09:18:18 +00:00
mips Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
modules Allow IEEE80211_SUPPORT_SUPERG to be defined _and_ have a working wlan 2013-02-02 02:00:29 +00:00
net This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
net80211 Wrap this in an #ifdef so IEEE80211_SUPPORT_SUPERG will work correctly 2013-02-02 02:00:10 +00:00
netatalk
netgraph ng_ether_ifnet_arrival_event: check interface type before using IFP2NG 2013-02-04 17:29:13 +00:00
netinet Add placeholder constants to reserve a portion of the socket option 2013-02-01 15:32:20 +00:00
netinet6 Generate lle_event in the IPv6 neighbor discovery code too. 2013-01-26 00:05:22 +00:00
netipsec
netipx
netnatm
netncp
netpfil
netsmb
nfs Remove the unused nfs_curusec(). 2013-01-17 19:03:24 +00:00
nfsclient Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
nfsserver Use vfs_timestamp() to set file timestamps rather than invoking 2013-01-18 18:43:38 +00:00
nlm
ofed This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
opencrypto
pc98 Remove support for plip from the GENERIC kernel as no systems in the 2013-02-01 20:17:11 +00:00
pci Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the 2013-01-28 19:38:13 +00:00
powerpc
rpc
security Add AUDIT_ARG_SOCKADDR() macro so we can start using the audit_arg_sockaddr() 2013-02-07 00:24:23 +00:00
sparc64 Remove support for plip from the GENERIC kernel as no systems in the 2013-02-01 20:17:11 +00:00
sys When vforked child is traced, the debugging events are not generated 2013-02-07 15:34:22 +00:00
teken
tools
ufs UFS: Remove dead assignment. 2013-02-03 21:30:02 +00:00
vm Try to improve r242655 take III: move these SYSCTLs describing the kernel 2013-02-04 09:35:48 +00:00
x86 x86 suspend/resume: suspend pics and pseudo-pics in reverse order 2013-02-02 12:02:42 +00:00
xdr
xen
Makefile