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]
Message-ID: <CAAhSdy0ZPH2a9D0jDNhp5OU2oRdvC-wZcu0Zjtcq9ZhMWcrMng@mail.gmail.com>
Date:   Sat, 9 Apr 2022 09:21:11 +0530
From:   Anup Patel <anup@...infault.org>
To:     Heiko Stuebner <heiko@...ech.de>
Cc:     Atish Patra <atishp@...shpatra.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        KVM General <kvm@...r.kernel.org>,
        "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" 
        <kvm-riscv@...ts.infradead.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org List" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RISC-V: KVM: include missing hwcap.h into vcpu_fp

On Fri, Apr 8, 2022 at 2:54 PM Heiko Stuebner <heiko@...ech.de> wrote:
>
> vcpu_fp uses the riscv_isa_extension mechanism which gets
> defined in hwcap.h but doesn't include that head file.
>
> While it seems to work in most cases, in certain conditions
> this can lead to build failures like
>
> ../arch/riscv/kvm/vcpu_fp.c: In function ‘kvm_riscv_vcpu_fp_reset’:
> ../arch/riscv/kvm/vcpu_fp.c:22:13: error: implicit declaration of function ‘riscv_isa_extension_available’ [-Werror=implicit-function-declaration]
>    22 |         if (riscv_isa_extension_available(&isa, f) ||
>       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../arch/riscv/kvm/vcpu_fp.c:22:49: error: ‘f’ undeclared (first use in this function)
>    22 |         if (riscv_isa_extension_available(&isa, f) ||
>
> Fix this by simply including the necessary header.
>
> Fixes: 0a86512dc113 ("RISC-V: KVM: Factor-out FP virtualization into separate sources")
> Signed-off-by: Heiko Stuebner <heiko@...ech.de>

I have queued this for RC fixes.

Thanks,
Anup

> ---
>  arch/riscv/kvm/vcpu_fp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/kvm/vcpu_fp.c b/arch/riscv/kvm/vcpu_fp.c
> index 4449a976e5a6..d4308c512007 100644
> --- a/arch/riscv/kvm/vcpu_fp.c
> +++ b/arch/riscv/kvm/vcpu_fp.c
> @@ -11,6 +11,7 @@
>  #include <linux/err.h>
>  #include <linux/kvm_host.h>
>  #include <linux/uaccess.h>
> +#include <asm/hwcap.h>
>
>  #ifdef CONFIG_FPU
>  void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu)
> --
> 2.35.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ