From patchwork Fri Jan 18 16:18:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 155996 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3440771jaa; Fri, 18 Jan 2019 08:21:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN4APSaFT//2MV1RRf8xbQ0DdNn9ud1mo6ldvEgh1fCFjFGhBG7s6axoRZBvSg3W9qlwVo/w X-Received: by 2002:a62:c683:: with SMTP id x3mr19645151pfk.10.1547828464347; Fri, 18 Jan 2019 08:21:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547828464; cv=none; d=google.com; s=arc-20160816; b=LFJVAGllQnKcZ4lk9zbZvDPVNXDdFzsGE27ctfvU38rTqqwBPW29sBZ8j9sBn2rNN6 7gSRE50SvfbKf4X1dAeiywCBXS5yxKH3pUHx9V+LEMFkjecnCzkS7P0dEuMyPHJ4Sm0D gjR8CQLtlOoLew3MYlopGdy/QL6dUuWtx+hDPjcd21aqprpgCPhfyxNEj45PaCyFLiH8 QlLtYLye2a+dW0ABAcU886S8czPzYEMdzCK7OnuPr3L7wuJzJQHE0wnB/70DNXt2z60K 3gqlEaWG+0VFrq43pPl/3tUYKL7HMTV6qr5Am9tQxNCPHR2WqzyqckNIQY7PMS0Jbj5U jciw== 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 1si4887066plp.114.2019.01.18.08.21.04; Fri, 18 Jan 2019 08:21:04 -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 S1728605AbfARQVB (ORCPT + 13 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 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(-) -- 2.20.0 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