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: <4CC6D8FD.10802@kernel.org>
Date:	Tue, 26 Oct 2010 15:34:53 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	torvalds@...l.org, Alexander van Heukelum <heukelum@...tmail.fm>,
	David Howells <dhowells@...hat.com>, akpm@...ux-foundation.org,
	linux-am33-list@...hat.com, linux-kernel@...r.kernel.org,
	Akira Takeuchi <takeuchi.akr@...panasonic.com>,
	Mark Salter <msalter@...hat.com>
Subject: Re: [PATCH] x86, percpu: revert commit fe8e0c25

Hello,

On 10/26/2010 03:25 PM, Ingo Molnar wrote:
> 
> * Tejun Heo <tj@...nel.org> wrote:
> 
>> Commit fe8e0c25 (x86, 32-bit: Align percpu area and irq stacks to THREAD_SIZE) 
>> aligned PERCPU section to THREAD_SIZE which can be larger than PAGE_SIZE, 
>> introduced DEFINE_PER_CPU_MULTIPAGE_ALIGNED() and used it to make irq stacks 
>> aligned to THREAD_SIZE on x86_32.
>>
>> This won't work.  The PERCPU output section is used as the template to prepare the 
>> percpu area and the actual percpu area is _alwasy_ aligned to PAGE_SIZE whether 
>> the source area is aligned to larger size or not.
> 
> The problem is, this will reintroduce a nasty boot crash which commit fe8e0c25 
> fixed. Do you say that fe8e0c25 didnt have the alignment effect?

AFAICS, not in a way which is correct.  The patch probably made the
following two differences.

* The stack in the template area is THREAD_SIZE aligned.  If something
  was dereferencing it before percpu init, this could have helped.
  IIRC, x86 early init code does use the template area.

* The percpu address would be THREAD_SIZE aligned while the translated
  kernel address for each cpu wouldn't be.  For masking stack pointer
  to find out task struct, I don't think aligning the percpu address
  would have been helpful.

It's simply broken and needs to be reverted.  If the patch somehow
fixed boot crash, yeah, we probably want to put a fix for it first
tho.

Thanks.

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