linux-next: manual merge of the security tree with the vfs-brauner tree

From: Stephen Rothwell
Date: Sun Nov 19 2023 - 22:31:27 EST


Hi all,

Today's linux-next merge of the security tree got conflicts in:

arch/alpha/kernel/syscalls/syscall.tbl
arch/arm/tools/syscall.tbl
arch/arm64/include/asm/unistd32.h
arch/m68k/kernel/syscalls/syscall.tbl
arch/microblaze/kernel/syscalls/syscall.tbl
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_n64.tbl
arch/mips/kernel/syscalls/syscall_o32.tbl
arch/parisc/kernel/syscalls/syscall.tbl
arch/powerpc/kernel/syscalls/syscall.tbl
arch/s390/kernel/syscalls/syscall.tbl
arch/sh/kernel/syscalls/syscall.tbl
arch/sparc/kernel/syscalls/syscall.tbl
arch/x86/entry/syscalls/syscall_32.tbl
arch/x86/entry/syscalls/syscall_64.tbl
arch/xtensa/kernel/syscalls/syscall.tbl
include/uapi/asm-generic/unistd.h

between commit:

9fa5392c080e ("wire up syscalls for statmount/listmount")

from the vfs-brauner tree and commit:

5f42375904b0 ("LSM: wireup Linux Security Module syscalls")

from the security tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

I also needed this merge fix patch (the former commit neglected to
update this file).

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 20 Nov 2023 14:27:19 +1100
Subject: [PATCH] fix up for "LSM: wireup Linux Security Module syscalls"

interacting with commit "wire up syscalls for statmount/listmount"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
arch/arm64/include/asm/unistd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index abe10a833fcd..491b2b9bd553 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -39,7 +39,7 @@
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)

-#define __NR_compat_syscalls 460
+#define __NR_compat_syscalls 462
#endif

#define __ARCH_WANT_SYS_CLONE
--
2.40.1

--
Cheers,
Stephen Rothwell

diff --cc arch/alpha/kernel/syscalls/syscall.tbl
index 186e785f5b56,b04af0c9fcbc..000000000000
--- a/arch/alpha/kernel/syscalls/syscall.tbl
+++ b/arch/alpha/kernel/syscalls/syscall.tbl
@@@ -496,5 -496,6 +496,8 @@@
564 common futex_wake sys_futex_wake
565 common futex_wait sys_futex_wait
566 common futex_requeue sys_futex_requeue
-567 common lsm_get_self_attr sys_lsm_get_self_attr
-568 common lsm_set_self_attr sys_lsm_set_self_attr
-569 common lsm_list_modules sys_lsm_list_modules
+567 common statmount sys_statmount
+568 common listmount sys_listmount
++569 common lsm_get_self_attr sys_lsm_get_self_attr
++570 common lsm_set_self_attr sys_lsm_set_self_attr
++571 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/arm/tools/syscall.tbl
index d6a324dbff2e,43313beefae7..000000000000
--- a/arch/arm/tools/syscall.tbl
+++ b/arch/arm/tools/syscall.tbl
@@@ -470,5 -470,6 +470,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/arm64/include/asm/unistd32.h
index 8a191423c316,ab1a7c2b6653..000000000000
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@@ -919,10 -919,12 +919,16 @@@ __SYSCALL(__NR_futex_wake, sys_futex_wa
__SYSCALL(__NR_futex_wait, sys_futex_wait)
#define __NR_futex_requeue 456
__SYSCALL(__NR_futex_requeue, sys_futex_requeue)
-#define __NR_lsm_get_self_attr 457
+#define __NR_statmount 457
+__SYSCALL(__NR_statmount, sys_statmount)
+#define __NR_listmount 458
+__SYSCALL(__NR_listmount, sys_listmount)
++#define __NR_lsm_get_self_attr 459
+ __SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr)
-#define __NR_lsm_set_self_attr 458
++#define __NR_lsm_set_self_attr 460
+ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
-#define __NR_lsm_list_modules 459
++#define __NR_lsm_list_modules 461
+ __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)

/*
* Please add new compat syscalls above this comment and update
diff --cc arch/m68k/kernel/syscalls/syscall.tbl
index 37db1a810b67,90629ffc6732..000000000000
--- a/arch/m68k/kernel/syscalls/syscall.tbl
+++ b/arch/m68k/kernel/syscalls/syscall.tbl
@@@ -456,5 -456,6 +456,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/microblaze/kernel/syscalls/syscall.tbl
index 07fff5ad1c9c,c395dece73b4..000000000000
--- a/arch/microblaze/kernel/syscalls/syscall.tbl
+++ b/arch/microblaze/kernel/syscalls/syscall.tbl
@@@ -462,5 -462,6 +462,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/mips/kernel/syscalls/syscall_n32.tbl
index 134ea054b1c7,4a876c4e77d6..000000000000
--- a/arch/mips/kernel/syscalls/syscall_n32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
@@@ -395,5 -395,6 +395,8 @@@
454 n32 futex_wake sys_futex_wake
455 n32 futex_wait sys_futex_wait
456 n32 futex_requeue sys_futex_requeue
-457 n32 lsm_get_self_attr sys_lsm_get_self_attr
-458 n32 lsm_set_self_attr sys_lsm_set_self_attr
-459 n32 lsm_list_modules sys_lsm_list_modules
+457 n32 statmount sys_statmount
+458 n32 listmount sys_listmount
++459 n32 lsm_get_self_attr sys_lsm_get_self_attr
++460 n32 lsm_set_self_attr sys_lsm_set_self_attr
++461 n32 lsm_list_modules sys_lsm_list_modules
diff --cc arch/mips/kernel/syscalls/syscall_n64.tbl
index 959a21664703,b74c8571f063..000000000000
--- a/arch/mips/kernel/syscalls/syscall_n64.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
@@@ -371,5 -371,6 +371,8 @@@
454 n64 futex_wake sys_futex_wake
455 n64 futex_wait sys_futex_wait
456 n64 futex_requeue sys_futex_requeue
-457 n64 lsm_get_self_attr sys_lsm_get_self_attr
-458 n64 lsm_set_self_attr sys_lsm_set_self_attr
-459 n64 lsm_list_modules sys_lsm_list_modules
+457 n64 statmount sys_statmount
+458 n64 listmount sys_listmount
++459 n64 lsm_get_self_attr sys_lsm_get_self_attr
++460 n64 lsm_set_self_attr sys_lsm_set_self_attr
++461 n64 lsm_list_modules sys_lsm_list_modules
diff --cc arch/mips/kernel/syscalls/syscall_o32.tbl
index e55bc1d4bf0f,bf41906e1f68..000000000000
--- a/arch/mips/kernel/syscalls/syscall_o32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
@@@ -444,5 -444,6 +444,8 @@@
454 o32 futex_wake sys_futex_wake
455 o32 futex_wait sys_futex_wait
456 o32 futex_requeue sys_futex_requeue
-457 o32 lsm_get_self_attr sys_lsm_get_self_attr
-458 032 lsm_set_self_attr sys_lsm_set_self_attr
-459 o32 lsm_list_modules sys_lsm_list_modules
+457 o32 statmount sys_statmount
+458 o32 listmount sys_listmount
++459 o32 lsm_get_self_attr sys_lsm_get_self_attr
++460 032 lsm_set_self_attr sys_lsm_set_self_attr
++461 o32 lsm_list_modules sys_lsm_list_modules
diff --cc arch/parisc/kernel/syscalls/syscall.tbl
index 9c84470c31c7,ccc0a679e774..000000000000
--- a/arch/parisc/kernel/syscalls/syscall.tbl
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@@ -455,5 -455,6 +455,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/powerpc/kernel/syscalls/syscall.tbl
index 6988ecbc316e,a6f37e2333cb..000000000000
--- a/arch/powerpc/kernel/syscalls/syscall.tbl
+++ b/arch/powerpc/kernel/syscalls/syscall.tbl
@@@ -543,5 -543,6 +543,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/s390/kernel/syscalls/syscall.tbl
index 5f5cd20ebb34,4b818e9ee832..000000000000
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@@ -459,5 -459,6 +459,8 @@@
454 common futex_wake sys_futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount sys_statmount
+458 common listmount sys_listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules
diff --cc arch/sh/kernel/syscalls/syscall.tbl
index 3103ebd2e4cb,1a3d88d1a07f..000000000000
--- a/arch/sh/kernel/syscalls/syscall.tbl
+++ b/arch/sh/kernel/syscalls/syscall.tbl
@@@ -459,5 -459,6 +459,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/sparc/kernel/syscalls/syscall.tbl
index ba147d7ad19a,e0e8cec62358..000000000000
--- a/arch/sparc/kernel/syscalls/syscall.tbl
+++ b/arch/sparc/kernel/syscalls/syscall.tbl
@@@ -502,5 -502,6 +502,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc arch/x86/entry/syscalls/syscall_32.tbl
index 56e6c2f3ee9c,6e45e693f339..000000000000
--- a/arch/x86/entry/syscalls/syscall_32.tbl
+++ b/arch/x86/entry/syscalls/syscall_32.tbl
@@@ -461,5 -461,6 +461,8 @@@
454 i386 futex_wake sys_futex_wake
455 i386 futex_wait sys_futex_wait
456 i386 futex_requeue sys_futex_requeue
-457 i386 lsm_get_self_attr sys_lsm_get_self_attr
-458 i386 lsm_set_self_attr sys_lsm_set_self_attr
-459 i386 lsm_list_modules sys_lsm_list_modules
+457 i386 statmount sys_statmount
+458 i386 listmount sys_listmount
++459 i386 lsm_get_self_attr sys_lsm_get_self_attr
++460 i386 lsm_set_self_attr sys_lsm_set_self_attr
++461 i386 lsm_list_modules sys_lsm_list_modules
diff --cc arch/x86/entry/syscalls/syscall_64.tbl
index 3a22eef585c2,d3b41d059d4d..000000000000
--- a/arch/x86/entry/syscalls/syscall_64.tbl
+++ b/arch/x86/entry/syscalls/syscall_64.tbl
@@@ -378,8 -378,9 +378,11 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules

#
# Due to a historical design error, certain syscalls are numbered differently
diff --cc arch/xtensa/kernel/syscalls/syscall.tbl
index 497b5d32f457,284784ea5a46..000000000000
--- a/arch/xtensa/kernel/syscalls/syscall.tbl
+++ b/arch/xtensa/kernel/syscalls/syscall.tbl
@@@ -427,5 -427,6 +427,8 @@@
454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue
-457 common lsm_get_self_attr sys_lsm_get_self_attr
-458 common lsm_set_self_attr sys_lsm_set_self_attr
-459 common lsm_list_modules sys_lsm_list_modules
+457 common statmount sys_statmount
+458 common listmount sys_listmount
++459 common lsm_get_self_attr sys_lsm_get_self_attr
++460 common lsm_set_self_attr sys_lsm_set_self_attr
++461 common lsm_list_modules sys_lsm_list_modules
diff --cc include/uapi/asm-generic/unistd.h
index b67b18e71fbd,55cc0bcfb58d..000000000000
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@@ -829,14 -829,15 +829,21 @@@ __SYSCALL(__NR_futex_wait, sys_futex_wa
#define __NR_futex_requeue 456
__SYSCALL(__NR_futex_requeue, sys_futex_requeue)

-#define __NR_lsm_get_self_attr 457
+#define __NR_statmount 457
+__SYSCALL(__NR_statmount, sys_statmount)
+
+#define __NR_listmount 458
+__SYSCALL(__NR_listmount, sys_listmount)
+
++#define __NR_lsm_get_self_attr 459
+ __SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr)
-#define __NR_lsm_set_self_attr 458
++#define __NR_lsm_set_self_attr 460
+ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
-#define __NR_lsm_list_modules 459
++#define __NR_lsm_list_modules 461
+ __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
+
#undef __NR_syscalls
- #define __NR_syscalls 459
-#define __NR_syscalls 460
++#define __NR_syscalls 462

/*
* 32 bit systems traditionally used different

Attachment: pgpyM3kppEE38.pgp
Description: OpenPGP digital signature