From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbbINW4R (ORCPT ); Mon, 14 Sep 2015 18:56:17 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34763 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbbINWvH (ORCPT ); Mon, 14 Sep 2015 18:51:07 -0400 From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com Cc: viro@zeniv.linux.org.uk Cc: ast@plumgrid.com Cc: aishchuk@linux.vnet.ibm.com Cc: aarcange@redhat.com Cc: akpm@linux-foundation.org Cc: luto@kernel.org Cc: acme@kernel.org Cc: bhe@redhat.com Cc: 3chas3@gmail.com Cc: chris@zankel.net Cc: dave@sr71.net Cc: dyoung@redhat.com Cc: drysdale@google.com Cc: davem@davemloft.net Cc: ebiederm@xmission.com Cc: geoff@infradead.org Cc: gregkh@linuxfoundation.org Cc: hpa@zytor.com Cc: mingo@kernel.org Cc: iulia.manda21@gmail.com Cc: plagnioj@jcrosoft.com Cc: jikos@kernel.org Cc: josh@joshtriplett.org Cc: kexec@lists.infradead.org Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: mathieu.desnoyers@efficios.com Cc: jcmvbkbc@gmail.com Cc: paulmck@linux.vnet.ibm.com Cc: a.p.zijlstra@chello.nl Cc: tglx@linutronix.de Cc: tomi.valkeinen@ti.com Cc: vgoyal@redhat.com Cc: x86@kernel.org Cc: Palmer Dabbelt Subject: [PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Date: Mon, 14 Sep 2015 15:50:36 -0700 Message-Id: <1442271047-4908-3-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1442271047-4908-1-git-send-email-palmer@dabbelt.com> References: <1441832902-28993-1-git-send-email-palmer@dabbelt.com> <1442271047-4908-1-git-send-email-palmer@dabbelt.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I think this change actually doesn't do anything: __NR_fork was still being defined either way, and on my machine fork() in comes from libc. This just moves to the standard mechanism for defining syscalls that aren't implemented instead, which has the side-effect of no longer having an #ifdef CONFIG_* in a user-visible header. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- include/uapi/asm-generic/unistd.h | 4 ---- kernel/sys_ni.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 8da542a2874d..21689284360b 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -867,11 +867,7 @@ __SYSCALL(__NR_uselib, sys_uselib) __SYSCALL(__NR__sysctl, sys_sysctl) #define __NR_fork 1079 -#ifdef CONFIG_MMU __SYSCALL(__NR_fork, sys_fork) -#else -__SYSCALL(__NR_fork, sys_ni_syscall) -#endif /* CONFIG_MMU */ #undef __NR_syscalls #define __NR_syscalls (__NR_fork+1) diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index a02decf15583..c830f7f9e36d 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -174,6 +174,7 @@ cond_syscall(sys_setfsuid); cond_syscall(sys_setfsgid); cond_syscall(sys_capget); cond_syscall(sys_capset); +cond_syscall(sys_fork); /* arch-specific weak syscall entries */ cond_syscall(sys_pciconfig_read); -- 2.4.6