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: <Ywc1naLthsmxI0cF@worktop.programming.kicks-ass.net>
Date:   Thu, 25 Aug 2022 10:41:01 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Peter Shier <pshier@...gle.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        Len Brown <lenb@...nel.org>,
        Michael Roth <michael.roth@....com>,
        Alexei Starovoitov <ast@...nel.org>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2] intel_idle: avoid tracing MSR writes while idling

On Wed, Aug 24, 2022 at 04:42:11PM -0700, Peter Shier wrote:
> With commit bf5835bcdb963 ("intel_idle: Disable IBRS during long idle"),
> enabling wrmsr trace with CONFIG_LOCKDEP causes "suspicious
> rcu_dereference_check() usage" warning because do_trace_write_msr does not
> use trace_write_msr_rcuidle.
> 
> Change intel_idle_ibrs to use native_wrmsr to avoid tracing
> 
> Signed-off-by: Peter Shier <pshier@...gle.com>
> ---

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

>  drivers/idle/intel_idle.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 3e101719689a..df129c73786f 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -187,12 +187,12 @@ static __cpuidle int intel_idle_ibrs(struct cpuidle_device *dev,
>  	int ret;
>  
>  	if (smt_active)
> -		wrmsrl(MSR_IA32_SPEC_CTRL, 0);
> +		native_wrmsr(MSR_IA32_SPEC_CTRL, 0);
>  
>  	ret = __intel_idle(dev, drv, index);
>  
>  	if (smt_active)
> -		wrmsrl(MSR_IA32_SPEC_CTRL, spec_ctrl);
> +		native_wrmsr(MSR_IA32_SPEC_CTRL, spec_ctrl);
>  
>  	return ret;
>  }
> -- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ