Re: [PATCH bpf-next v4 1/1] libbpf: Correctly set the kernel code version in Debian kernel.

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

 



On Fri, Feb 3, 2023 at 12:17 AM Hao Xiang <hao.xiang@xxxxxxxxxxxxx> wrote:
>
> In a previous commit, Ubuntu kernel code version is correctly set
> by retrieving the information from /proc/version_signature.
>
> commit<5b3d72987701d51bf31823b39db49d10970f5c2d>
> (libbpf: Improve LINUX_VERSION_CODE detection)
>
> The /proc/version_signature file doesn't present in at least the
> older versions of Debian distributions (eg, Debian 9, 10). The Debian
> kernel has a similar issue where the release information from uname()
> syscall doesn't give the kernel code version that matches what the
> kernel actually expects. Below is an example content from Debian 10.
>
> release: 4.19.0-23-amd64
> version: #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64
>
> Debian reports incorrect kernel version in utsname::release returned
> by uname() syscall, which in older kernels (Debian 9, 10) leads to
> kprobe BPF programs failing to load due to the version check mismatch.
>
> Fortunately, the correct kernel code version presents in the
> utsname::version returned by uname() syscall in Debian kernels. This
> change adds another get kernel version function to handle Debian in
> addition to the previously added get kernel version function to handle
> Ubuntu. Some minor refactoring work is also done to make the code more
> readable.
>
> Signed-off-by: Hao Xiang <hao.xiang@xxxxxxxxxxxxx>
> Signed-off-by: Ho-Ren (Jack) Chuang <horenchuang@xxxxxxxxxxxxx>
> ---

yes, the patch looks correctly formatted, but you haven't addressed
all the feedback. Please check my last reply on previous version and
submit a new version with feedback addressed. Thank you.

>  tools/lib/bpf/libbpf.c        | 37 --------------
>  tools/lib/bpf/libbpf_probes.c | 93 +++++++++++++++++++++++++++++++++++
>  2 files changed, 93 insertions(+), 37 deletions(-)
>

[...]



[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