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: <YilD68QeKpgJG1W2@dev-arch.thelio-3990X>
Date:   Wed, 9 Mar 2022 17:18:51 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     kernel test robot <lkp@...el.com>,
        Marek Vasut <marek.vasut+renesas@...il.com>,
        llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Arnd Bergmann <arnd@...db.de>,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [lpieralisi-pci:pci/rcar 2/2]
 drivers/pci/controller/pcie-rcar-host.c:139:3: error: instruction requires:
 data-barriers

Hi Bjorn,

On Wed, Mar 09, 2022 at 05:09:50PM -0600, Bjorn Helgaas wrote:
> On Wed, Mar 09, 2022 at 05:04:28PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git pci/rcar
> > head:   9775965dbae50a04f12879179d6d6fb58f240d6b
> > commit: 9775965dbae50a04f12879179d6d6fb58f240d6b [2/2] PCI: rcar: Use PCI_SET_ERROR_RESPONSE after read which triggered an exception
> > config: arm-randconfig-c002-20220307 (https://download.01.org/0day-ci/archive/20220309/202203091741.IetDk7a7-lkp@intel.com/config)
> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
> > 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/lpieralisi/pci.git/commit/?id=9775965dbae50a04f12879179d6d6fb58f240d6b
> >         git remote add lpieralisi-pci https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
> >         git fetch --no-tags lpieralisi-pci pci/rcar
> >         git checkout 9775965dbae50a04f12879179d6d6fb58f240d6b
> >         # save the config file 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
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@...el.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> > >> drivers/pci/controller/pcie-rcar-host.c:139:3: error: instruction requires: data-barriers
> >                    __rcar_pci_rw_reg_workaround("str")
> >                    ^
> >    drivers/pci/controller/pcie-rcar-host.c:120:4: note: expanded from macro '__rcar_pci_rw_reg_workaround'
> >                    "2:     isb\n"                                          \
> >                     ^
> >    <inline asm>:2:4: note: instantiated into assembly here
> >    2:      isb
> >            ^
> >    drivers/pci/controller/pcie-rcar-host.c:153:3: error: instruction requires: data-barriers
> >                    __rcar_pci_rw_reg_workaround("ldr")
> >                    ^
> >    drivers/pci/controller/pcie-rcar-host.c:120:4: note: expanded from macro '__rcar_pci_rw_reg_workaround'
> >                    "2:     isb\n"                                          \
> >                     ^
> >    <inline asm>:2:4: note: instantiated into assembly here
> >    2:      isb
> >            ^
> >    2 errors generated.
> 
> I don't know how to fix this.  We currently have these on Lorenzo's
> pci/rcar branch:
> 
>   9775965dbae5 ("PCI: rcar: Use PCI_SET_ERROR_RESPONSE after read which triggered an exception")
>   de6b5097f58b ("PCI: rcar: Finish transition to L1 state in rcar_pcie_config_access()")
> 
> To avoid this error, for now I have cherry-picked de6b5097f58b to a
> local pci/host/rcar branch and dropped 9775965dbae5.

FWIW, this is not clang specific, the same configuration blows up with
GCC 11.2.0 as well:

$ make -skj"$(nproc)" \
       ARCH=arm \
       CROSS_COMPILE=arm-linux-gnueabi- \
       olddefconfig drivers/pci/controller/pcie-rcar-host.o
/tmp/ccz8ybtm.s: Assembler messages:
/tmp/ccz8ybtm.s:742: Error: selected processor does not support `isb' in ARM mode
/tmp/ccz8ybtm.s:812: Error: selected processor does not support `isb' in ARM mode
make[4]: *** [scripts/Makefile.build:288: drivers/pci/controller/pcie-rcar-host.o] Error 1

$ rg CONFIG_CPU_32 .config
289:CONFIG_CPU_32v4=y

It does not look like isb can be used with this configuration, at least
if I understand arch/arm/include/asm/barrier.h correctly.

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ