diff options
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r-- | kernel/seccomp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 33a3a97e2b58..2f3fa2cc2eac 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c | |||
@@ -54,7 +54,7 @@ | |||
54 | struct seccomp_filter { | 54 | struct seccomp_filter { |
55 | atomic_t usage; | 55 | atomic_t usage; |
56 | struct seccomp_filter *prev; | 56 | struct seccomp_filter *prev; |
57 | struct sk_filter *prog; | 57 | struct bpf_prog *prog; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* Limit any path through the tree to 256KB worth of instructions. */ | 60 | /* Limit any path through the tree to 256KB worth of instructions. */ |
@@ -187,7 +187,7 @@ static u32 seccomp_run_filters(int syscall) | |||
187 | * value always takes priority (ignoring the DATA). | 187 | * value always takes priority (ignoring the DATA). |
188 | */ | 188 | */ |
189 | for (f = current->seccomp.filter; f; f = f->prev) { | 189 | for (f = current->seccomp.filter; f; f = f->prev) { |
190 | u32 cur_ret = SK_RUN_FILTER(f->prog, (void *)&sd); | 190 | u32 cur_ret = BPF_PROG_RUN(f->prog, (void *)&sd); |
191 | 191 | ||
192 | if ((cur_ret & SECCOMP_RET_ACTION) < (ret & SECCOMP_RET_ACTION)) | 192 | if ((cur_ret & SECCOMP_RET_ACTION) < (ret & SECCOMP_RET_ACTION)) |
193 | ret = cur_ret; | 193 | ret = cur_ret; |
@@ -260,7 +260,7 @@ static long seccomp_attach_filter(struct sock_fprog *fprog) | |||
260 | if (!filter) | 260 | if (!filter) |
261 | goto free_prog; | 261 | goto free_prog; |
262 | 262 | ||
263 | filter->prog = kzalloc(sk_filter_size(new_len), | 263 | filter->prog = kzalloc(bpf_prog_size(new_len), |
264 | GFP_KERNEL|__GFP_NOWARN); | 264 | GFP_KERNEL|__GFP_NOWARN); |
265 | if (!filter->prog) | 265 | if (!filter->prog) |
266 | goto free_filter; | 266 | goto free_filter; |
@@ -273,7 +273,7 @@ static long seccomp_attach_filter(struct sock_fprog *fprog) | |||
273 | atomic_set(&filter->usage, 1); | 273 | atomic_set(&filter->usage, 1); |
274 | filter->prog->len = new_len; | 274 | filter->prog->len = new_len; |
275 | 275 | ||
276 | sk_filter_select_runtime(filter->prog); | 276 | bpf_prog_select_runtime(filter->prog); |
277 | 277 | ||
278 | /* | 278 | /* |
279 | * If there is an existing filter, make it the prev and don't drop its | 279 | * If there is an existing filter, make it the prev and don't drop its |
@@ -337,7 +337,7 @@ void put_seccomp_filter(struct task_struct *tsk) | |||
337 | while (orig && atomic_dec_and_test(&orig->usage)) { | 337 | while (orig && atomic_dec_and_test(&orig->usage)) { |
338 | struct seccomp_filter *freeme = orig; | 338 | struct seccomp_filter *freeme = orig; |
339 | orig = orig->prev; | 339 | orig = orig->prev; |
340 | sk_filter_free(freeme->prog); | 340 | bpf_prog_free(freeme->prog); |
341 | kfree(freeme); | 341 | kfree(freeme); |
342 | } | 342 | } |
343 | } | 343 | } |