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:	Thu, 03 Jul 2008 12:57:01 +0100
From:	Richard Kennedy <richard@....demon.co.uk>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	the arch/x86 maintainers <x86@...nel.org>
Subject: Re: x86_64: tss_struct layout does not match comments  !?


On Thu, 2008-07-03 at 13:39 +0200, Ingo Molnar wrote:
> * Richard Kennedy <richard@....demon.co.uk> wrote:
> 
> > Hi Ingo,
> > 
> > the comments in the definition of tss_struct suggests is should be
> > cacheline aligned ( or 256 byte aligned ? ) :- 
> > 
> > |struct tss_struct {
> > |....
> > |	/*
> > |	 * Pad the TSS to be cacheline-aligned (size is 0x100):
> > |	 */
> > |	unsigned long		__cacheline_filler[35];
> > |	/*
> > |	 * .. and then another 0x100 bytes for the emergency kernel stack:
> > |	 */
> > |	unsigned long		stack[64];
> > |
> > |} __attribute__((packed));
> > 
> > However on a 64 bit build the size of tss_struct is 9136,
> > cacheline_filler is 280 and stack size is 512 at offset 8624.
> > None of which are cacheline aligned.
> > 
> > I'm guessing this isn't what was intended.
> > 
> > do you know what the original intention was ?
> > 
> > 1. struct tss_struct{...} __cacheline_aligned;
> > or just
> > 2. struct tss_struct {
> > ...
> > long stack[64] __cacheline_aligned;
> > }
> 
> #1 is the intent - because each CPU has a separate TSS. init_tss.stack 
> is really just an emergency static stack we have in place for very early 
> exceptions.
> 
> i think the __cacheline_filler could be removed safely. Mind sending a 
> patch for that?
> 
> 	Ingo

No problem.
Richard 

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