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: <c0bfa2cb-b328-4468-a952-03a8b297c22e@oracle.com>
Date: Wed, 10 Apr 2024 10:45:50 +0200
From: Alexandre Chartre <alexandre.chartre@...cle.com>
To: Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...nel.org>, Ingo Molnar <mingo@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
Cc: Sean Christopherson <seanjc@...gle.com>, "H. Peter Anvin"
 <hpa@...or.com>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/bugs: Fix return type of spectre_bhi_state()


On 4/10/24 01:08, Daniel Sneddon wrote:
> The definition of spectre_bhi_state() incorrectly returns a const char
> * const.  This causes the a compiler warning when building with W=1.
> 
>   warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
>   2812 | static const char * const spectre_bhi_state(void)
> 
> Remove the const qualifier from the pointer.
> 
> Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
> Reported-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Daniel Sneddon <daniel.sneddon@...ux.intel.com>
> ---
>   arch/x86/kernel/cpu/bugs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index e1775debeafe..7e4a706cad80 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -2809,7 +2809,7 @@ static char *pbrsb_eibrs_state(void)
>   	}
>   }
>   
> -static const char * const spectre_bhi_state(void)
> +static const char *spectre_bhi_state(void)
>   {
>   	if (!boot_cpu_has_bug(X86_BUG_BHI))
>   		return "; BHI: Not affected";

Reviewed-by: Alexandre Chartre <alexandre.chartre@...cle.com>

alex.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ