2021-10-05 02:04:25

by kernel test robot

[permalink] [raw]
Subject: [ardb:arm-vmap-stacks 5/20] arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'

tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm-vmap-stacks
head: 9f4b28a772c8a5fb46362418b45a779c7b8c0bc5
commit: 12e3ad2cad7748f0816216192d7554be2eca2655 [5/20] ARM: smp: Enable THREAD_INFO_IN_TASK
config: arm-randconfig-r012-20211004 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dec2257f354d39dbd8232e6bd1a417d91c4f14a2)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=12e3ad2cad7748f0816216192d7554be2eca2655
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm-vmap-stacks
git checkout 12e3ad2cad7748f0816216192d7554be2eca2655
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/ arch/arm/mm/

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

All errors (new ones prefixed by >>):

>> arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'
pid = task_pid_nr(thread->task) << ASID_BITS;
~~~~~~ ^
1 error generated.


vim +112 arch/arm/mm/context.c

14d8c9512aef5b Catalin Marinas 2011-11-22 100
575320d625d5b5 Will Deacon 2012-07-06 101 #ifdef CONFIG_PID_IN_CONTEXTIDR
575320d625d5b5 Will Deacon 2012-07-06 102 static int contextidr_notifier(struct notifier_block *unused, unsigned long cmd,
575320d625d5b5 Will Deacon 2012-07-06 103 void *t)
575320d625d5b5 Will Deacon 2012-07-06 104 {
575320d625d5b5 Will Deacon 2012-07-06 105 u32 contextidr;
575320d625d5b5 Will Deacon 2012-07-06 106 pid_t pid;
575320d625d5b5 Will Deacon 2012-07-06 107 struct thread_info *thread = t;
575320d625d5b5 Will Deacon 2012-07-06 108
575320d625d5b5 Will Deacon 2012-07-06 109 if (cmd != THREAD_NOTIFY_SWITCH)
575320d625d5b5 Will Deacon 2012-07-06 110 return NOTIFY_DONE;
575320d625d5b5 Will Deacon 2012-07-06 111
575320d625d5b5 Will Deacon 2012-07-06 @112 pid = task_pid_nr(thread->task) << ASID_BITS;
575320d625d5b5 Will Deacon 2012-07-06 113 asm volatile(
575320d625d5b5 Will Deacon 2012-07-06 114 " mrc p15, 0, %0, c13, c0, 1\n"
ae3790b8a91642 Will Deacon 2012-08-24 115 " and %0, %0, %2\n"
ae3790b8a91642 Will Deacon 2012-08-24 116 " orr %0, %0, %1\n"
ae3790b8a91642 Will Deacon 2012-08-24 117 " mcr p15, 0, %0, c13, c0, 1\n"
575320d625d5b5 Will Deacon 2012-07-06 118 : "=r" (contextidr), "+r" (pid)
ae3790b8a91642 Will Deacon 2012-08-24 119 : "I" (~ASID_MASK));
575320d625d5b5 Will Deacon 2012-07-06 120 isb();
575320d625d5b5 Will Deacon 2012-07-06 121
575320d625d5b5 Will Deacon 2012-07-06 122 return NOTIFY_OK;
575320d625d5b5 Will Deacon 2012-07-06 123 }
575320d625d5b5 Will Deacon 2012-07-06 124

:::::: The code at line 112 was first introduced by commit
:::::: 575320d625d5b5eb115575a1f5e17af456e69577 ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process

:::::: TO: Will Deacon <[email protected]>
:::::: CC: Russell King <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (3.70 kB)
.config.gz (32.93 kB)
Download all attachments

2021-10-21 06:57:55

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [ardb:arm-vmap-stacks 5/20] arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'

On Tue, Oct 5, 2021 at 4:03 AM kernel test robot <[email protected]> wrote:
>

> All errors (new ones prefixed by >>):
>
> >> arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'
> pid = task_pid_nr(thread->task) << ASID_BITS;
> ~~~~~~ ^
> 1 error generated.

I ran into this as well on my randconfig builds, though it happens very rarely.

Apparently CONFIG_THREAD_INFO_IN_TASK is incompatible with
CONFIG_PID_IN_CONTEXTIDR, but should be easy to fix by changing that
one line to do the right thing.

Arnd

2021-10-21 07:05:16

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [ardb:arm-vmap-stacks 5/20] arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'

On Thu, 21 Oct 2021 at 08:55, Arnd Bergmann <[email protected]> wrote:
>
> On Tue, Oct 5, 2021 at 4:03 AM kernel test robot <[email protected]> wrote:
> >
>
> > All errors (new ones prefixed by >>):
> >
> > >> arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'
> > pid = task_pid_nr(thread->task) << ASID_BITS;
> > ~~~~~~ ^
> > 1 error generated.
>
> I ran into this as well on my randconfig builds, though it happens very rarely.
>
> Apparently CONFIG_THREAD_INFO_IN_TASK is incompatible with
> CONFIG_PID_IN_CONTEXTIDR, but should be easy to fix by changing that
> one line to do the right thing.
>

None of the existing configs enable that, so that is why I never saw
this even with all the kernelci coverage.

I'll send a patch to fix this.

2021-10-21 07:21:28

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [ardb:arm-vmap-stacks 5/20] arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'

On Thu, Oct 21, 2021 at 9:02 AM Ard Biesheuvel <[email protected]> wrote:
>
> On Thu, 21 Oct 2021 at 08:55, Arnd Bergmann <[email protected]> wrote:
> >
> > On Tue, Oct 5, 2021 at 4:03 AM kernel test robot <[email protected]> wrote:
> > >
> >
> > > All errors (new ones prefixed by >>):
> > >
> > > >> arch/arm/mm/context.c:112:28: error: no member named 'task' in 'struct thread_info'
> > > pid = task_pid_nr(thread->task) << ASID_BITS;
> > > ~~~~~~ ^
> > > 1 error generated.
> >
> > I ran into this as well on my randconfig builds, though it happens very rarely.
> >
> > Apparently CONFIG_THREAD_INFO_IN_TASK is incompatible with
> > CONFIG_PID_IN_CONTEXTIDR, but should be easy to fix by changing that
> > one line to do the right thing.
> >
>
> None of the existing configs enable that, so that is why I never saw
> this even with all the kernelci coverage.

Right, I have no idea what makes this configuration so rare, it took me
hundreds of randconfig builds before I first ran into it.

Arnd