Re: [PATCH bpf-next v7 09/11] selftests/bpf: Add test to verify accessing rdonly percpu_array

From: Leon Hwang

Date: Wed Jun 24 2026 - 22:48:12 EST


On 25/6/26 00:48, Andrii Nakryiko wrote:
> On Tue, Jun 23, 2026 at 9:16 PM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
[...]
>>
>> Makes sense.
>>
>> I think it is worth testing both positive and negative cases:
>>
>> 1. (read-only) direct access the data of read-only percpu data's
>> percpu_array map to test the above change.
>> 2. direct writing the data of read-only percpu data's percpu_array map
>> is disallowed.
>>
>
> both is even better, but negative test is testing a condition that is
> hard to miss because you won't try to do that in practice )
>
Got it.

Will implement both of them.

Thanks,
Leon