Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3322089imu; Fri, 18 Jan 2019 08:25:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN4tlOD/eZFV60SqK6TbAqM2sFFgHiU8a0UQw0GEuzLC3UA8npjfG2UqGKYh0jM5ZkGN33dy X-Received: by 2002:a63:3d1:: with SMTP id 200mr18520355pgd.68.1547828750247; Fri, 18 Jan 2019 08:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547828750; cv=none; d=google.com; s=arc-20160816; b=oiuRUhwSmAzuonuYdzfuKC1Wom0Slptrze7iPPCXD0fdILNVxa3uSB6IXk4E4KIZuf rxLRwXevTZ/F3EfJakI2EtM3v7OQgW3KWbnEtDVeDTQ7B68lDxZSqz1eqVDCwhZRWMub nyVrR42PSESUz2xWaI6/TFSi6SPKqBQbHni1RXG4Cd3irckzMM8PZmHNAXSWdpsPvKcg Ii7401oJhMg6h0/I0EetLwFDmt1uAsfYe7N0suOmXW+i/EmD/+py3OCQuTzUwkjJjqOQ rC9BfSk103xP2Be+yK2OK7XgkuyiCw0k8gPWjeZUh4ly3SSUZBaIcP2jAt+7FdDEcBzO xt2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jGOH7l9OPmpRSwgTPGlmqhWdKPzWUPsFxe0YSAInR2k=; b=cu7Ag1OgBE13Gqnpw1ZYXmT9mQwpGnAkSpo/2PAJVvuK+wZlAUgrB0trAiBoXTaunK U1leBSS5AEq3NaS62yMUie1L4mPcuZ0blz3F7J4zO8eKule/TFy+izeD1EWfGZkOSC0Z b/nVb7OZE6x6+kWz//5+oX3Jy8g5SQIZqgObpJGzyAqkkn8ubzef3CRPEW1LS5yw6JIa 0U66jDL1RP3ty8RFAY3Xse2La+B9Gpn1wVcH8pQnseLMhI09b2wZkmgX2aocff5oKFCU HzxylS3wL8p28vu69GgiX00qgNR8N14u327N1uvIVlR/0EXqX4jsrTsTSnZtTzXseR+d Ifgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba9si4675467plb.109.2019.01.18.08.25.34; Fri, 18 Jan 2019 08:25:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728600AbfARQVB (ORCPT + 99 others); Fri, 18 Jan 2019 11:21:01 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:49313 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728537AbfARQU7 (ORCPT ); Fri, 18 Jan 2019 11:20:59 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MZTyi-1gheoB1V02-00WSdJ; Fri, 18 Jan 2019 17:19:37 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Arnd Bergmann , mattst88@gmail.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, tony.luck@intel.com, fenghua.yu@intel.com, geert@linux-m68k.org, monstr@monstr.eu, paul.burton@mips.com, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, dalias@libc.org, davem@davemloft.net, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, jcmvbkbc@gmail.com, akpm@linux-foundation.org, deepa.kernel@gmail.com, ebiederm@xmission.com, firoz.khan@linaro.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 16/29] alpha: add generic get{eg,eu,g,p,u,pp}id() syscalls Date: Fri, 18 Jan 2019 17:18:22 +0100 Message-Id: <20190118161835.2259170-17-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190118161835.2259170-1-arnd@arndb.de> References: <20190118161835.2259170-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:jsOw7NqQKS2zQ2Kn3Rl+vMqYljPTdUEHSKVnWEW+0Z+etDrnxOY fHRBu4AJ2H9ITzOOnIQmu/LvPg6oaokuIwQkItp+qBdIdD7bxckPyZ8Sxs4NOwtEHCSAnUH PATcQhNN+ieYB856u8/+6Y9ZbSsp4EBrFe61HTPJVqvuCuDQ4awBecyCY2Y/F+xR0K6VrtS S0fFIjG7g4/x+H+4JviEg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JL+1HsoFxsM=:cBJFwJBy7OBl33SJgynGOf EmNur2v4677HGSFzkbfaknFA95n0HTqqKB3lK8G36N+kfz/YYAgyNSQ0vsAdfHv8lhYMjGt9p M8WUKHlEr7hakd0YFqTMmYqzuRvf5OQhCO6VJWob6XAwR6tpdkRzOCkrG6G8sfDz0d6VY/hNz upEFggyCa4tZuOyNQJx/K1uvR42DpkBjNILmF7YFo+UwNzmRIGTttYrsBYHTpe1PkzRgVit+r j7SLw9Mb4BkxItIIOg0Qt2c5Oq54DLbA/d+tWgz6QwpjgSfDyguWB8kYlWaqTPuPH9rvSikR/ z5iJ6+Y+g9zoUxtfCYnatVYC9tJKDuimc9MbGNzttROXmBklb/ksFc6NTsXvlop93uHH8kFZW EH8Uk0MtSGHSMNTx7TfNxVjZQD2p41Af7cdpQ0q7LLJMZ12Wiz3jRYV1s++sEe5YekYRPxPzI 0UeWAqx5PBKwf0P5EIiRcD7zYJVp12kr6tChz9H4IAiwv9yHUyveQLYhjbD63KLNdQmOWwgxQ FDoUySY8h2BSH/6fWX31CKmRwF+KPHvEnrGvFcULjAx96+rWzASZopKWtsi/Oj9ONCxHrFK77 zfvU9jlkJIiLbhOXwmibd0u52gtfrTcK5qxrB/RMFagbDTt5V/H0K7p98rbF0qtMgChfmWlw6 9js9moRUD3b7UoD0g2g2uzOd41lIuDs6xFGHIXcYshauq1Q8Mf7vrPy5HgZEfkX3yFqd1V5g5 9v/xHx798WmtLAP2+pB9Fa8UydU7D6olbZ12sQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alpha has traditionally followed the OSF1 calling conventions here, with its getxpid, getxuid, getxgid system calls returning two different values in separate registers. Following what glibc has done here, we can define getpid, getuid and getgid to be aliases for getxpid, getxuid and getxgid respectively, and add new system call numbers for getppid, geteuid and getegid. Signed-off-by: Arnd Bergmann --- arch/alpha/include/asm/unistd.h | 11 ----------- arch/alpha/include/uapi/asm/unistd.h | 5 +++++ arch/alpha/kernel/syscalls/syscall.tbl | 3 +++ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 31ad350b58a0..986f5da9b7d8 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -19,15 +19,4 @@ #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_CLONE -/* - * Ignore legacy syscalls that we don't use. - */ -#define __IGNORE_getegid -#define __IGNORE_geteuid -#define __IGNORE_getgid -#define __IGNORE_getpid -#define __IGNORE_getppid -#define __IGNORE_getuid - - #endif /* _ALPHA_UNISTD_H */ diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index 4507071f995f..71fd5db06866 100644 --- a/arch/alpha/include/uapi/asm/unistd.h +++ b/arch/alpha/include/uapi/asm/unistd.h @@ -7,6 +7,11 @@ #define __NR_umount __NR_umount2 #define __NR_osf_shmat __NR_shmat +/* These return an extra value but can be used as aliases */ +#define __NR_getpid __NR_getxpid +#define __NR_getuid __NR_getxuid +#define __NR_getgid __NR_getxgid + #include #endif /* _UAPI_ALPHA_UNISTD_H */ diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl index 0ebd59fdcb8b..337b8108771a 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl @@ -458,3 +458,6 @@ 527 common rseq sys_rseq 528 common statfs64 sys_statfs64 529 common fstatfs64 sys_fstatfs64 +530 common getegid sys_getegid +531 common geteuid sys_geteuid +532 common getppid sys_getppid -- 2.20.0