2022-10-26 22:03:41

by kernel test robot

[permalink] [raw]
Subject: progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'

Hi Andres,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 98555239e4c3aab1810d84073166eef6d54eeb3d
commit: 600b7b26c07a070d0153daa76b3806c1e52c9e00 tools bpftool: Fix compilation error with new binutils
date: 3 months ago
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=600b7b26c07a070d0153daa76b3806c1e52c9e00
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 600b7b26c07a070d0153daa76b3806c1e52c9e00
make O=/tmp/kselftest headers
make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'
out__rq_cpu = rq->cpu;
~~ ^
progs/test_ksyms_btf.c:44:27: error: no member named 'cpu' in 'struct rq'
out__cpu_0_rq_cpu = rq->cpu;
~~ ^
progs/test_ksyms_btf.c:48:25: error: no member named 'cpu' in 'struct rq'
out__this_rq_cpu = rq->cpu;
~~ ^
3 errors generated.
--
>> progs/test_ksyms_btf_null_check.c:25:26: error: no member named 'cpu' in 'struct rq'
*(volatile int *)(&rq->cpu);
~~ ^
1 error generated.
--
>> progs/test_ksyms_weak.c:41:29: error: no member named 'cpu' in 'struct rq'
out__existing_typed = rq->cpu;
~~ ^
1 error generated.

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (1.90 kB)
config (149.14 kB)
Download all attachments

2022-10-29 22:41:44

by Andres Freund

[permalink] [raw]
Subject: Re: progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'

Hi,

On 2022-10-27 05:02:14 +0800, kernel test robot wrote:
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 98555239e4c3aab1810d84073166eef6d54eeb3d
> commit: 600b7b26c07a070d0153daa76b3806c1e52c9e00 tools bpftool: Fix compilation error with new binutils
> date: 3 months ago
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce:
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=600b7b26c07a070d0153daa76b3806c1e52c9e00
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 600b7b26c07a070d0153daa76b3806c1e52c9e00
> make O=/tmp/kselftest headers
> make O=/tmp/kselftest -C tools/testing/selftests
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <[email protected]>
>
> All errors (new ones prefixed by >>):
>
> >> progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'
> out__rq_cpu = rq->cpu;
> ~~ ^
> progs/test_ksyms_btf.c:44:27: error: no member named 'cpu' in 'struct rq'
> out__cpu_0_rq_cpu = rq->cpu;
> ~~ ^
> progs/test_ksyms_btf.c:48:25: error: no member named 'cpu' in 'struct rq'
> out__this_rq_cpu = rq->cpu;
> ~~ ^
> 3 errors generated.
> --
> >> progs/test_ksyms_btf_null_check.c:25:26: error: no member named 'cpu' in 'struct rq'
> *(volatile int *)(&rq->cpu);
> ~~ ^
> 1 error generated.
> --
> >> progs/test_ksyms_weak.c:41:29: error: no member named 'cpu' in 'struct rq'
> out__existing_typed = rq->cpu;
> ~~ ^
> 1 error generated.

I tried to reproduce this, without success. And it's not really clear to me
how it could be related to the change either...

Greetings,

Andres Freund

2022-11-04 07:13:54

by Chen, Rong A

[permalink] [raw]
Subject: Re: progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'



On 10/30/2022 6:04 AM, Andres Freund wrote:
> Hi,
>
> On 2022-10-27 05:02:14 +0800, kernel test robot wrote:
>> First bad commit (maybe != root cause):
>>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 98555239e4c3aab1810d84073166eef6d54eeb3d
>> commit: 600b7b26c07a070d0153daa76b3806c1e52c9e00 tools bpftool: Fix compilation error with new binutils
>> date: 3 months ago
>> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
>> reproduce:
>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=600b7b26c07a070d0153daa76b3806c1e52c9e00
>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> git fetch --no-tags linus master
>> git checkout 600b7b26c07a070d0153daa76b3806c1e52c9e00
>> make O=/tmp/kselftest headers
>> make O=/tmp/kselftest -C tools/testing/selftests
>>
>> If you fix the issue, kindly add following tag where applicable
>> | Reported-by: kernel test robot <[email protected]>
>>
>> All errors (new ones prefixed by >>):
>>
>>>> progs/test_ksyms_btf.c:37:21: error: no member named 'cpu' in 'struct rq'
>> out__rq_cpu = rq->cpu;
>> ~~ ^
>> progs/test_ksyms_btf.c:44:27: error: no member named 'cpu' in 'struct rq'
>> out__cpu_0_rq_cpu = rq->cpu;
>> ~~ ^
>> progs/test_ksyms_btf.c:48:25: error: no member named 'cpu' in 'struct rq'
>> out__this_rq_cpu = rq->cpu;
>> ~~ ^
>> 3 errors generated.
>> --
>>>> progs/test_ksyms_btf_null_check.c:25:26: error: no member named 'cpu' in 'struct rq'
>> *(volatile int *)(&rq->cpu);
>> ~~ ^
>> 1 error generated.
>> --
>>>> progs/test_ksyms_weak.c:41:29: error: no member named 'cpu' in 'struct rq'
>> out__existing_typed = rq->cpu;
>> ~~ ^
>> 1 error generated.
>
> I tried to reproduce this, without success. And it's not really clear to me
> how it could be related to the change either...

Hi Andres,

Sorry for the inconvenience, this error can be reproduced by `make
O=/tmp/kselftest -C tools/testing/selftests/bpf`, but it shouldn't be
related to your commit, the build of parent commit stopped in early
stage which caused the false positive.

Best Regards,
Rong Chen

>
> Greetings,
>
> Andres Freund
>