-
Notifications
You must be signed in to change notification settings - Fork 153
bpf: Specify access type of bpf_sysctl_get_name args #9159
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
Conversation
|
Upstream branch: cd7312a |
7801208 to
a994d4a
Compare
|
Upstream branch: e30329b |
8627040 to
b72fa4f
Compare
|
Upstream branch: e30329b |
b72fa4f to
f88ccc3
Compare
a994d4a to
e7d5deb
Compare
|
Upstream branch: 99fe8af |
f88ccc3 to
5993958
Compare
e7d5deb to
1c12ad1
Compare
|
Upstream branch: c11f34e |
5993958 to
e2f86c3
Compare
1c12ad1 to
4b5a6fc
Compare
|
Upstream branch: 3ce7cdd |
The second argument of bpf_sysctl_get_name() helper is a pointer to a buffer that is being written to. However that isn't specify in the prototype. Until commit 37cce22 ("bpf: verifier: Refactor helper access type tracking"), all helper accesses were considered as a possible write access by the verifier, so no big harm was done. However, since then, the verifier might make wrong asssumption about the content of that address which might lead it to make faulty optimizations (such as removing code that was wrongly labeled dead). This is what happens in test_sysctl selftest to the tests related to sysctl_get_name. Add MEM_WRITE flag the second argument of bpf_sysctl_get_name(). Signed-off-by: Jerome Marchand <[email protected]> Acked-by: Yonghong Song <[email protected]>
Convert test_sysctl test to prog_tests with minimal change to the tests themselves. Signed-off-by: Jerome Marchand <[email protected]> Acked-by: Yonghong Song <[email protected]>
e2f86c3 to
aedac85
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=973851 irrelevant now. Closing PR. |
Pull request for series with
subject: bpf: Specify access type of bpf_sysctl_get_name args
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=973851