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:	Tue, 12 Feb 2013 10:58:24 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	"H.J. Lu" <hjl.tools@...il.com>, Ingo Molnar <mingo@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jamie Lokier <jamie@...reable.org>,
	ville.syrjala@...ux.intel.com, Borislav Petkov <bp@...en8.de>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/mm] x86, mm: Use a bitfield to mask nuisance get_user()
 warnings

On 02/12/2013 10:46 AM, Linus Torvalds wrote:
> On Tue, Feb 12, 2013 at 10:25 AM, H. Peter Anvin <hpa@...or.com> wrote:
>> I just thought up this variant, I'm about to test it, but H.J., do you
>> see any problems with it?
>
> Looks good to me. And we already use __builtin_choose_expr(), so it's
> "portable". And it should avoid all the potential issues with
> bitfields (rmk already pointed out how bitfields don't work well with
> the ARM model, who knows what other pitfalls bitfield code generation
> could have)
>
> I wonder if we could/should eventually do some of the sizeof() in
> generic code - not have these magic things duplicated in all the
> architectures, just have the architectures specify the raw typed
> details (__copy_to_user_4() etc). So cross-platform portability could
> be a good thing. That's a separate discussion, though, and possibly
> not worth it.
>

I'm getting rid of the switch statement in the variant that I'm 
currently testing, so that would probably be undesirable.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
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