[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-current-users
Subject:    compat_linux sigaction broken on monolithic kernel
From:       Arto Huusko <arto.huusko () pp2 ! inet ! fi>
Date:       2008-12-30 18:31:42
Message-ID: 495A690E.7040906 () pp2 ! inet ! fi
[Download RAW message or body]

Hi,

recent sigaction1 changes break at least compat_linux when using
kernel with no options MODULAR: all rt_sigaction syscalls fail
with EINVAL.

compat_linux calls sigaction1 with vers == 0, and when kernel
has no options MODULAR sigaction1() then fails at:

		switch (vers) {
		case 0:
			/* sigcontext, kernel supplied trampoline. */
			if (tramp != NULL || !v0v1valid) {
				return EINVAL;
			}
			break;

I tried the patch below, and it made compat_linux32 work again,
but I'm not sure if it is correct otherwise.

Index: sys_sig.c
===================================================================
RCS file: /cvsroot/src/sys/kern/sys_sig.c,v
retrieving revision 1.20
diff -r1.20 sys_sig.c
383c383,384
< 				return EINVAL;
---
 > 				if (p->p_emul->e_sendsig == sendsig)
 > 					return EINVAL;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic