summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-10-26 12:13:03 +0200
committerDave Hansen <dave.hansen@linux.intel.com>2022-12-15 19:37:26 +0100
commitd48567c9a0d1e605639f8a8705a61bbb55fb4e84 (patch)
treee21cc2cc51debdb73db0031a21dac0717af1286e /net
parentx86/mm: Do verify W^X at boot up (diff)
downloadlinux-d48567c9a0d1e605639f8a8705a61bbb55fb4e84.tar.xz
linux-d48567c9a0d1e605639f8a8705a61bbb55fb4e84.zip
mm: Introduce set_memory_rox()
Because endlessly repeating: set_memory_ro() set_memory_x() is getting tedious. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/Y1jek64pXOsougmz@hirez.programming.kicks-ass.net
Diffstat (limited to 'net')
-rw-r--r--net/bpf/bpf_dummy_struct_ops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bpf/bpf_dummy_struct_ops.c b/net/bpf/bpf_dummy_struct_ops.c
index e78dadfc5829..9ff32324251b 100644
--- a/net/bpf/bpf_dummy_struct_ops.c
+++ b/net/bpf/bpf_dummy_struct_ops.c
@@ -124,8 +124,7 @@ int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
if (err < 0)
goto out;
- set_memory_ro((long)image, 1);
- set_memory_x((long)image, 1);
+ set_memory_rox((long)image, 1);
prog_ret = dummy_ops_call_op(image, args);
err = dummy_ops_copy_args(args);