* [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
@ 2023-04-17 8:44 songrui.771
2023-04-17 12:36 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: songrui.771 @ 2023-04-17 8:44 UTC (permalink / raw)
To: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann
Cc: bpf, linux-kernel, songrui.771
The introduced header file linux/version.h in libbpf_probes.c may have a
wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old
kernel (Debian9, 10). Below is a version info example from Debian 10.
release: 4.19.0-22-amd64
version: #1 SMP Debian 4.19.260-1 (2022-09-29)
The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)),
which a, b, and c stand for major, minor and patch version. So in example here,
the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which
is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE
in linux/version.h is defined to 267263.
I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is
defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And
KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF
programs in the version check of BPF syscall.
The return value of get_kernel_version in libbpf_probes.c should be matched to
LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
Signed-off-by: songrui.771 <songrui.771@bytedance.com>
---
tools/lib/bpf/libbpf_probes.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
index 4f3bc968ff8e..5b22a880c7e7 100644
--- a/tools/lib/bpf/libbpf_probes.c
+++ b/tools/lib/bpf/libbpf_probes.c
@@ -18,6 +18,10 @@
#include "libbpf.h"
#include "libbpf_internal.h"
+#ifndef LIBBPF_KERNEL_VERSION
+#define LIBBPF_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
+#endif
+
/* On Ubuntu LINUX_VERSION_CODE doesn't correspond to info.release,
* but Ubuntu provides /proc/version_signature file, as described at
* https://ubuntu.com/kernel, with an example contents below, which we
@@ -47,7 +51,7 @@ static __u32 get_ubuntu_kernel_version(void)
if (ret != 3)
return 0;
- return KERNEL_VERSION(major, minor, patch);
+ return LIBBPF_KERNEL_VERSION(major, minor, patch);
}
/* On Debian LINUX_VERSION_CODE doesn't correspond to info.release.
@@ -74,7 +78,7 @@ static __u32 get_debian_kernel_version(struct utsname *info)
if (sscanf(p, "Debian %u.%u.%u", &major, &minor, &patch) != 3)
return 0;
- return KERNEL_VERSION(major, minor, patch);
+ return LIBBPF_KERNEL_VERSION(major, minor, patch);
}
__u32 get_kernel_version(void)
@@ -97,7 +101,7 @@ __u32 get_kernel_version(void)
if (sscanf(info.release, "%u.%u.%u", &major, &minor, &patch) != 3)
return 0;
- return KERNEL_VERSION(major, minor, patch);
+ return LIBBPF_KERNEL_VERSION(major, minor, patch);
}
static int probe_prog_load(enum bpf_prog_type prog_type,
--
2.39.2 (Apple Git-143)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
2023-04-17 8:44 [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel songrui.771
@ 2023-04-17 12:36 ` Greg KH
[not found] ` <CAAz4JzJQNC56t+Yot_0+im0Eop1QLQJNZU8SGUxDsgXiX1RapQ@mail.gmail.com>
2023-04-18 5:44 ` 宋锐
0 siblings, 2 replies; 8+ messages in thread
From: Greg KH @ 2023-04-17 12:36 UTC (permalink / raw)
To: songrui.771
Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, bpf,
linux-kernel
On Mon, Apr 17, 2023 at 04:44:49PM +0800, songrui.771 wrote:
> The introduced header file linux/version.h in libbpf_probes.c may have a
> wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old
> kernel (Debian9, 10). Below is a version info example from Debian 10.
>
> release: 4.19.0-22-amd64
> version: #1 SMP Debian 4.19.260-1 (2022-09-29)
>
> The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)),
> which a, b, and c stand for major, minor and patch version. So in example here,
> the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which
> is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE
> in linux/version.h is defined to 267263.
>
> I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is
> defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And
> KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
>
> The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF
> programs in the version check of BPF syscall.
>
> The return value of get_kernel_version in libbpf_probes.c should be matched to
> LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
>
> Signed-off-by: songrui.771 <songrui.771@bytedance.com>
This needs to be your name, not your email alias (do you use ".771" as a
name to sign things with?)
> ---
> tools/lib/bpf/libbpf_probes.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
> index 4f3bc968ff8e..5b22a880c7e7 100644
> --- a/tools/lib/bpf/libbpf_probes.c
> +++ b/tools/lib/bpf/libbpf_probes.c
> @@ -18,6 +18,10 @@
> #include "libbpf.h"
> #include "libbpf_internal.h"
>
> +#ifndef LIBBPF_KERNEL_VERSION
> +#define LIBBPF_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
> +#endif
What is wrong with using the KERNEL_VERSION() macro, it should be fixed
to work properly here, right? Did we not get this resolved in the
main portion of the kernel already?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <CAAz4JzJQNC56t+Yot_0+im0Eop1QLQJNZU8SGUxDsgXiX1RapQ@mail.gmail.com>]
* Re: [External] Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
[not found] ` <CAAz4JzJQNC56t+Yot_0+im0Eop1QLQJNZU8SGUxDsgXiX1RapQ@mail.gmail.com>
@ 2023-04-17 17:45 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2023-04-17 17:45 UTC (permalink / raw)
To: 宋锐
Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, bpf,
linux-kernel
On Mon, Apr 17, 2023 at 06:44:34AM -0700, 宋锐 wrote:
<snip>
You responded in html, which is dropped by the mailing lists. Please
fix your email client up to not do so and we can continue the
conversation. The kernel Documentation/ directory has a file explaining
how to fix your email client if you have questions about this.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [External] Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
2023-04-17 12:36 ` Greg KH
[not found] ` <CAAz4JzJQNC56t+Yot_0+im0Eop1QLQJNZU8SGUxDsgXiX1RapQ@mail.gmail.com>
@ 2023-04-18 5:44 ` 宋锐
2023-04-18 6:09 ` Greg KH
1 sibling, 1 reply; 8+ messages in thread
From: 宋锐 @ 2023-04-18 5:44 UTC (permalink / raw)
To: Greg KH
Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, bpf,
linux-kernel
> > The introduced header file linux/version.h in libbpf_probes.c may have a
> > wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old
> > kernel (Debian9, 10). Below is a version info example from Debian 10.
> >
> > release: 4.19.0-22-amd64
> > version: #1 SMP Debian 4.19.260-1 (2022-09-29)
> >
> > The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)),
> > which a, b, and c stand for major, minor and patch version. So in example here,
> > the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which
> > is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE
> > in linux/version.h is defined to 267263.
> >
> > I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is
> > defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And
> > KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
> >
> > The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF
> > programs in the version check of BPF syscall.
> >
> > The return value of get_kernel_version in libbpf_probes.c should be matched to
> > LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
> >
> > Signed-off-by: songrui.771 <songrui.771@bytedance.com>
>
> This needs to be your name, not your email alias (do you use ".771" as a
> name to sign things with?)
Thanks for your reminding. I will change it.
>
> > ---
> > tools/lib/bpf/libbpf_probes.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
> > index 4f3bc968ff8e..5b22a880c7e7 100644
> > --- a/tools/lib/bpf/libbpf_probes.c
> > +++ b/tools/lib/bpf/libbpf_probes.c
> > @@ -18,6 +18,10 @@
> > #include "libbpf.h"
> > #include "libbpf_internal.h"
> >
> > +#ifndef LIBBPF_KERNEL_VERSION
> > +#define LIBBPF_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
> > +#endif
>
> What is wrong with using the KERNEL_VERSION() macro, it should be fixed
> to work properly here, right? Did we not get this resolved in the
> main portion of the kernel already?
The KERNEL_VERSION() macro from linux/version.h is wrong in some old
kernel(Debian 9, 10) that we would like to support. As you said, the
problem was resolved in the newer kernel. Here is the difference:
linux/version.h
in older kernel: #define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b)
<< 8)) + (c)))
in newer kernel: #define KERNEL_VERSION(a, b, c) KERNEL_VERSION(a, b,
c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
Using the KERNEL_VERSION macro in the older kernel returns the kern
version which is mismatched to the LINUX_VERSION_CODE that will
cause failing to load the BPF kprobe program.
In my opinion, it is a more generic solution that corrects the
KERNEL_VERSION() macro in libbpf to support some old kernel.
Hope I make that clear. Thanks.
Jerry Song
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [External] Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
2023-04-18 5:44 ` 宋锐
@ 2023-04-18 6:09 ` Greg KH
2023-04-18 6:38 ` 宋锐
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2023-04-18 6:09 UTC (permalink / raw)
To: 宋锐
Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, bpf,
linux-kernel
On Mon, Apr 17, 2023 at 10:44:47PM -0700, 宋锐 wrote:
> > > The introduced header file linux/version.h in libbpf_probes.c may have a
> > > wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old
> > > kernel (Debian9, 10). Below is a version info example from Debian 10.
> > >
> > > release: 4.19.0-22-amd64
> > > version: #1 SMP Debian 4.19.260-1 (2022-09-29)
> > >
> > > The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)),
> > > which a, b, and c stand for major, minor and patch version. So in example here,
> > > the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which
> > > is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE
> > > in linux/version.h is defined to 267263.
> > >
> > > I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is
> > > defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And
> > > KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
> > >
> > > The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF
> > > programs in the version check of BPF syscall.
> > >
> > > The return value of get_kernel_version in libbpf_probes.c should be matched to
> > > LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
> > >
> > > Signed-off-by: songrui.771 <songrui.771@bytedance.com>
> >
> > This needs to be your name, not your email alias (do you use ".771" as a
> > name to sign things with?)
>
> Thanks for your reminding. I will change it.
> >
> > > ---
> > > tools/lib/bpf/libbpf_probes.c | 10 +++++++---
> > > 1 file changed, 7 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
> > > index 4f3bc968ff8e..5b22a880c7e7 100644
> > > --- a/tools/lib/bpf/libbpf_probes.c
> > > +++ b/tools/lib/bpf/libbpf_probes.c
> > > @@ -18,6 +18,10 @@
> > > #include "libbpf.h"
> > > #include "libbpf_internal.h"
> > >
> > > +#ifndef LIBBPF_KERNEL_VERSION
> > > +#define LIBBPF_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
> > > +#endif
> >
> > What is wrong with using the KERNEL_VERSION() macro, it should be fixed
> > to work properly here, right? Did we not get this resolved in the
> > main portion of the kernel already?
>
> The KERNEL_VERSION() macro from linux/version.h is wrong in some old
> kernel(Debian 9, 10) that we would like to support. As you said, the
> problem was resolved in the newer kernel. Here is the difference:
But the kernels you want to "support" all have older kernel versions and
so you do not need the change to the macro as they are not running newer
kernel versions with an increased minor version number.
So on those systems, building will work just fine, if not, then that's a
Debian bug and they should fix it in their kernel packages.
> linux/version.h
> in older kernel: #define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b)
> << 8)) + (c)))
> in newer kernel: #define KERNEL_VERSION(a, b, c) KERNEL_VERSION(a, b,
> c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
>
> Using the KERNEL_VERSION macro in the older kernel returns the kern
> version which is mismatched to the LINUX_VERSION_CODE that will
> cause failing to load the BPF kprobe program.
>
> In my opinion, it is a more generic solution that corrects the
> KERNEL_VERSION() macro in libbpf to support some old kernel.
The KERNEL_VERSION() macro comes from the kernel you are building
against. And so that should match that kernel only.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [External] Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
2023-04-18 6:09 ` Greg KH
@ 2023-04-18 6:38 ` 宋锐
0 siblings, 0 replies; 8+ messages in thread
From: 宋锐 @ 2023-04-18 6:38 UTC (permalink / raw)
To: Greg KH
Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, bpf,
linux-kernel
> > > > The introduced header file linux/version.h in libbpf_probes.c may have a
> > > > wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old
> > > > kernel (Debian9, 10). Below is a version info example from Debian 10.
> > > >
> > > > release: 4.19.0-22-amd64
> > > > version: #1 SMP Debian 4.19.260-1 (2022-09-29)
> > > >
> > > > The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)),
> > > > which a, b, and c stand for major, minor and patch version. So in example here,
> > > > the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which
> > > > is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE
> > > > in linux/version.h is defined to 267263.
> > > >
> > > > I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is
> > > > defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And
> > > > KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
> > > >
> > > > The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF
> > > > programs in the version check of BPF syscall.
> > > >
> > > > The return value of get_kernel_version in libbpf_probes.c should be matched to
> > > > LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
> > > >
> > > > Signed-off-by: songrui.771 <songrui.771@bytedance.com>
> > >
> > > This needs to be your name, not your email alias (do you use ".771" as a
> > > name to sign things with?)
> >
> > Thanks for your reminding. I will change it.
> > >
> > > > ---
> > > > tools/lib/bpf/libbpf_probes.c | 10 +++++++---
> > > > 1 file changed, 7 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
> > > > index 4f3bc968ff8e..5b22a880c7e7 100644
> > > > --- a/tools/lib/bpf/libbpf_probes.c
> > > > +++ b/tools/lib/bpf/libbpf_probes.c
> > > > @@ -18,6 +18,10 @@
> > > > #include "libbpf.h"
> > > > #include "libbpf_internal.h"
> > > >
> > > > +#ifndef LIBBPF_KERNEL_VERSION
> > > > +#define LIBBPF_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
> > > > +#endif
> > >
> > > What is wrong with using the KERNEL_VERSION() macro, it should be fixed
> > > to work properly here, right? Did we not get this resolved in the
> > > main portion of the kernel already?
> >
> > The KERNEL_VERSION() macro from linux/version.h is wrong in some old
> > kernel(Debian 9, 10) that we would like to support. As you said, the
> > problem was resolved in the newer kernel. Here is the difference:
>
> But the kernels you want to "support" all have older kernel versions and
> so you do not need the change to the macro as they are not running newer
> kernel versions with an increased minor version number.
>
> So on those systems, building will work just fine, if not, then that's a
> Debian bug and they should fix it in their kernel packages.
> > linux/version.h
> > in older kernel: #define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b)
> > << 8)) + (c)))
> > in newer kernel: #define KERNEL_VERSION(a, b, c) KERNEL_VERSION(a, b,
> > c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
> >
> > Using the KERNEL_VERSION macro in the older kernel returns the kern
> > version which is mismatched to the LINUX_VERSION_CODE that will
> > cause failing to load the BPF kprobe program.
> >
> > In my opinion, it is a more generic solution that corrects the
> > KERNEL_VERSION() macro in libbpf to support some old kernel.
>
> The KERNEL_VERSION() macro comes from the kernel you are building
> against. And so that should match that kernel only.
Thanks again for your reply. You're absolutely right. This bug exists
on many older kernels(Debian9, 10, CentOS 7). It's not a kernel bug,
but the kernel release package bug. I will correct the
KERNEL_VERSION() macro in header file linux/kernel.h provided by
kernel package to make things right.
Thanks
Best
Jerry Song
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
@ 2023-04-14 4:52 songrui.771
2023-04-14 7:10 ` kernel test robot
0 siblings, 1 reply; 8+ messages in thread
From: songrui.771 @ 2023-04-14 4:52 UTC (permalink / raw)
To: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann
Cc: bpf, linux-kernel, songrui.771
The introduced header file linux/version.h in libbpf_probes.c may have a wrong macro KERNEL_VERSION for calculating LINUX_VERSION_CODE in some old kernel (Debian9,10). Below is a version info example from Debian 10.
release: 4.19.0-22-amd64
version: #1 SMP Debian 4.19.260-1 (2022-09-29)
The macro KERNEL_VERSION is defined to (((a) << 16) + ((b) << 8)) + (c)), which a, b, and c stand for major, minor and patch version. So in example here, the major is 4, minor is 19, patch is 260, the LINUX_VERSION(4, 19, 260) which is 267268 should be matched to LINUX_VERSION_CODE. However, the KERNEL_VERSION_CODE in linux/version.h is defined to 267263.
I noticed that the macro KERNEL_VERSION in linux/version.h of some new kernel is defined to (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))). And KERNEL_VERSION(4, 19, 260) is equal to 267263 which is the right LINUX_VERSION_CODE.
The mismatched LINUX_VERSION_CODE which will cause failing to load kprobe BPF programs in the version check of BPF syscall.
The return value of get_kernel_version in libbpf_probes.c should be matched to LINUX_VERSION_CODE by correcting the macro KERNEL_VERSION.
Signed-off-by: songrui.771 <songrui.771@bytedance.com>
---
tools/lib/bpf/libbpf_probes.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf_probes.c b/tools/lib/bpf/libbpf_probes.c
index 4f3bc968ff8e..a1486dd3bea2 100644
--- a/tools/lib/bpf/libbpf_probes.c
+++ b/tools/lib/bpf/libbpf_probes.c
@@ -12,12 +12,15 @@
#include <linux/btf.h>
#include <linux/filter.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include "bpf.h"
#include "libbpf.h"
#include "libbpf_internal.h"
+#ifndef KERNEL_VERSION
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
+#endif
+
/* On Ubuntu LINUX_VERSION_CODE doesn't correspond to info.release,
* but Ubuntu provides /proc/version_signature file, as described at
* https://ubuntu.com/kernel, with an example contents below, which we
--
2.39.2 (Apple Git-143)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
2023-04-14 4:52 songrui.771
@ 2023-04-14 7:10 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2023-04-14 7:10 UTC (permalink / raw)
To: songrui.771, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann
Cc: oe-kbuild-all, bpf, linux-kernel, songrui.771
Hi songrui.771,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v6.3-rc6 next-20230413]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/songrui-771/libbpf-correct-the-macro-KERNEL_VERSION-for-old-kernel/20230414-125238
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230414045204.9748-1-songrui.771%40bytedance.com
patch subject: [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel
reproduce:
make versioncheck
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304141549.j09aWR6q-lkp@intel.com/
versioncheck warnings: (new ones prefixed by >>)
INFO PATH=/opt/cross/clang/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/bin/timeout -k 100 3h /usr/bin/make W=1 --keep-going HOSTCC=gcc-11 CC=gcc-11 -j32 ARCH=x86_64 versioncheck
find ./* \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o \
-name '*.[hcS]' -type f -print | sort \
| xargs perl -w ./scripts/checkversion.pl
./drivers/accessibility/speakup/genmap.c: 13 linux/version.h not needed.
./drivers/accessibility/speakup/makemapdata.c: 13 linux/version.h not needed.
./drivers/soc/tegra/cbb/tegra-cbb.c: 19 linux/version.h not needed.
./drivers/soc/tegra/cbb/tegra194-cbb.c: 26 linux/version.h not needed.
./drivers/soc/tegra/cbb/tegra234-cbb.c: 27 linux/version.h not needed.
./drivers/staging/media/atomisp/include/linux/atomisp.h: 23 linux/version.h not needed.
./samples/trace_events/trace_custom_sched.c: 11 linux/version.h not needed.
./sound/soc/codecs/cs42l42.c: 14 linux/version.h not needed.
./tools/lib/bpf/bpf_helpers.h: 294: need linux/version.h
>> ./tools/lib/bpf/libbpf_probes.c: 450: need linux/version.h
./tools/perf/tests/bpf-script-example.c: 60: need linux/version.h
./tools/perf/tests/bpf-script-test-kbuild.c: 21: need linux/version.h
./tools/perf/tests/bpf-script-test-prologue.c: 49: need linux/version.h
./tools/perf/tests/bpf-script-test-relocation.c: 51: need linux/version.h
./tools/testing/selftests/bpf/progs/dev_cgroup.c: 9 linux/version.h not needed.
./tools/testing/selftests/bpf/progs/netcnt_prog.c: 3 linux/version.h not needed.
./tools/testing/selftests/bpf/progs/test_map_lock.c: 4 linux/version.h not needed.
./tools/testing/selftests/bpf/progs/test_send_signal_kern.c: 4 linux/version.h not needed.
./tools/testing/selftests/bpf/progs/test_spin_lock.c: 4 linux/version.h not needed.
./tools/testing/selftests/bpf/progs/test_tcp_estats.c: 37 linux/version.h not needed.
./tools/testing/selftests/wireguard/qemu/init.c: 27 linux/version.h not needed.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-18 6:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-17 8:44 [PATCH] libbpf: correct the macro KERNEL_VERSION for old kernel songrui.771
2023-04-17 12:36 ` Greg KH
[not found] ` <CAAz4JzJQNC56t+Yot_0+im0Eop1QLQJNZU8SGUxDsgXiX1RapQ@mail.gmail.com>
2023-04-17 17:45 ` [External] " Greg KH
2023-04-18 5:44 ` 宋锐
2023-04-18 6:09 ` Greg KH
2023-04-18 6:38 ` 宋锐
-- strict thread matches above, loose matches on Subject: below --
2023-04-14 4:52 songrui.771
2023-04-14 7:10 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox