Re: [PATCH net-next v2] net: bpf: make eBPF interpreter images read-only

From: Daniel Borkmann
Date: Tue Sep 02 2014 - 17:47:54 EST

On 09/02/2014 11:31 PM, Alexei Starovoitov wrote:
+static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
+ set_memory_ro((unsigned long)fp, fp->pages);

since ronx are ifdef checked together,
would probably make sense to set nx too?

In case of JITs, for example, we request pages that are
PAGE_KERNEL_EXEC via module_alloc(), but here we only need
PAGE_KERNEL. At least on x86_64, PAGE_NX is then set already.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at