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]
Date:	Sat, 15 Nov 2014 10:28:32 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Suresh Siddha <sbsiddha@...il.com>,
	Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Steffen Klassert <steffen.klassert@...unet.com>,
	Ming Liu <ming.liu@...driver.com>
Subject: Re: simd: Allow simd use in kernel threads with softirqs disabled

On Fri, Nov 14, 2014 at 05:17:05PM +0100, Ard Biesheuvel wrote:
> On 14 November 2014 16:43, Herbert Xu <herbert@...dor.apana.org.au> wrote:
> > While working on the cryptd request reordering problem, I noticed
> > an anomaly where kernel threads are normally allowed to use simd
> > per may_use_simd, but as soon as you disable softirqs, they suddenly
> > lose that ability for no good reason.
> >
> > The problem is that in_interrupt does not distinguish between
> > softirq processing and simply having softirqs disabled.  This
> > patch creates a new helper in_serving_interrupt which makes that
> > distinction.  It then uses this in all current implementations
> > of may_use_simd.
> >
> 
> Isn't that a much more widespread problem if in_interrupt() yields
> true while no interrupt is being served?

Good point.  Other users of in_interrupt() are just as likely to
really want the in_serving version.  However, the safe option is
to leave them unchanged until we audit each single one.

If it turns out that all users of in_interrupt() decay into
in_serving_interrupt() then we could remove in_interrupt().

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ