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:	Wed, 18 Jun 2014 18:49:09 +0400
From:	Andrey Ryabinin <a.ryabinin@...sung.com>
To:	Will Deacon <will.deacon@....com>
Cc:	Russell King <linux@....linux.org.uk>,
	Nicolas Pitre <nico@...aro.org>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] arm: get rid of hardcoded assumptions about kernel stack
 size

On 06/18/14 18:31, Will Deacon wrote:
> On Wed, Jun 18, 2014 at 02:50:22PM +0100, Andrey Ryabinin wrote:
>> Changing kernel stack size on arm is not as simple as it should be:
>> 1) THRED_SIZE macro doen't respect PAGE_SIZE and THREAD_SIZE_ORDER
> 
> THREAD_SIZE
> 
Yup, I just found some more typos in my commit message.
I'll fix them in update.

>> 2) stack size is hardcoded in get_thread_info macro
>>
>> This patch fixes it by caculating THREAD_SIZE and thread_info address
>> taking into account PAGE_SIZE and THREAD_SIZE_ORDER.
>>
>> Now changing stack size becomes simply changing THREAD_SIZE_ORDER.
> 
> Curious: is this just a cleanup, or are you actually running out of kernel
> stack on an ARM platform?
> 

It's actually both.
I'm working on address sanitizer for kernel [1]. Recently we started experiments with
stack instrumentation. Compiler inserts redzones around every variable on stack, so
we could detect accesses to such redzones and catch out-of-bound read/write bugs on stack variables.
Obviously stack is bloated in such kernel.
For mainline kernel it just a cleanup.


[1] https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel

> Will
> 

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