mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
make seccomp zerocost in schedule
This follows a suggestion from Chuck Ebbert on how to make seccomp absolutely zerocost in schedule too. The only remaining footprint of seccomp is in terms of the bzImage size that becomes a few bytes (perhaps even a few kbytes) larger, measure it if you care in the embedded. Signed-off-by: Andrea Arcangeli <andrea@cpushare.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1d9d02feee
commit
cf99abace7
5 changed files with 50 additions and 45 deletions
|
@ -16,11 +16,6 @@ static inline void secure_computing(int this_syscall)
|
|||
__secure_computing(this_syscall);
|
||||
}
|
||||
|
||||
static inline int has_secure_computing(struct thread_info *ti)
|
||||
{
|
||||
return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP));
|
||||
}
|
||||
|
||||
extern long prctl_get_seccomp(void);
|
||||
extern long prctl_set_seccomp(unsigned long);
|
||||
|
||||
|
@ -29,11 +24,6 @@ extern long prctl_set_seccomp(unsigned long);
|
|||
typedef struct { } seccomp_t;
|
||||
|
||||
#define secure_computing(x) do { } while (0)
|
||||
/* static inline to preserve typechecking */
|
||||
static inline int has_secure_computing(struct thread_info *ti)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline long prctl_get_seccomp(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue