|
@@ -458,6 +458,7 @@ struct bpf_binary_header {
|
|
|
struct bpf_prog {
|
|
|
u16 pages; /* Number of allocated pages */
|
|
|
u16 jited:1, /* Is our filter JIT'ed? */
|
|
|
+ jit_requested:1,/* archs need to JIT the prog */
|
|
|
locked:1, /* Program image locked? */
|
|
|
gpl_compatible:1, /* Is filter GPL compatible? */
|
|
|
cb_access:1, /* Is control block accessed? */
|
|
@@ -804,7 +805,7 @@ static inline bool bpf_prog_ebpf_jited(const struct bpf_prog *fp)
|
|
|
return fp->jited && bpf_jit_is_ebpf();
|
|
|
}
|
|
|
|
|
|
-static inline bool bpf_jit_blinding_enabled(void)
|
|
|
+static inline bool bpf_jit_blinding_enabled(struct bpf_prog *prog)
|
|
|
{
|
|
|
/* These are the prerequisites, should someone ever have the
|
|
|
* idea to call blinding outside of them, we make sure to
|
|
@@ -812,7 +813,7 @@ static inline bool bpf_jit_blinding_enabled(void)
|
|
|
*/
|
|
|
if (!bpf_jit_is_ebpf())
|
|
|
return false;
|
|
|
- if (!bpf_jit_enable)
|
|
|
+ if (!prog->jit_requested)
|
|
|
return false;
|
|
|
if (!bpf_jit_harden)
|
|
|
return false;
|