Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

asm-generic: Drop renameat syscall from default list

The newer renameat2 syscall provides all the functionality provided by
the renameat syscall and adds flags, so future architectures won't need
to include renameat.

Therefore drop the renameat syscall from the generic syscall list unless
__ARCH_WANT_RENAMEAT is defined by the architecture's unistd.h prior to
including asm-generic/unistd.h, and adjust all architectures using the
generic syscall list to define it so that no in-tree architectures are
affected.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: linux-c6x-dev@linux-c6x.org
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Cc: Jonas Bonn <jonas@southpole.se>
Cc: linux@lists.openrisc.net
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: nios2-dev@lists.rocketboards.org
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

James Hogan and committed by
Arnd Bergmann
b0da6d44 1f93e9f2

+20
+1
arch/arc/include/uapi/asm/unistd.h
··· 15 15 #if !defined(_UAPI_ASM_ARC_UNISTD_H) || defined(__SYSCALL) 16 16 #define _UAPI_ASM_ARC_UNISTD_H 17 17 18 + #define __ARCH_WANT_RENAMEAT 18 19 #define __ARCH_WANT_SYS_EXECVE 19 20 #define __ARCH_WANT_SYS_CLONE 20 21 #define __ARCH_WANT_SYS_VFORK
+3
arch/arm64/include/uapi/asm/unistd.h
··· 13 13 * You should have received a copy of the GNU General Public License 14 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 15 */ 16 + 17 + #define __ARCH_WANT_RENAMEAT 18 + 16 19 #include <asm-generic/unistd.h>
+1
arch/c6x/include/uapi/asm/unistd.h
··· 14 14 * more details. 15 15 */ 16 16 17 + #define __ARCH_WANT_RENAMEAT 17 18 #define __ARCH_WANT_SYS_CLONE 18 19 19 20 /* Use the standard ABI for syscalls. */
+2
arch/h8300/include/uapi/asm/unistd.h
··· 1 1 #define __ARCH_NOMMU 2 2 3 + #define __ARCH_WANT_RENAMEAT 4 + 3 5 #include <asm-generic/unistd.h>
+1
arch/hexagon/include/uapi/asm/unistd.h
··· 27 27 */ 28 28 29 29 #define sys_mmap2 sys_mmap_pgoff 30 + #define __ARCH_WANT_RENAMEAT 30 31 #define __ARCH_WANT_SYS_EXECVE 31 32 #define __ARCH_WANT_SYS_CLONE 32 33 #define __ARCH_WANT_SYS_VFORK
+2
arch/metag/include/uapi/asm/unistd.h
··· 7 7 * (at your option) any later version. 8 8 */ 9 9 10 + #define __ARCH_WANT_RENAMEAT 11 + 10 12 /* Use the standard ABI for syscalls. */ 11 13 #include <asm-generic/unistd.h> 12 14
+2
arch/nios2/include/uapi/asm/unistd.h
··· 17 17 18 18 #define sys_mmap2 sys_mmap_pgoff 19 19 20 + #define __ARCH_WANT_RENAMEAT 21 + 20 22 /* Use the standard ABI for syscalls */ 21 23 #include <asm-generic/unistd.h> 22 24
+1
arch/openrisc/include/uapi/asm/unistd.h
··· 20 20 21 21 #define sys_mmap2 sys_mmap_pgoff 22 22 23 + #define __ARCH_WANT_RENAMEAT 23 24 #define __ARCH_WANT_SYS_FORK 24 25 #define __ARCH_WANT_SYS_CLONE 25 26
+1
arch/score/include/uapi/asm/unistd.h
··· 1 1 #define __ARCH_HAVE_MMU 2 2 3 + #define __ARCH_WANT_RENAMEAT 3 4 #define __ARCH_WANT_SYSCALL_NO_AT 4 5 #define __ARCH_WANT_SYSCALL_NO_FLAGS 5 6 #define __ARCH_WANT_SYSCALL_OFF_T
+1
arch/tile/include/uapi/asm/unistd.h
··· 12 12 * more details. 13 13 */ 14 14 15 + #define __ARCH_WANT_RENAMEAT 15 16 #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) 16 17 /* Use the flavor of this syscall that matches the 32-bit API better. */ 17 18 #define __ARCH_WANT_SYNC_FILE_RANGE2
+2
arch/unicore32/include/uapi/asm/unistd.h
··· 10 10 * published by the Free Software Foundation. 11 11 */ 12 12 13 + #define __ARCH_WANT_RENAMEAT 14 + 13 15 /* Use the standard ABI for syscalls. */ 14 16 #include <asm-generic/unistd.h> 15 17 #define __ARCH_WANT_SYS_CLONE
+3
include/uapi/asm-generic/unistd.h
··· 127 127 __SYSCALL(__NR_symlinkat, sys_symlinkat) 128 128 #define __NR_linkat 37 129 129 __SYSCALL(__NR_linkat, sys_linkat) 130 + #ifdef __ARCH_WANT_RENAMEAT 131 + /* renameat is superseded with flags by renameat2 */ 130 132 #define __NR_renameat 38 131 133 __SYSCALL(__NR_renameat, sys_renameat) 134 + #endif /* __ARCH_WANT_RENAMEAT */ 132 135 133 136 /* fs/namespace.c */ 134 137 #define __NR_umount2 39