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: <20160309181003.GF6564@pd.tnic>
Date:	Wed, 9 Mar 2016 19:10:03 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Huang Rui <ray.huang@....com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	spg_linux_kernel@....com, X86 ML <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] x86/delay: Do not use cpu_tss in preemptible ctxt in
 delay_mwaitx()

On Wed, Mar 09, 2016 at 09:56:39AM -0800, Andy Lutomirski wrote:
> On Mar 9, 2016 3:38 AM, "Borislav Petkov" <bp@...en8.de> wrote:
> >
> > From: Borislav Petkov <bp@...e.de>
> >
> > So Andy had a good idea about using a cacheline-aligned, seldomly used
> > per-cpu var as the MONITORX target but we can't use it in preemptible
> > context. The first simple idea I have is to disable preemption around us
> > dereffing it.
> 
> What's the actual problem?  Is it the preempt warnings and, if so,
> would raw_cpu_ptr fix it?

Yeah, it is the warning:

[    1.565876] BUG: using smp_processor_id() in preemptible [00000000] code: udevd/312
[    1.566123] caller is delay_mwaitx+0x40/0xa0

and yes, I think so. I don't think we care about being in preemptible
context since we're going idle anyway and doesn't matter which cpu_tss
we touch.

Yeah, I'll use raw_cpu_ptr...

> It may pay to move it into the loop, though.

... and won't need to do that.

Thanks for the idea.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ