History

Merge branch 'exit-cleanups-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull exit cleanups from Eric Biederman: "In preparation of doing something about PTRACE_EVENT_EXIT I have started cleaning up various pieces of code related to do_exit. Most of that code I did not manage to get tested and reviewed before the merge window opened but a handful of very useful cleanups are ready to be merged. The first change is simply the removal of the bdflush system call. The code has now been disabled long enough that even the oldest userspace working userspace setups anyone can find to test are fine with the bdflush system call being removed. Changing m68k fsp040_die to use force_sigsegv(SIGSEGV) instead of calling do_exit directly is interesting only in that it is nearly the most difficult of the incorrect uses of do_exit to remove. The change to the seccomp code to simply send a signal instead of calling do_coredump directly is a very nice little cleanup made possible by realizing the existing signal sending helpers were missing a little bit of functionality that is easy to provide" * 'exit-cleanups-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal/seccomp: Dump core when there is only one live thread signal/seccomp: Refactor seccomp signal and coredump generation signal/m68k: Use force_sigsegv(SIGSEGV) in fpsp040_die exit/bdflush: Remove the deprecated bdflush system call

Linus Torvalds committed 5 years ago

Commit bcfeebb2 parents 4898370 d21918e25 files · +53 −87Browse files

Unified · Split

25 files
  1. arch/alpha/kernel/syscalls/syscall.tbl +1 −1
  2. arch/arm/tools/syscall.tbl +1 −1
  3. arch/arm64/include/asm/unistd32.h +1 −1
  4. arch/ia64/kernel/syscalls/syscall.tbl +1 −1
  5. arch/m68k/fpsp040/skeleton.S +2 −1
  6. arch/m68k/kernel/syscalls/syscall.tbl +1 −1
  7. arch/m68k/kernel/traps.c +1 −1
  8. arch/microblaze/kernel/syscalls/syscall.tbl +1 −1
  9. arch/mips/kernel/syscalls/syscall_o32.tbl +1 −1
  10. arch/parisc/kernel/syscalls/syscall.tbl +1 −1
  11. arch/powerpc/kernel/syscalls/syscall.tbl +1 −1
  12. arch/s390/kernel/syscalls/syscall.tbl +1 −1
  13. arch/sh/kernel/syscalls/syscall.tbl +1 −1
  14. arch/sparc/kernel/syscalls/syscall.tbl +1 −1
  15. arch/x86/entry/syscalls/syscall_32.tbl +1 −1
  16. arch/xtensa/kernel/syscalls/syscall.tbl +1 −1
  17. fs/buffer.c +0 −27
  18. include/linux/sched/signal.h +1 −0
  19. include/linux/syscalls.h +0 −1
  20. include/uapi/linux/capability.h +0 −1
  21. kernel/seccomp.c +7 −35
  22. kernel/signal.c +26 −4
  23. kernel/sys_ni.c +0 −1
  24. tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +1 −1
  25. tools/perf/arch/s390/entry/syscalls/syscall.tbl +1 −1
arch/alpha/kernel/syscalls/syscall.tbl+1−1
@@ -230,7 +230,7 @@ · 229 unmodified lines
230259 common osf_swapctl sys_ni_syscall230259 common osf_swapctl sys_ni_syscall
231260 common osf_memcntl sys_ni_syscall231260 common osf_memcntl sys_ni_syscall
232261 common osf_fdatasync sys_ni_syscall232261 common osf_fdatasync sys_ni_syscall
233300 common bdflush sys_bdflush233300 common bdflush sys_ni_syscall
234301 common sethae sys_sethae234301 common sethae sys_sethae
235302 common mount sys_mount235302 common mount sys_mount
236303 common old_adjtimex sys_old_adjtimex236303 common old_adjtimex sys_old_adjtimex
arch/arm/tools/syscall.tbl+1−1
@@ -147,7 +147,7 @@ · 146 unmodified lines
147131 common quotactl sys_quotactl147131 common quotactl sys_quotactl
148132 common getpgid sys_getpgid148132 common getpgid sys_getpgid
149133 common fchdir sys_fchdir149133 common fchdir sys_fchdir
150134 common bdflush sys_bdflush150134 common bdflush sys_ni_syscall
151135 common sysfs sys_sysfs151135 common sysfs sys_sysfs
152136 common personality sys_personality152136 common personality sys_personality
153# 137 was sys_afs_syscall153# 137 was sys_afs_syscall
arch/arm64/include/asm/unistd32.h+1−1
@@ -279,7 +279,7 @@ __SYSCALL(__NR_getpgid, sys_getpgid) · 278 unmodified lines
279#define __NR_fchdir 133279#define __NR_fchdir 133
280__SYSCALL(__NR_fchdir, sys_fchdir)280__SYSCALL(__NR_fchdir, sys_fchdir)
281#define __NR_bdflush 134281#define __NR_bdflush 134
282__SYSCALL(__NR_bdflush, sys_bdflush)282__SYSCALL(__NR_bdflush, sys_ni_syscall)
283#define __NR_sysfs 135283#define __NR_sysfs 135
284__SYSCALL(__NR_sysfs, sys_sysfs)284__SYSCALL(__NR_sysfs, sys_sysfs)
285#define __NR_personality 136285#define __NR_personality 136
arch/ia64/kernel/syscalls/syscall.tbl+1−1
@@ -123,7 +123,7 @@ · 122 unmodified lines
123# 1135 was get_kernel_syms123# 1135 was get_kernel_syms
124# 1136 was query_module124# 1136 was query_module
125113 common quotactl sys_quotactl125113 common quotactl sys_quotactl
126114 common bdflush sys_bdflush126114 common bdflush sys_ni_syscall
127115 common sysfs sys_sysfs127115 common sysfs sys_sysfs
128116 common personality sys_personality128116 common personality sys_personality
129117 common afs_syscall sys_ni_syscall129117 common afs_syscall sys_ni_syscall
arch/m68k/fpsp040/skeleton.S+2−1
@@ -502,7 +502,8 @@ in_ea: · 501 unmodified lines
502 .section .fixup,#alloc,#execinstr502 .section .fixup,#alloc,#execinstr
503 .even503 .even
5041:5041:
505 jbra fpsp040_die505 jbsr fpsp040_die
506 jbra .Lnotkern
506 507
507 .section __ex_table,#alloc508 .section __ex_table,#alloc
508 .align 4509 .align 4
arch/m68k/kernel/syscalls/syscall.tbl+1−1
@@ -141,7 +141,7 @@ · 140 unmodified lines
141131 common quotactl sys_quotactl141131 common quotactl sys_quotactl
142132 common getpgid sys_getpgid142132 common getpgid sys_getpgid
143133 common fchdir sys_fchdir143133 common fchdir sys_fchdir
144134 common bdflush sys_bdflush144134 common bdflush sys_ni_syscall
145135 common sysfs sys_sysfs145135 common sysfs sys_sysfs
146136 common personality sys_personality146136 common personality sys_personality
147# 137 was afs_syscall147# 137 was afs_syscall
arch/m68k/kernel/traps.c+1−1
@@ -1150,7 +1150,7 @@ asmlinkage void set_esp0(unsigned long ssp) · 1149 unmodified lines
1150 */1150 */
1151asmlinkage void fpsp040_die(void)1151asmlinkage void fpsp040_die(void)
1152{1152{
1153 do_exit(SIGSEGV);1153 force_sigsegv(SIGSEGV);
1154}1154}
1155 1155
1156#ifdef CONFIG_M68KFPU_EMU1156#ifdef CONFIG_M68KFPU_EMU
arch/microblaze/kernel/syscalls/syscall.tbl+1−1
@@ -141,7 +141,7 @@ · 140 unmodified lines
141131 common quotactl sys_quotactl141131 common quotactl sys_quotactl
142132 common getpgid sys_getpgid142132 common getpgid sys_getpgid
143133 common fchdir sys_fchdir143133 common fchdir sys_fchdir
144134 common bdflush sys_bdflush144134 common bdflush sys_ni_syscall
145135 common sysfs sys_sysfs145135 common sysfs sys_sysfs
146136 common personality sys_personality146136 common personality sys_personality
147137 common afs_syscall sys_ni_syscall147137 common afs_syscall sys_ni_syscall
arch/mips/kernel/syscalls/syscall_o32.tbl+1−1
@@ -145,7 +145,7 @@ · 144 unmodified lines
145131 o32 quotactl sys_quotactl145131 o32 quotactl sys_quotactl
146132 o32 getpgid sys_getpgid146132 o32 getpgid sys_getpgid
147133 o32 fchdir sys_fchdir147133 o32 fchdir sys_fchdir
148134 o32 bdflush sys_bdflush148134 o32 bdflush sys_ni_syscall
149135 o32 sysfs sys_sysfs149135 o32 sysfs sys_sysfs
150136 o32 personality sys_personality sys_32_personality150136 o32 personality sys_personality sys_32_personality
151137 o32 afs_syscall sys_ni_syscall151137 o32 afs_syscall sys_ni_syscall
arch/parisc/kernel/syscalls/syscall.tbl+1−1
@@ -147,7 +147,7 @@ · 146 unmodified lines
147131 common quotactl sys_quotactl147131 common quotactl sys_quotactl
148132 common getpgid sys_getpgid148132 common getpgid sys_getpgid
149133 common fchdir sys_fchdir149133 common fchdir sys_fchdir
150134 common bdflush sys_bdflush150134 common bdflush sys_ni_syscall
151135 common sysfs sys_sysfs151135 common sysfs sys_sysfs
152136 32 personality parisc_personality152136 32 personality parisc_personality
153136 64 personality sys_personality153136 64 personality sys_personality
arch/powerpc/kernel/syscalls/syscall.tbl+1−1
@@ -176,7 +176,7 @@ · 175 unmodified lines
176131 nospu quotactl sys_quotactl176131 nospu quotactl sys_quotactl
177132 common getpgid sys_getpgid177132 common getpgid sys_getpgid
178133 common fchdir sys_fchdir178133 common fchdir sys_fchdir
179134 common bdflush sys_bdflush179134 common bdflush sys_ni_syscall
180135 common sysfs sys_sysfs180135 common sysfs sys_sysfs
181136 32 personality sys_personality ppc64_personality181136 32 personality sys_personality ppc64_personality
182136 64 personality ppc64_personality182136 64 personality ppc64_personality
arch/s390/kernel/syscalls/syscall.tbl+1−1
@@ -122,7 +122,7 @@ · 121 unmodified lines
122131 common quotactl sys_quotactl sys_quotactl122131 common quotactl sys_quotactl sys_quotactl
123132 common getpgid sys_getpgid sys_getpgid123132 common getpgid sys_getpgid sys_getpgid
124133 common fchdir sys_fchdir sys_fchdir124133 common fchdir sys_fchdir sys_fchdir
125134 common bdflush sys_bdflush sys_bdflush125134 common bdflush sys_ni_syscall sys_ni_syscall
126135 common sysfs sys_sysfs sys_sysfs126135 common sysfs sys_sysfs sys_sysfs
127136 common personality sys_s390_personality sys_s390_personality127136 common personality sys_s390_personality sys_s390_personality
128137 common afs_syscall - -128137 common afs_syscall - -
arch/sh/kernel/syscalls/syscall.tbl+1−1
@@ -141,7 +141,7 @@ · 140 unmodified lines
141131 common quotactl sys_quotactl141131 common quotactl sys_quotactl
142132 common getpgid sys_getpgid142132 common getpgid sys_getpgid
143133 common fchdir sys_fchdir143133 common fchdir sys_fchdir
144134 common bdflush sys_bdflush144134 common bdflush sys_ni_syscall
145135 common sysfs sys_sysfs145135 common sysfs sys_sysfs
146136 common personality sys_personality146136 common personality sys_personality
147# 137 was afs_syscall147# 137 was afs_syscall
arch/sparc/kernel/syscalls/syscall.tbl+1−1
@@ -270,7 +270,7 @@ · 269 unmodified lines
270222 common delete_module sys_delete_module270222 common delete_module sys_delete_module
271223 common get_kernel_syms sys_ni_syscall271223 common get_kernel_syms sys_ni_syscall
272224 common getpgid sys_getpgid272224 common getpgid sys_getpgid
273225 common bdflush sys_bdflush273225 common bdflush sys_ni_syscall
274226 common sysfs sys_sysfs274226 common sysfs sys_sysfs
275227 common afs_syscall sys_nis_syscall275227 common afs_syscall sys_nis_syscall
276228 common setfsuid sys_setfsuid16276228 common setfsuid sys_setfsuid16
arch/x86/entry/syscalls/syscall_32.tbl+1−1
@@ -145,7 +145,7 @@ · 144 unmodified lines
145131 i386 quotactl sys_quotactl145131 i386 quotactl sys_quotactl
146132 i386 getpgid sys_getpgid146132 i386 getpgid sys_getpgid
147133 i386 fchdir sys_fchdir147133 i386 fchdir sys_fchdir
148134 i386 bdflush sys_bdflush148134 i386 bdflush sys_ni_syscall
149135 i386 sysfs sys_sysfs149135 i386 sysfs sys_sysfs
150136 i386 personality sys_personality150136 i386 personality sys_personality
151137 i386 afs_syscall151137 i386 afs_syscall
arch/xtensa/kernel/syscalls/syscall.tbl+1−1
@@ -223,7 +223,7 @@ · 222 unmodified lines
223# 205 was old nfsservctl223# 205 was old nfsservctl
224205 common nfsservctl sys_ni_syscall224205 common nfsservctl sys_ni_syscall
225206 common _sysctl sys_ni_syscall225206 common _sysctl sys_ni_syscall
226207 common bdflush sys_bdflush226207 common bdflush sys_ni_syscall
227208 common uname sys_newuname227208 common uname sys_newuname
228209 common sysinfo sys_sysinfo228209 common sysinfo sys_sysinfo
229210 common init_module sys_init_module229210 common init_module sys_init_module
fs/buffer.c+0−27
@@ -3267,33 +3267,6 @@ out: · 3266 unmodified lines
3267}3267}
3268EXPORT_SYMBOL(try_to_free_buffers);3268EXPORT_SYMBOL(try_to_free_buffers);
3269 3269
3270/*
3271 * There are no bdflush tunables left. But distributions are
3272 * still running obsolete flush daemons, so we terminate them here.
3273 *
3274 * Use of bdflush() is deprecated and will be removed in a future kernel.
3275 * The `flush-X' kernel threads fully replace bdflush daemons and this call.
3276 */
3277SYSCALL_DEFINE2(bdflush, int, func, long, data)
3278{
3279 static int msg_count;
3280
3281 if (!capable(CAP_SYS_ADMIN))
3282 return -EPERM;
3283
3284 if (msg_count < 5) {
3285 msg_count++;
3286 printk(KERN_INFO
3287 "warning: process `%s' used the obsolete bdflush"
3288 " system call\n", current->comm);
3289 printk(KERN_INFO "Fix your initscripts?\n");
3290 }
3291
3292 if (func == 1)
3293 do_exit(0);
3294 return 0;
3295}
3296
3297/*3270/*
3298 * Buffer-head allocation3271 * Buffer-head allocation
3299 */3272 */
include/linux/sched/signal.h+1−0
@@ -324,6 +324,7 @@ int force_sig_ptrace_errno_trap(int errno, void __user *addr); · 323 unmodified lines
324int force_sig_fault_trapno(int sig, int code, void __user *addr, int trapno);324int force_sig_fault_trapno(int sig, int code, void __user *addr, int trapno);
325int send_sig_fault_trapno(int sig, int code, void __user *addr, int trapno,325int send_sig_fault_trapno(int sig, int code, void __user *addr, int trapno,
326 struct task_struct *t);326 struct task_struct *t);
327int force_sig_seccomp(int syscall, int reason, bool force_coredump);
327 328
328extern int send_sig_info(int, struct kernel_siginfo *, struct task_struct *);329extern int send_sig_info(int, struct kernel_siginfo *, struct task_struct *);
329extern void force_sigsegv(int sig);330extern void force_sigsegv(int sig);
include/linux/syscalls.h+0−1
@@ -1158,7 +1158,6 @@ asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf); · 1157 unmodified lines
1158asmlinkage long sys_vfork(void);1158asmlinkage long sys_vfork(void);
1159asmlinkage long sys_recv(int, void __user *, size_t, unsigned);1159asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
1160asmlinkage long sys_send(int, void __user *, size_t, unsigned);1160asmlinkage long sys_send(int, void __user *, size_t, unsigned);
1161asmlinkage long sys_bdflush(int func, long data);
1162asmlinkage long sys_oldumount(char __user *name);1161asmlinkage long sys_oldumount(char __user *name);
1163asmlinkage long sys_uselib(const char __user *library);1162asmlinkage long sys_uselib(const char __user *library);
1164asmlinkage long sys_sysfs(int option,1163asmlinkage long sys_sysfs(int option,
include/uapi/linux/capability.h+0−1
@@ -243,7 +243,6 @@ struct vfs_ns_cap_data { · 242 unmodified lines
243/* Allow examination and configuration of disk quotas */243/* Allow examination and configuration of disk quotas */
244/* Allow setting the domainname */244/* Allow setting the domainname */
245/* Allow setting the hostname */245/* Allow setting the hostname */
246/* Allow calling bdflush() */
247/* Allow mount() and umount(), setting up new smb connection */246/* Allow mount() and umount(), setting up new smb connection */
248/* Allow some autofs root ioctls */247/* Allow some autofs root ioctls */
249/* Allow nfsservctl */248/* Allow nfsservctl */
kernel/seccomp.c+7−35
@@ -922,30 +922,6 @@ void get_seccomp_filter(struct task_struct *tsk) · 921 unmodified lines
922 refcount_inc(&orig->users);922 refcount_inc(&orig->users);
923}923}
924 924
925static void seccomp_init_siginfo(kernel_siginfo_t *info, int syscall, int reason)
926{
927 clear_siginfo(info);
928 info->si_signo = SIGSYS;
929 info->si_code = SYS_SECCOMP;
930 info->si_call_addr = (void __user *)KSTK_EIP(current);
931 info->si_errno = reason;
932 info->si_arch = syscall_get_arch(current);
933 info->si_syscall = syscall;
934}
935
936/**
937 * seccomp_send_sigsys - signals the task to allow in-process syscall emulation
938 * @syscall: syscall number to send to userland
939 * @reason: filter-supplied reason code to send to userland (via si_errno)
940 *
941 * Forces a SIGSYS with a code of SYS_SECCOMP and related sigsys info.
942 */
943static void seccomp_send_sigsys(int syscall, int reason)
944{
945 struct kernel_siginfo info;
946 seccomp_init_siginfo(&info, syscall, reason);
947 force_sig_info(&info);
948}
949#endif /* CONFIG_SECCOMP_FILTER */925#endif /* CONFIG_SECCOMP_FILTER */
950 926
951/* For use with seccomp_actions_logged */927/* For use with seccomp_actions_logged */
@@ -1218,7 +1194,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, · 266 unmodified lines
1218 /* Show the handler the original registers. */1194 /* Show the handler the original registers. */
1219 syscall_rollback(current, current_pt_regs());1195 syscall_rollback(current, current_pt_regs());
1220 /* Let the filter pass back 16 bits of data. */1196 /* Let the filter pass back 16 bits of data. */
1221 seccomp_send_sigsys(this_syscall, data);1197 force_sig_seccomp(this_syscall, data, false);
1222 goto skip;1198 goto skip;
1223 1199
1224 case SECCOMP_RET_TRACE:1200 case SECCOMP_RET_TRACE:
@@ -1288,19 +1264,15 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, · 63 unmodified lines
1288 seccomp_log(this_syscall, SIGSYS, action, true);1264 seccomp_log(this_syscall, SIGSYS, action, true);
1289 /* Dump core only if this is the last remaining thread. */1265 /* Dump core only if this is the last remaining thread. */
1290 if (action != SECCOMP_RET_KILL_THREAD ||1266 if (action != SECCOMP_RET_KILL_THREAD ||
1291 get_nr_threads(current) == 1) {1267 (atomic_read(&current->signal->live) == 1)) {
1292 kernel_siginfo_t info;
1293
1294 /* Show the original registers in the dump. */1268 /* Show the original registers in the dump. */
1295 syscall_rollback(current, current_pt_regs());1269 syscall_rollback(current, current_pt_regs());
1296 /* Trigger a manual coredump since do_exit skips it. */1270 /* Trigger a coredump with SIGSYS */
1297 seccomp_init_siginfo(&info, this_syscall, data);1271 force_sig_seccomp(this_syscall, data, true);
1298 do_coredump(&info);1272 } else {
1299 }
1300 if (action == SECCOMP_RET_KILL_THREAD)
1301 do_exit(SIGSYS);1273 do_exit(SIGSYS);
1302 else1274 }
1303 do_group_exit(SIGSYS);1275 return -1; /* skip the syscall go directly to signal handling */
1304 }1276 }
1305 1277
1306 unreachable();1278 unreachable();
kernel/signal.c+26−4
@@ -54,6 +54,7 @@ · 53 unmodified lines
54#include <asm/unistd.h>54#include <asm/unistd.h>
55#include <asm/siginfo.h>55#include <asm/siginfo.h>
56#include <asm/cacheflush.h>56#include <asm/cacheflush.h>
57#include <asm/syscall.h> /* for syscall_get_* */
57 58
58/*59/*
59 * SLAB caches for signal bits.60 * SLAB caches for signal bits.
@@ -1322,7 +1323,7 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p · 1262 unmodified lines
1322 * that is why we also clear SIGNAL_UNKILLABLE.1323 * that is why we also clear SIGNAL_UNKILLABLE.
1323 */1324 */
1324static int1325static int
1325force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t)1326force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, bool sigdfl)
1326{1327{
1327 unsigned long int flags;1328 unsigned long int flags;
1328 int ret, blocked, ignored;1329 int ret, blocked, ignored;
@@ -1333,7 +1334,7 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t) · 4 unmodified lines
1333 action = &t->sighand->action[sig-1];1334 action = &t->sighand->action[sig-1];
1334 ignored = action->sa.sa_handler == SIG_IGN;1335 ignored = action->sa.sa_handler == SIG_IGN;
1335 blocked = sigismember(&t->blocked, sig);1336 blocked = sigismember(&t->blocked, sig);
1336 if (blocked || ignored) {1337 if (blocked || ignored || sigdfl) {
1337 action->sa.sa_handler = SIG_DFL;1338 action->sa.sa_handler = SIG_DFL;
1338 if (blocked) {1339 if (blocked) {
1339 sigdelset(&t->blocked, sig);1340 sigdelset(&t->blocked, sig);
@@ -1354,7 +1355,7 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t) · 14 unmodified lines
1354 1355
1355int force_sig_info(struct kernel_siginfo *info)1356int force_sig_info(struct kernel_siginfo *info)
1356{1357{
1357 return force_sig_info_to_task(info, current);1358 return force_sig_info_to_task(info, current, false);
1358}1359}
1359 1360
1360/*1361/*
@@ -1696,7 +1697,7 @@ int force_sig_fault_to_task(int sig, int code, void __user *addr · 335 unmodified lines
1696 info.si_flags = flags;1697 info.si_flags = flags;
1697 info.si_isr = isr;1698 info.si_isr = isr;
1698#endif1699#endif
1699 return force_sig_info_to_task(&info, t);1700 return force_sig_info_to_task(&info, t, false);
1700}1701}
1701 1702
1702int force_sig_fault(int sig, int code, void __user *addr1703int force_sig_fault(int sig, int code, void __user *addr
@@ -1798,6 +1799,27 @@ int force_sig_perf(void __user *addr, u32 type, u64 sig_data) · 95 unmodified lines
1798 return force_sig_info(&info);1799 return force_sig_info(&info);
1799}1800}
1800 1801
1802/**
1803 * force_sig_seccomp - signals the task to allow in-process syscall emulation
1804 * @syscall: syscall number to send to userland
1805 * @reason: filter-supplied reason code to send to userland (via si_errno)
1806 *
1807 * Forces a SIGSYS with a code of SYS_SECCOMP and related sigsys info.
1808 */
1809int force_sig_seccomp(int syscall, int reason, bool force_coredump)
1810{
1811 struct kernel_siginfo info;
1812
1813 clear_siginfo(&info);
1814 info.si_signo = SIGSYS;
1815 info.si_code = SYS_SECCOMP;
1816 info.si_call_addr = (void __user *)KSTK_EIP(current);
1817 info.si_errno = reason;
1818 info.si_arch = syscall_get_arch(current);
1819 info.si_syscall = syscall;
1820 return force_sig_info_to_task(&info, current, force_coredump);
1821}
1822
1801/* For the crazy architectures that include trap information in1823/* For the crazy architectures that include trap information in
1802 * the errno field, instead of an actual errno value.1824 * the errno field, instead of an actual errno value.
1803 */1825 */
kernel/sys_ni.c+0−1
@@ -416,7 +416,6 @@ COND_SYSCALL(epoll_wait); · 415 unmodified lines
416COND_SYSCALL(recv);416COND_SYSCALL(recv);
417COND_SYSCALL_COMPAT(recv);417COND_SYSCALL_COMPAT(recv);
418COND_SYSCALL(send);418COND_SYSCALL(send);
419COND_SYSCALL(bdflush);
420COND_SYSCALL(uselib);419COND_SYSCALL(uselib);
421 420
422/* optional: time32 */421/* optional: time32 */
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl+1−1
@@ -176,7 +176,7 @@ · 175 unmodified lines
176131 nospu quotactl sys_quotactl176131 nospu quotactl sys_quotactl
177132 common getpgid sys_getpgid177132 common getpgid sys_getpgid
178133 common fchdir sys_fchdir178133 common fchdir sys_fchdir
179134 common bdflush sys_bdflush179134 common bdflush sys_ni_syscall
180135 common sysfs sys_sysfs180135 common sysfs sys_sysfs
181136 32 personality sys_personality ppc64_personality181136 32 personality sys_personality ppc64_personality
182136 64 personality ppc64_personality182136 64 personality ppc64_personality
tools/perf/arch/s390/entry/syscalls/syscall.tbl+1−1
@@ -122,7 +122,7 @@ · 121 unmodified lines
122131 common quotactl sys_quotactl sys_quotactl122131 common quotactl sys_quotactl sys_quotactl
123132 common getpgid sys_getpgid sys_getpgid123132 common getpgid sys_getpgid sys_getpgid
124133 common fchdir sys_fchdir sys_fchdir124133 common fchdir sys_fchdir sys_fchdir
125134 common bdflush sys_bdflush sys_bdflush125134 common bdflush - -
126135 common sysfs sys_sysfs sys_sysfs126135 common sysfs sys_sysfs sys_sysfs
127136 common personality sys_s390_personality sys_s390_personality127136 common personality sys_s390_personality sys_s390_personality
128137 common afs_syscall - -128137 common afs_syscall - -