For clarity, if CONFIG_SECCOMP isn't defined, seccomp_mode() is returning "disabled". This makes that more clear, along with another 0-use, and results in no operational change.
Unified · Split
| @@ -78,7 +78,7 @@ static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3) · 77 unmodified lines | |||
| 78 | 78 | ||
| 79 | static inline int seccomp_mode(struct seccomp *s) | 79 | static inline int seccomp_mode(struct seccomp *s) |
| 80 | { | 80 | { |
| 81 | return 0; | 81 | return SECCOMP_MODE_DISABLED; |
| 82 | } | 82 | } |
| 83 | #endif /* CONFIG_SECCOMP */ | 83 | #endif /* CONFIG_SECCOMP */ |
| 84 | 84 | ||
| @@ -594,7 +594,7 @@ void secure_computing_strict(int this_syscall) · 593 unmodified lines | |||
| 594 | unlikely(current->ptrace & PT_SUSPEND_SECCOMP)) | 594 | unlikely(current->ptrace & PT_SUSPEND_SECCOMP)) |
| 595 | return; | 595 | return; |
| 596 | 596 | ||
| 597 | if (mode == 0) | 597 | if (mode == SECCOMP_MODE_DISABLED) |
| 598 | return; | 598 | return; |
| 599 | else if (mode == SECCOMP_MODE_STRICT) | 599 | else if (mode == SECCOMP_MODE_STRICT) |
| 600 | __secure_computing_strict(this_syscall); | 600 | __secure_computing_strict(this_syscall); |