Commit 5f423759 authored by Casey Schaufler's avatar Casey Schaufler Committed by Paul Moore

LSM: wireup Linux Security Module syscalls

Wireup lsm_get_self_attr, lsm_set_self_attr and lsm_list_modules
system calls.
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: linux-api@vger.kernel.org
Reviewed-by: default avatarMickaël Salaün <mic@digikod.net>
[PM: forward ported beyond v6.6 due merge window changes]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent ad4aff9e
...@@ -496,3 +496,6 @@ ...@@ -496,3 +496,6 @@
564 common futex_wake sys_futex_wake 564 common futex_wake sys_futex_wake
565 common futex_wait sys_futex_wait 565 common futex_wait sys_futex_wait
566 common futex_requeue sys_futex_requeue 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
...@@ -470,3 +470,6 @@ ...@@ -470,3 +470,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
#define __NR_compat_syscalls 457 #define __NR_compat_syscalls 460
#endif #endif
#define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_CLONE
......
...@@ -919,6 +919,12 @@ __SYSCALL(__NR_futex_wake, sys_futex_wake) ...@@ -919,6 +919,12 @@ __SYSCALL(__NR_futex_wake, sys_futex_wake)
__SYSCALL(__NR_futex_wait, sys_futex_wait) __SYSCALL(__NR_futex_wait, sys_futex_wait)
#define __NR_futex_requeue 456 #define __NR_futex_requeue 456
__SYSCALL(__NR_futex_requeue, sys_futex_requeue) __SYSCALL(__NR_futex_requeue, sys_futex_requeue)
#define __NR_lsm_get_self_attr 457
__SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr)
#define __NR_lsm_set_self_attr 458
__SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
#define __NR_lsm_list_modules 459
__SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
/* /*
* Please add new compat syscalls above this comment and update * Please add new compat syscalls above this comment and update
......
...@@ -456,3 +456,6 @@ ...@@ -456,3 +456,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -462,3 +462,6 @@ ...@@ -462,3 +462,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -395,3 +395,6 @@ ...@@ -395,3 +395,6 @@
454 n32 futex_wake sys_futex_wake 454 n32 futex_wake sys_futex_wake
455 n32 futex_wait sys_futex_wait 455 n32 futex_wait sys_futex_wait
456 n32 futex_requeue sys_futex_requeue 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
...@@ -371,3 +371,6 @@ ...@@ -371,3 +371,6 @@
454 n64 futex_wake sys_futex_wake 454 n64 futex_wake sys_futex_wake
455 n64 futex_wait sys_futex_wait 455 n64 futex_wait sys_futex_wait
456 n64 futex_requeue sys_futex_requeue 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
...@@ -444,3 +444,6 @@ ...@@ -444,3 +444,6 @@
454 o32 futex_wake sys_futex_wake 454 o32 futex_wake sys_futex_wake
455 o32 futex_wait sys_futex_wait 455 o32 futex_wait sys_futex_wait
456 o32 futex_requeue sys_futex_requeue 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
...@@ -455,3 +455,6 @@ ...@@ -455,3 +455,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -543,3 +543,6 @@ ...@@ -543,3 +543,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -459,3 +459,6 @@ ...@@ -459,3 +459,6 @@
454 common futex_wake sys_futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue sys_futex_requeue 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
...@@ -459,3 +459,6 @@ ...@@ -459,3 +459,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -502,3 +502,6 @@ ...@@ -502,3 +502,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -461,3 +461,6 @@ ...@@ -461,3 +461,6 @@
454 i386 futex_wake sys_futex_wake 454 i386 futex_wake sys_futex_wake
455 i386 futex_wait sys_futex_wait 455 i386 futex_wait sys_futex_wait
456 i386 futex_requeue sys_futex_requeue 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
...@@ -378,6 +378,9 @@ ...@@ -378,6 +378,9 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
# #
# Due to a historical design error, certain syscalls are numbered differently # Due to a historical design error, certain syscalls are numbered differently
......
...@@ -427,3 +427,6 @@ ...@@ -427,3 +427,6 @@
454 common futex_wake sys_futex_wake 454 common futex_wake sys_futex_wake
455 common futex_wait sys_futex_wait 455 common futex_wait sys_futex_wait
456 common futex_requeue sys_futex_requeue 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
...@@ -829,8 +829,15 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) ...@@ -829,8 +829,15 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait)
#define __NR_futex_requeue 456 #define __NR_futex_requeue 456
__SYSCALL(__NR_futex_requeue, sys_futex_requeue) __SYSCALL(__NR_futex_requeue, sys_futex_requeue)
#define __NR_lsm_get_self_attr 457
__SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr)
#define __NR_lsm_set_self_attr 458
__SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
#define __NR_lsm_list_modules 459
__SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
#undef __NR_syscalls #undef __NR_syscalls
#define __NR_syscalls 457 #define __NR_syscalls 460
/* /*
* 32 bit systems traditionally used different * 32 bit systems traditionally used different
......
...@@ -367,3 +367,6 @@ ...@@ -367,3 +367,6 @@
450 common set_mempolicy_home_node sys_set_mempolicy_home_node 450 common set_mempolicy_home_node sys_set_mempolicy_home_node
451 n64 cachestat sys_cachestat 451 n64 cachestat sys_cachestat
452 n64 fchmodat2 sys_fchmodat2 452 n64 fchmodat2 sys_fchmodat2
453 n64 lsm_get_self_attr sys_lsm_get_self_attr
454 n64 lsm_set_self_attr sys_lsm_set_self_attr
455 n64 lsm_list_modules sys_lsm_list_modules
...@@ -539,3 +539,6 @@ ...@@ -539,3 +539,6 @@
450 nospu set_mempolicy_home_node sys_set_mempolicy_home_node 450 nospu set_mempolicy_home_node sys_set_mempolicy_home_node
451 common cachestat sys_cachestat 451 common cachestat sys_cachestat
452 common fchmodat2 sys_fchmodat2 452 common fchmodat2 sys_fchmodat2
453 common lsm_get_self_attr sys_lsm_get_self_attr
454 common lsm_set_self_attr sys_lsm_set_self_attr
455 common lsm_list_modules sys_lsm_list_modules
...@@ -455,3 +455,6 @@ ...@@ -455,3 +455,6 @@
450 common set_mempolicy_home_node sys_set_mempolicy_home_node sys_set_mempolicy_home_node 450 common set_mempolicy_home_node sys_set_mempolicy_home_node sys_set_mempolicy_home_node
451 common cachestat sys_cachestat sys_cachestat 451 common cachestat sys_cachestat sys_cachestat
452 common fchmodat2 sys_fchmodat2 sys_fchmodat2 452 common fchmodat2 sys_fchmodat2 sys_fchmodat2
453 common lsm_get_self_attr sys_lsm_get_self_attr sys_lsm_get_self_attr
454 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr
455 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules
...@@ -375,6 +375,9 @@ ...@@ -375,6 +375,9 @@
451 common cachestat sys_cachestat 451 common cachestat sys_cachestat
452 common fchmodat2 sys_fchmodat2 452 common fchmodat2 sys_fchmodat2
453 64 map_shadow_stack sys_map_shadow_stack 453 64 map_shadow_stack sys_map_shadow_stack
454 common lsm_get_self_attr sys_lsm_get_self_attr
455 common lsm_set_self_attr sys_lsm_set_self_attr
456 common lsm_list_modules sys_lsm_list_modules
# #
# Due to a historical design error, certain syscalls are numbered differently # Due to a historical design error, certain syscalls are numbered differently
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment