@@ -192,7 +192,7 @@ static u32 seccomp_run_filters(const struct seccomp_data *sd,
192192
193193 /* Ensure unexpected behavior doesn't result in failing open. */
194194 if (unlikely (WARN_ON (f == NULL )))
195- return SECCOMP_RET_KILL ;
195+ return SECCOMP_RET_KILL_THREAD ;
196196
197197 if (!sd ) {
198198 populate_seccomp_data (& sd_local );
@@ -529,15 +529,17 @@ static void seccomp_send_sigsys(int syscall, int reason)
529529#endif /* CONFIG_SECCOMP_FILTER */
530530
531531/* For use with seccomp_actions_logged */
532- #define SECCOMP_LOG_KILL (1 << 0)
532+ #define SECCOMP_LOG_KILL_THREAD (1 << 0)
533533#define SECCOMP_LOG_TRAP (1 << 2)
534534#define SECCOMP_LOG_ERRNO (1 << 3)
535535#define SECCOMP_LOG_TRACE (1 << 4)
536536#define SECCOMP_LOG_LOG (1 << 5)
537537#define SECCOMP_LOG_ALLOW (1 << 6)
538538
539- static u32 seccomp_actions_logged = SECCOMP_LOG_KILL | SECCOMP_LOG_TRAP |
540- SECCOMP_LOG_ERRNO | SECCOMP_LOG_TRACE |
539+ static u32 seccomp_actions_logged = SECCOMP_LOG_KILL_THREAD |
540+ SECCOMP_LOG_TRAP |
541+ SECCOMP_LOG_ERRNO |
542+ SECCOMP_LOG_TRACE |
541543 SECCOMP_LOG_LOG ;
542544
543545static inline void seccomp_log (unsigned long syscall , long signr , u32 action ,
@@ -560,13 +562,13 @@ static inline void seccomp_log(unsigned long syscall, long signr, u32 action,
560562 case SECCOMP_RET_LOG :
561563 log = seccomp_actions_logged & SECCOMP_LOG_LOG ;
562564 break ;
563- case SECCOMP_RET_KILL :
565+ case SECCOMP_RET_KILL_THREAD :
564566 default :
565- log = seccomp_actions_logged & SECCOMP_LOG_KILL ;
567+ log = seccomp_actions_logged & SECCOMP_LOG_KILL_THREAD ;
566568 }
567569
568570 /*
569- * Force an audit message to be emitted when the action is RET_KILL ,
571+ * Force an audit message to be emitted when the action is RET_KILL_* ,
570572 * RET_LOG, or the FILTER_FLAG_LOG bit was set and the action is
571573 * allowed to be logged by the admin.
572574 */
@@ -605,7 +607,7 @@ static void __secure_computing_strict(int this_syscall)
605607#ifdef SECCOMP_DEBUG
606608 dump_stack ();
607609#endif
608- seccomp_log (this_syscall , SIGKILL , SECCOMP_RET_KILL , true);
610+ seccomp_log (this_syscall , SIGKILL , SECCOMP_RET_KILL_THREAD , true);
609611 do_exit (SIGKILL );
610612}
611613
@@ -716,7 +718,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
716718 */
717719 return 0 ;
718720
719- case SECCOMP_RET_KILL :
721+ case SECCOMP_RET_KILL_THREAD :
720722 default :
721723 seccomp_log (this_syscall , SIGSYS , action , true);
722724 /* Dump core only if this is the last remaining thread. */
@@ -878,7 +880,7 @@ static long seccomp_get_action_avail(const char __user *uaction)
878880 return - EFAULT ;
879881
880882 switch (action ) {
881- case SECCOMP_RET_KILL :
883+ case SECCOMP_RET_KILL_THREAD :
882884 case SECCOMP_RET_TRAP :
883885 case SECCOMP_RET_ERRNO :
884886 case SECCOMP_RET_TRACE :
@@ -1029,27 +1031,28 @@ long seccomp_get_filter(struct task_struct *task, unsigned long filter_off,
10291031#ifdef CONFIG_SYSCTL
10301032
10311033/* Human readable action names for friendly sysctl interaction */
1032- #define SECCOMP_RET_KILL_NAME "kill "
1034+ #define SECCOMP_RET_KILL_THREAD_NAME "kill_thread "
10331035#define SECCOMP_RET_TRAP_NAME "trap"
10341036#define SECCOMP_RET_ERRNO_NAME "errno"
10351037#define SECCOMP_RET_TRACE_NAME "trace"
10361038#define SECCOMP_RET_LOG_NAME "log"
10371039#define SECCOMP_RET_ALLOW_NAME "allow"
10381040
1039- static const char seccomp_actions_avail [] = SECCOMP_RET_KILL_NAME " "
1040- SECCOMP_RET_TRAP_NAME " "
1041- SECCOMP_RET_ERRNO_NAME " "
1042- SECCOMP_RET_TRACE_NAME " "
1043- SECCOMP_RET_LOG_NAME " "
1044- SECCOMP_RET_ALLOW_NAME ;
1041+ static const char seccomp_actions_avail [] =
1042+ SECCOMP_RET_KILL_THREAD_NAME " "
1043+ SECCOMP_RET_TRAP_NAME " "
1044+ SECCOMP_RET_ERRNO_NAME " "
1045+ SECCOMP_RET_TRACE_NAME " "
1046+ SECCOMP_RET_LOG_NAME " "
1047+ SECCOMP_RET_ALLOW_NAME ;
10451048
10461049struct seccomp_log_name {
10471050 u32 log ;
10481051 const char * name ;
10491052};
10501053
10511054static const struct seccomp_log_name seccomp_log_names [] = {
1052- { SECCOMP_LOG_KILL , SECCOMP_RET_KILL_NAME },
1055+ { SECCOMP_LOG_KILL_THREAD , SECCOMP_RET_KILL_THREAD_NAME },
10531056 { SECCOMP_LOG_TRAP , SECCOMP_RET_TRAP_NAME },
10541057 { SECCOMP_LOG_ERRNO , SECCOMP_RET_ERRNO_NAME },
10551058 { SECCOMP_LOG_TRACE , SECCOMP_RET_TRACE_NAME },
0 commit comments