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:   Thu, 25 Nov 2021 15:00:16 +0000
From:   Andrew Cooper <amc96@...f.net>
To:     Juergen Gross <jgross@...e.com>, xen-devel@...ts.xenproject.org,
        x86@...nel.org, linux-kernel@...r.kernel.org
Cc:     peterz@...radead.org, Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline

On 25/11/2021 09:20, Juergen Gross wrote:
> HYPERVISOR_get_debugreg() is being called from noinstr code, so it
> should be attributed "always_inline".
>
> Fixes: f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>  arch/x86/include/asm/xen/hypercall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
> index 0575f5863b7f..28ca1119606b 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value)
>  	return _hypercall2(int, set_debugreg, reg, value);
>  }
>  
> -static inline unsigned long
> +static __always_inline unsigned long
>  HYPERVISOR_get_debugreg(int reg)
>  {
>  	return _hypercall1(unsigned long, get_debugreg, reg);

All this is going to do is push the error one step further in.

Next, objtool will complain that hypercall_page isn't noinstr.

~Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ