lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160315233452.GA14523@redhat.com>
Date:	Wed, 16 Mar 2016 00:34:52 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	Dmitry Vyukov <dvyukov@...gle.com>,
	Jan Kratochvil <jan.kratochvil@...hat.com>,
	"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
	Pedro Alves <palves@...hat.com>,
	Roland McGrath <roland@...k.frob.com>,
	syzkaller@...glegroups.com, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] wait: allow sys_waitid() to accept
 __WNOTHREAD/__WCLONE/__WALL

I see no reason why waitid() can't support other linux-specific flags
allowed in sys_wait4().

In particular this change can help if we reconsider the previous change
which adds the "automagical" __WALL for debugger.

Signed-off-by: Oleg Nesterov <oleg@...hat.com>
---
 kernel/exit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index c112abb..9db1f4a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1533,7 +1533,8 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
 	enum pid_type type;
 	long ret;
 
-	if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
+	if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED|
+			__WNOTHREAD|__WCLONE|__WALL))
 		return -EINVAL;
 	if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
 		return -EINVAL;
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ