Re: [PATCH bpf] tools: bpftool: JIT limited misreported as negative value on aarch64

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

 



2023-05-12 13:58 UTC+0200 ~ Jiri Olsa <olsajiri@xxxxxxxxx>
> On Fri, May 12, 2023 at 12:31:34PM +0100, Alan Maguire wrote:
>> On aarch64, "bpftool feature" reports an incorrect BPF JIT limit:
>>
>> $ sudo /sbin/bpftool feature
>> Scanning system configuration...
>> bpf() syscall restricted to privileged users
>> JIT compiler is enabled
>> JIT compiler hardening is disabled
>> JIT compiler kallsyms exports are enabled for root
>> skipping kernel config, can't open file: No such file or directory
>> Global memory limit for JIT compiler for unprivileged users is -201326592 bytes
>>
>> This is because /proc/sys/net/core/bpf_jit_limit reports
>>
>> $ sudo cat /proc/sys/net/core/bpf_jit_limit
>> 68169519595520
>>
>> ...and an int is assumed in read_procfs().  Change read_procfs()
>> to return a long to avoid negative value reporting.
>>
>> Fixes: 7a4522bbef0c ("tools: bpftool: add probes for /proc/ eBPF parameters")
>> Reported-by: Nicky Veitch <nicky.veitch@xxxxxxxxxx>
>> Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
> 
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> 
> jirka

Acked-by: Quentin Monnet <quentin@xxxxxxxxxxxxx>

Thanks!





[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