NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/52117 CVS commit: src/tests/kernel



The following reply was made to PR kern/52117; it has been noted by GNATS.

From: "Kamil Rytarowski" <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: PR/52117 CVS commit: src/tests/kernel
Date: Tue, 28 Mar 2017 16:47:27 +0200

 > Sent: Tuesday, March 28, 2017 at 4:40 PM
 > From: "Martin Husemann" <martin%duskware.de@localhost>
 > To: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, n54%gmx.com@localhost
 > Subject: Re: PR/52117 CVS commit: src/tests/kernel
 >
 > The following reply was made to PR kern/52117; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: PR/52117 CVS commit: src/tests/kernel
 > Date: Tue, 28 Mar 2017 16:35:15 +0200
 > 
 >  Not sure I understand all contstraints, and this is completely untested,
 >  but maybe as a base for discussions/testing: could you try this patch
 >  and see if it still works on x86 ?
 >  
 >  Martin
 >  
 >  Index: kern/kern_fork.c
 >  ===================================================================
 >  RCS file: /cvsroot/src/sys/kern/kern_fork.c,v
 >  retrieving revision 1.199
 >  diff -u -p -r1.199 kern_fork.c
 >  --- kern/kern_fork.c	13 Jan 2017 23:00:35 -0000	1.199
 >  +++ kern/kern_fork.c	28 Mar 2017 14:33:30 -0000
 >  @@ -464,6 +464,17 @@ fork1(struct lwp *l1, int flags, int exi
 >   	 */
 >   	mutex_enter(proc_lock);
 >   
 >  +
 >  +	/* If it is traced, signal the tracer */
 >  +	if (p2->p_slflag & PSL_TRACED) {
 >  +		ksiginfo_t ksi;
 >  +
 >  +                KSI_INIT_EMPTY(&ksi);
 >  +                ksi.ksi_signo = SIGTRAP;
 >  +                ksi.ksi_lid = l2->l_lid;
 >  +                kpsignal(p2, &ksi, NULL);
 >  +	}
 >  +
 >   	if (p1->p_session->s_ttyvp != NULL && p1->p_lflag & PL_CONTROLT)
 >   		p2->p_lflag |= PL_CONTROLT;
 >   
 >  Index: arch/x86/x86/syscall.c
 >  ===================================================================
 >  RCS file: /cvsroot/src/sys/arch/x86/x86/syscall.c,v
 >  retrieving revision 1.14
 >  diff -u -p -r1.14 syscall.c
 >  --- arch/x86/x86/syscall.c	7 Jul 2016 06:55:40 -0000	1.14
 >  +++ arch/x86/x86/syscall.c	28 Mar 2017 14:33:30 -0000
 >  @@ -65,18 +65,6 @@ child_return(void *arg)
 >   {
 >   	struct lwp *l = arg;
 >   	struct trapframe *tf = l->l_md.md_regs;
 >  -	struct proc *p = l->l_proc;
 >  -
 >  -	if (p->p_slflag & PSL_TRACED) {
 >  -		ksiginfo_t ksi;
 >  -
 >  -		mutex_enter(proc_lock);
 >  -                KSI_INIT_EMPTY(&ksi);
 >  -                ksi.ksi_signo = SIGTRAP;
 >  -                ksi.ksi_lid = l->l_lid;
 >  -                kpsignal(p, &ksi, NULL);
 >  -		mutex_exit(proc_lock);
 >  -	}
 >   
 >   	X86_TF_RAX(tf) = 0;
 >   	X86_TF_RFLAGS(tf) &= ~PSL_C;
 >  
 > 
 
 I will give it a try and try to research a proper solution.
 


Home | Main Index | Thread Index | Old Index