2 # SPDX-License-Identifier: GPL-2.0
8 sysctl
-w net.core.bpf_jit_enable
=$1 2>&1 > /dev
/null
9 sysctl
-w net.core.bpf_jit_harden
=$2 2>&1 > /dev
/null
11 echo "[ JIT enabled:$1 hardened:$2 ]"
13 if [ -f ${SRC_TREE}/lib
/test_bpf.ko
]; then
14 insmod
${SRC_TREE}/lib
/test_bpf.ko
2> /dev
/null
19 # Use modprobe dry run to check for missing test_bpf module
20 if ! /sbin
/modprobe
-q -n test_bpf
; then
21 echo "test_bpf: [SKIP]"
22 elif /sbin
/modprobe
-q test_bpf
; then
25 echo "test_bpf: [FAIL]"
29 rmmod test_bpf
2> /dev
/null
35 JE
=`sysctl -n net.core.bpf_jit_enable`
36 JH
=`sysctl -n net.core.bpf_jit_harden`
41 sysctl
-w net.core.bpf_jit_enable
=$JE 2>&1 > /dev
/null
42 sysctl
-w net.core.bpf_jit_harden
=$JH 2>&1 > /dev
/null