diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-10-26 12:13:03 +0200 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2022-12-15 10:37:26 -0800 |
commit | d48567c9a0d1e605639f8a8705a61bbb55fb4e84 (patch) | |
tree | e21cc2cc51debdb73db0031a21dac0717af1286e /net | |
parent | 414ebf148cb5c5fa727ec51fdb69c4ab82dccf3b (diff) | |
download | lwn-d48567c9a0d1e605639f8a8705a61bbb55fb4e84.tar.gz lwn-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.c | 3 |
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); |