Re: [RESEND PATCH bpf-next v2 1/4] bpf: Introduce global percpu data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2025/2/19 09:47, Alexei Starovoitov wrote:
> On Thu, Feb 13, 2025 at 8:19 AM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
>>
>>
>> +#ifdef CONFIG_SMP
> 
> What happens on !SMP ?
> I think the code assumes that the verifier will adjust ld_imm64
> with percpu insn.
> On !SMP ld_imm64 will be pointing where?

If !SMP, ld_imm64 correctly loads the address from array->pptrs[0].

Therefore, adding a percpu instruction is unnecessary for !SMP, although
it would still function correctly in that case.

For SMP, a percpu instruction is inserted after ld_imm64 to ensure
proper handling.

Thanks,
Leon





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux