diff options
| author | Hou Tao <[email protected]> | 2024-10-30 10:05:16 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-10-30 19:13:46 +0000 |
| commit | ebafc1e535db19505aec3b94a4a641fe735a2eac (patch) | |
| tree | fbf780dd9c3ca0a1197f6304c2a5a838c3f4ee40 /drivers/acpi/cppc_acpi.c | |
| parent | bpf: Use __u64 to save the bits in bits iterator (diff) | |
| download | kernel-ebafc1e535db19505aec3b94a4a641fe735a2eac.tar.gz kernel-ebafc1e535db19505aec3b94a4a641fe735a2eac.zip | |
selftests/bpf: Add three test cases for bits_iter
Add more test cases for bits iterator:
(1) huge word test
Verify the multiplication overflow of nr_bits in bits_iter. Without
the overflow check, when nr_words is 67108865, nr_bits becomes 64,
causing bpf_probe_read_kernel_common() to corrupt the stack.
(2) max word test
Verify correct handling of maximum nr_words value (511).
(3) bad word test
Verify early termination of bits iteration when bits iterator
initialization fails.
Also rename bits_nomem to bits_too_big to better reflect its purpose.
Signed-off-by: Hou Tao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions
