From patchwork Tue Nov 10 01:30:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7587551 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E22B1C05C6 for ; Tue, 10 Nov 2015 01:38:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3F70205DD for ; Tue, 10 Nov 2015 01:38:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1351E205E1 for ; Tue, 10 Nov 2015 01:38:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752645AbbKJBhs (ORCPT ); Mon, 9 Nov 2015 20:37:48 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33059 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbbKJBbs (ORCPT ); Mon, 9 Nov 2015 20:31:48 -0500 Received: by pabfh17 with SMTP id fh17so217041774pab.0 for ; Mon, 09 Nov 2015 17:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:subject :date:message-id:in-reply-to:references; bh=tqS3fZmYbgjvwpjhTUP/4UZHhhS8X3tE8Vq8qFIC7dw=; b=amnuIYg+s8kKHHbC9+VyiffcCrnkQBYL2PnFahdigik7miMMEFqa/ma1PmA5YY05/J dPRxSKLNVLnew3mHhMboIGjYNKKMyiUfXM8UpmssuZUdG+m4fuTneNrp0ktcynCPeXPC 2kvHwBTZpsHb6p7L3ul6dfFowFzAEM2Tx9Ix4fCOorgM1f0gtm7luGzAMijtQMrsypwB QmUNd97mkx+5ZKSV3wIGIWBBjyVt+Vl8JQDkql0xfgzAbppMe4WjeeGYP28uwcq6JZd4 X0Gj/GEomifobmWjQPaRNcPDivTSwdBVlQurDIvMlyfc1JtizRPULNurqLQQf78/0vgo YvXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:subject:date:message-id:in-reply-to:references; bh=tqS3fZmYbgjvwpjhTUP/4UZHhhS8X3tE8Vq8qFIC7dw=; b=KnWwvA65UZqpcGlDYy6RgeeZTphFBT6srwkllm4aaf3FDd2rzCpNKL0X/IjhW+4cIi XmDu3V/eqtWka8mxJz3Xl13YVWIKW3RnS3FBL2o4SraM4wztvKTOyPcioAoTufrXBk4m 7izp/wce0B/u+8iQfFgWw8yf5G3uYVeS5pZPAj27HwsF252kaWCbqpCyh7ZnNhmBwfTO x/AQpBZ6T3DMagiqt6omf3L7KVCVwheRB7Zk3WTDpAe1IYGpHtCVOrE7obIcQjV0KWVJ uPBByfYsR1924isPvQGbs4yjxb1GTv22+q3RFV4JLBRpSPeNc/0DGQGFB9xsJSUK5IFC AX6A== X-Gm-Message-State: ALoCoQkrbbWxfJodvjr9F26/nSq4YKPfpFHx0A/w0LccLpHV5K9/EEl5vAFL4sqDK4lu8QMskq+D X-Received: by 10.66.118.134 with SMTP id km6mr1636146pab.16.1447119107674; Mon, 09 Nov 2015 17:31:47 -0800 (PST) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id ux3sm606019pac.18.2015.11.09.17.31.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 17:31:47 -0800 (PST) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com To: peterz@infradead.org 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: 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/14] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Date: Mon, 9 Nov 2015 17:30:59 -0800 Message-Id: <1447119071-19392-3-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1447119071-19392-1-git-send-email-palmer@dabbelt.com> References: <1446579994-9937-1-git-send-email-palmer@dabbelt.com> <1447119071-19392-1-git-send-email-palmer@dabbelt.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 1324b02..9a95912 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -871,11 +871,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 0623787..e251b30 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);