-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selftests/bpf:Enhance bpf ability to detect ksym read error by libcap #7727
Conversation
Upstream branch: 5277d13 |
83110c8
to
15c4059
Compare
Upstream branch: 8826498 |
8ae8d69
to
77e0720
Compare
15c4059
to
cd2ff1c
Compare
Upstream branch: de5cb0d |
77e0720
to
0f3c4d3
Compare
cd2ff1c
to
8a08767
Compare
Upstream branch: de5cb0d |
0f3c4d3
to
8513b64
Compare
8a08767
to
84c6119
Compare
Upstream branch: de5cb0d |
8513b64
to
c329fbe
Compare
84c6119
to
e1cb77d
Compare
Upstream branch: 494c3a7 |
c329fbe
to
9a1f62f
Compare
e1cb77d
to
6b1e4f8
Compare
Ksym addr access is restricted by ``kptr_restrict``(/proc/sys/kernel/kptr_restrict). On some OS systems(like Android), ksym addr access is not accessed because ``kptr_restrict=2`. And it took me a long time to find the root case. -When ``kptr_restrict==0``, addr is accessed. # echo 0 > /proc/sys/kernel/kptr_restrict # cat /proc/kallsyms | grep bpf_link_fops ffffffd6bfd3fb60 d bpf_link_fops -When ``kptr_restrict==2``, addr is replaced by ZERO. # echo 2 > /proc/sys/kernel/kptr_restrict # cat /proc/kallsyms | grep bpf_link_fops 0000000000000000 d bpf_link_fops -When ``kptr_restrict==1``, addr is accessed for user having CAP_SYSLOG. So we should perform a check to remind users for these conditions before reading /proc/kallsyms. [before]: # echo 2 > /proc/sys/kernel/kptr_restrict # ./test_progs -t ksyms #133 ksyms:FAIL [after]: # echo 2 > /proc/sys/kernel/kptr_restrict # ./test_progs -t ksym ksyms restricted, please check /proc/sys/kernel/kptr_restrict #133 ksyms:FAIL Signed-off-by: Lin Yikai <yikai.lin@vivo.com>
Upstream branch: a9f8c1b |
9a1f62f
to
079c46c
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=890358 expired. Closing PR. |
Pull request for series with
subject: selftests/bpf:Enhance bpf ability to detect ksym read error by libcap
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=890358