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] [day] [month] [year] [list]
Date:   Mon, 19 Jun 2023 22:14:35 +0530
From:   Anup Patel <anup@...infault.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Naresh Kamboju <naresh.kamboju@...aro.org>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        clang-built-linux <llvm@...ts.linux.dev>,
        lkft-triage@...ts.linaro.org, Anup Patel <apatel@...tanamicro.com>,
        Atish Patra <atishp@...osinc.com>,
        Arnd Bergmann <arnd@...db.de>,
        Anders Roxell <anders.roxell@...aro.org>
Subject: Re: next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared
 function 'arch_atomic_long_fetch_or'

On Mon, Jun 19, 2023 at 6:30 PM Mark Rutland <mark.rutland@....com> wrote:
>
> On Mon, Jun 19, 2023 at 03:27:47PM +0530, Naresh Kamboju wrote:
> > Following build regressions noticed on Linux next-20230619.
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> >
> > Regressions found on riscv:
> >
> >  - build/rv32-clang-16-lkftconfig
> >  - build/rv32-clang-16-tinyconfig
> >  - build/rv32-clang-nightly-defconfig
> >  - build/rv32-clang-16-allnoconfig
> >  - build/gcc-12-defconfig
> >  - build/gcc-11-lkftconfig
> >  - build/clang-16-lkftconfig
> >  - build/rv32-clang-16-defconfig
> >  - build/gcc-8-defconfig
> >  - build/rv32-gcc-11-lkftconfig
> >  - build/clang-16-defconfig
> >  - build/rv32-clang-nightly-allnoconfig
> >  - build/rv32-clang-nightly-tinyconfig
> >  - build/clang-nightly-defconfig
> >
> >
> > arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function
> >  'arch_atomic_long_fetch_or'; ISO C99 and later do not support implicit
> >     function declarations [-Wimplicit-function-declaration]
> >         return arch_atomic_long_fetch_or(val, (atomic_long_t *)ptr);
> >                ^
> > arch/riscv/kvm/aia_imsic.c:237:9: note: did you mean 'raw_atomic_long_fetch_or'?
> > include/linux/atomic/atomic-long.h:1087:1: note:
> > 'raw_atomic_long_fetch_or' declared here
> > raw_atomic_long_fetch_or(long i, atomic_long_t *v)
> > ^
> > 1 error generated.
>
> It looks like this is because:
>
>   2f68d5420412040e ("RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC")
>
> ... added a call to arch_atomic_long_fetch_or(), but we've reworked the atomics
> in the tip locking/core branch such that arch_atomic_long_fetch_or() doesn't
> exist unless provided directly by the architecture.
>
> Does this actually need to be arch_atomic_long_fetch_or(), i.e. was there a
> specific reason not to use atomic_long_fetch_or() here?
>
> If not, then please use atomic_long_fetch_or() -- that'll work before and after
> the locking/core changes.

There is no specific reason for using arch_atomic_long_fetch_or().
I will update the patch to use atomic_long_fetch_or().

Thanks for catching.

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ