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: <alpine.LFD.2.11.1507051049480.31060@eddie.linux-mips.org>
Date:	Sun, 5 Jul 2015 11:00:14 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Ingo Molnar <mingo@...nel.org>
cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jan Kara <jack@...e.cz>, Borislav Petkov <bp@...en8.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH] x86/fpu: Fix boot crash in the early FPU code

On Sat, 4 Jul 2015, Ingo Molnar wrote:

> Btw., is it a GCC bug or a known GCC property that a structure with a 16-byte 
> alignment attribute does not get properly aligned on the stack?

 What's the stack alignment mandated by the x86 psABI?  Is that anything 
beyond what the PUSH instructions imply (i.e. 4 bytes for 32-bit and 8 
bytes for 64-bit targets)?  Otherwise GCC might not be smart enough to 
apply the right subtract and mask operations to the stack/frame pointer.  
This might even have been documented with the alignment attribute.

> So fix this bug by making the variable static again, but also mark it
> __initdata this time, because fpu__init_system_mxcsr() is now an
> __init function.

 You could have used `alloca' and manually aligned the structure within 
the area obtained too (to avoid static storage if desired).

 FWIW,

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