lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjNZy2luiN0E1JNN@ip-172-31-19-208.ap-northeast-1.compute.internal>
Date:   Thu, 17 Mar 2022 15:54:51 +0000
From:   Hyeonggon Yoo <42.hyeyoo@...il.com>
To:     Zhouyi Zhou <zhouzhouyi@...il.com>
Cc:     rcu <rcu@...r.kernel.org>, "Paul E. McKenney" <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: RCU: undefined reference to irq_work_queue

On Thu, Mar 17, 2022 at 11:22:28PM +0800, Zhouyi Zhou wrote:
> Hi,
> 
> On Thu, Mar 17, 2022 at 8:48 PM Hyeonggon Yoo <42.hyeyoo@...il.com> wrote:
> >
> > Hello RCU folks,
> >
> > I like to use minimal configuration for kernel development.
> > when building with tinyconfig + CONFIG_PREEMPT=y on arm64:
> I invoke cross compiler to reproduce the bug on my X86 machine
> $make  ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
> CC=aarch64-linux-gnu-gcc-10 tinyconfig
> let CONFIG_PREEMPT=y  in .config
> $make  ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
> CC=aarch64-linux-gnu-gcc-10 -j 16
> LD      vmlinux
> aarch64-linux-gnu-ld: kernel/rcu/update.o: in function `call_rcu_tasks':
> update.c:(.text+0xb30): undefined reference to `irq_work_queue'
> update.c:(.text+0xb30): relocation truncated to fit: R_AARCH64_CALL26
> against undefined symbol `irq_work_queue'

Right. that was exactly what I faced :)

> >
> > ld: kernel/rcu/update.o: in function `call_rcu_tasks':
> > update.c:(.text+0xb2c): undefined reference to `irq_work_queue'
> > update.c:(.text+0xb2c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `irq_work_queue'
> > make: *** [Makefile:1155: vmlinux] Error 1
> >
> > It seems RCU calls irq_work_queue() without checking if CONFIG_IRQ_WORK is enabled.
> >
> > --
> > Thank you, You are awesome!
> > Hyeonggon :-)

> Meanwhile, there is no error for doing the same to build X86 kernel.
> I think the reason is:
> arch/x86/Kconfig select PERF_EVENT
> and PERF_EVENT select IRQ_WORK

Right. selecting anything that selects IRQ_WORK solves the problem.
Simply enabling printk also solves this.

> Hope my little research could provide some clues to solve the problem ;-)

Thank you for kind reply!

BTW, can we just fix this? (e.g. by conditionally compiling the problematic
code or always selecting IRQ_WORK)

> You are welcome
> Cheers
> Zhouyi

-- 
Thank you, You are awesome!
Hyeonggon :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ