summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_kmod.sh
blob: 6d58cca8e23574a1fe15993d1da8f1558ecf8e06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

SRC_TREE=../../../../

test_run()
{
	sysctl -w net.core.bpf_jit_enable=$1 2>&1 > /dev/null
	sysctl -w net.core.bpf_jit_harden=$2 2>&1 > /dev/null

	echo "[ JIT enabled:$1 hardened:$2 ]"
	dmesg -C
	insmod $SRC_TREE/lib/test_bpf.ko 2> /dev/null
	if [ $? -ne 0 ]; then
		rc=1
	fi
	rmmod  test_bpf 2> /dev/null
	dmesg | grep FAIL
}

test_save()
{
	JE=`sysctl -n net.core.bpf_jit_enable`
	JH=`sysctl -n net.core.bpf_jit_harden`
}

test_restore()
{
	sysctl -w net.core.bpf_jit_enable=$JE 2>&1 > /dev/null
	sysctl -w net.core.bpf_jit_harden=$JH 2>&1 > /dev/null
}

rc=0
test_save
test_run 0 0
test_run 1 0
test_run 1 1
test_run 1 2
test_restore
exit $rc
move&id=3eb86259eca6a363ed7bb13ecea5cda809f7b97d'>3eb86259eca6a363ed7bb13ecea5cda809f7b97d (diff)parenta763f78cea845c91b8d91f93dabf70c407635dc5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes and cleanups from David Miller: 1) Use rb_entry() instead of hardcoded container_of(), from Geliang Tang. 2) Use correct memory barriers in stammac driver, from Pavel Machek. 3) Fix assoc bind address handling in SCTP, from Xin Long. 4) Make the length check for UFO handling consistent between __ip_append_data() and ip_finish_output(), from Zheng Li. 5) HSI driver compatible strings were busted fro hix5hd2, from Dongpo Li. 6) Handle devm_ioremap() errors properly in cavium driver, from Arvind Yadav. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits) RDS: use rb_entry() net_sched: sch_netem: use rb_entry() net_sched: sch_fq: use rb_entry() net/mlx5: use rb_entry() ethernet: sfc: Add Kconfig entry for vendor Solarflare sctp: not copying duplicate addrs to the assoc's bind address list sctp: reduce indent level in sctp_copy_local_addr_list ARM: dts: hix5hd2: don't change the existing compatible string net: hix5hd2_gmac: fix compatible strings name openvswitch: Add a missing break statement. net: netcp: ethss: fix 10gbe host port tx pri map configuration net: netcp: ethss: fix errors in ethtool ops fsl/fman: enable compilation on ARM64 fsl/fman: A007273 only applies to PPC SoCs powerpc: fsl/fman: remove fsl,fman from of_device_ids[] fsl/fman: fix 1G support for QSGMII interfaces dt: bindings: net: use boolean dt properties for eee broken modes net: phy: use boolean dt properties for eee broken modes net: phy: fix sign type error in genphy_config_eee_advert ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output ...
Diffstat (limited to 'sound/oss/sleep.h')