| 8d355b56 | 28-Nov-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: fix kfunc inclusions with newer bpftool
bpftool now embeds the kfuncs definitions directly in the generated vmlinux.h
This is great, but because the selftests dir might be compiled w
selftests/hid: fix kfunc inclusions with newer bpftool
bpftool now embeds the kfuncs definitions directly in the generated vmlinux.h
This is great, but because the selftests dir might be compiled with HID_BPF disabled, we have no guarantees to be able to compile the sources with the generated kfuncs.
If we have the kfuncs, because we have the `__not_used` hack, the newly defined kfuncs do not match the ones from vmlinux.h and things go wrong.
Prevent vmlinux.h to define its kfuncs and also add the missing `__weak` symbols for our custom kfuncs definitions
Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| fcdf830e | 01-Jul-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: ensure CKI can compile our new tests on old kernels
In the same way than commit ae7487d112cf ("selftests/hid: ensure we can compile the tests on kernels pre-6.3") we should expose str
selftests/hid: ensure CKI can compile our new tests on old kernels
In the same way than commit ae7487d112cf ("selftests/hid: ensure we can compile the tests on kernels pre-6.3") we should expose struct hid_bpf_ops when it's not available in vmlinux.h.
So unexpose an eventual struct hid_bpf_ops, include vmlinux.h, and re-export struct hid_bpf_ops.
Fixes: d7696738d66b ("selftests/hid: convert the hid_bpf selftests with struct_ops") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| d3e15189 | 26-Jun-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add an infinite loop test for hid_bpf_try_input_report
We don't want this call to allow an infinite loop in HID-BPF, so let's have some tests.
Link: https://patch.msgid.link/20240626
selftests/hid: add an infinite loop test for hid_bpf_try_input_report
We don't want this call to allow an infinite loop in HID-BPF, so let's have some tests.
Link: https://patch.msgid.link/[email protected] Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| fe8d561d | 26-Jun-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add wq test for hid_bpf_input_report()
Now that bpf_wq is available, we can write a test with it. Having hid_bpf_input_report() waiting for the device means that we can directly call
selftests/hid: add wq test for hid_bpf_input_report()
Now that bpf_wq is available, we can write a test with it. Having hid_bpf_input_report() waiting for the device means that we can directly call it, and we get that event when the device is ready.
Link: https://patch.msgid.link/[email protected] Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 3ac83fcd | 26-Jun-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add tests for hid_hw_output_report HID-BPF hooks
We add 3 new tests: - first, we make sure we can prevent the output_report to happen - second, we make sure that we can detect that a
selftests/hid: add tests for hid_hw_output_report HID-BPF hooks
We add 3 new tests: - first, we make sure we can prevent the output_report to happen - second, we make sure that we can detect that a given hidraw client was actually doing the request, and for that client only, call ourself hid_bpf_hw_output_report(), returning a custom value - last, we ensure that we can not loop between hooks for hid_hw_output_report() and manual calls to hid_bpf_hw_output_report() from that same hook
Link: https://patch.msgid.link/[email protected] Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 015a4a2a | 26-Jun-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add tests for hid_hw_raw_request HID-BPF hooks
We add 3 new tests: - first, we make sure we can prevent the raw_request to happen - second, we make sure that we can detect that a give
selftests/hid: add tests for hid_hw_raw_request HID-BPF hooks
We add 3 new tests: - first, we make sure we can prevent the raw_request to happen - second, we make sure that we can detect that a given hidraw client was actually doing the request, and for that client only, call ourself hid_bpf_hw_request(), returning a custom value - last, we ensure that we can not loop between hooks for hid_hw_raw_request() and manual calls to hid_bpf_hw_request() from that hook
Link: https://patch.msgid.link/[email protected] Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 80e189f2 | 03-Nov-2022 |
Benjamin Tissoires <[email protected]> |
selftests/hid: Add a test for BPF_F_INSERT_HEAD
Insert 3 programs to check that we are doing the correct thing: '2', '1', '3' are inserted, but '1' is supposed to be executed first.
Signed-off-by:
selftests/hid: Add a test for BPF_F_INSERT_HEAD
Insert 3 programs to check that we are doing the correct thing: '2', '1', '3' are inserted, but '1' is supposed to be executed first.
Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
show more ...
|