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]
Date: Wed, 29 May 2024 15:54:26 +0800
From: Yujie Liu <yujie.liu@...el.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
CC: kernel test robot <lkp@...el.com>, <oe-kbuild-all@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [paulmck-rcu:dev.2024.05.18a 44/51] update.c:undefined reference
 to `cmpxchg_emu_u8'

On Tue, May 28, 2024 at 12:26:43PM -0700, Paul E. McKenney wrote:
> On Mon, May 27, 2024 at 01:25:58PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.05.18a
> > head:   0e3eb8082184e066eb389f5e6f9c7b8c2d452d66
> > commit: c48887df74a95090e633a29ffbcef00b71cdab66 [44/51] rcu-tasks: Remove open-coded one-byte cmpxchg() emulation
> > config: um-allyesconfig (https://download.01.org/0day-ci/archive/20240527/202405271352.XYjxKyUi-lkp@intel.com/config)
> > compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240527/202405271352.XYjxKyUi-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@...el.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202405271352.XYjxKyUi-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    /usr/bin/ld: kernel/rcu/update.o: in function `rcu_trc_cmpxchg_need_qs':
> > >> update.c:(.text+0x27d5): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o: in function `trc_read_check_handler':
> >    update.c:(.text+0x2839): undefined reference to `cmpxchg_emu_u8'
> > >> /usr/bin/ld: update.c:(.text+0x2882): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o: in function `trc_inspect_reader':
> >    update.c:(.text+0x52ce): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: update.c:(.text+0x5330): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o:update.c:(.text+0x5933): more undefined references to `cmpxchg_emu_u8' follow
> > >> collect2: error: ld returned 1 exit status
> 
> Good catch!!!
> 
> Does the patch below clear this up?

The patch below will select ARCH_NEED_CMPXCHG_1_EMU by default on um
arch, so that cmpxchg-emu.o can be built, and it fixes the link error
for me.

Tested-by: Yujie Liu <yujie.liu@...el.com>

> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> commit 47450c70303a11da1bd650403844ad9e688f05a4
> Author: Paul E. McKenney <paulmck@...nel.org>
> Date:   Tue May 28 12:15:06 2024 -0700
> 
>     um: Emulate one-byte cmpxchg
>     
>     Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on um.
>     
>     Reported-by: kernel test robot <lkp@...el.com>
>     Closes: https://lore.kernel.org/all/202405271352.XYjxKyUi-lkp@intel.com/
>     Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
>     Cc: Richard Weinberger <richard@....at>
>     Cc: Anton Ivanov <anton.ivanov@...bridgegreys.com>
>     Cc: Johannes Berg <johannes@...solutions.net>
>     Cc: <linux-um@...ts.infradead.org>
> 
> diff --git a/arch/um/Kconfig b/arch/um/Kconfig
> index 93a5a8999b07e..5fc55e1d71122 100644
> --- a/arch/um/Kconfig
> +++ b/arch/um/Kconfig
> @@ -11,6 +11,7 @@ config UML
>  	select ARCH_HAS_KCOV
>  	select ARCH_HAS_STRNCPY_FROM_USER
>  	select ARCH_HAS_STRNLEN_USER
> +	select ARCH_NEED_CMPXCHG_1_EMU
>  	select ARCH_NO_PREEMPT
>  	select HAVE_ARCH_AUDITSYSCALL
>  	select HAVE_ARCH_KASAN if X86_64
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ