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] [day] [month] [year] [list]
Message-ID: <CACVXFVPh1UK2kGoKRY6WuCiDGkk2ijNtgPNWy-PWU7e_v-0C=w@mail.gmail.com>
Date:	Mon, 24 Oct 2011 18:36:35 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Arnd Bergmann <arnd@...db.de>,
	linux-arm-kernel@...ts.infradead.org,
	Tim Bird <tim.bird@...sony.com>, Joe Perches <joe@...ches.com>,
	linux kernel <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 0/3] ARM 4Kstacks: introduction

Hi,

On Sat, Oct 22, 2011 at 9:36 PM, Russell King - ARM Linux
<linux@....linux.org.uk> wrote:
> On Sat, Oct 22, 2011 at 04:50:15PM +0800, Ming Lei wrote:
>> On Wed, Oct 19, 2011 at 6:51 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> > On Tuesday 18 October 2011 17:26:44 Tim Bird wrote:
>> >> Even inside Sony, usage of 4K stacks is limited
>> >> to some very special cases, where memory is exceedingly
>> >> tight (we have one system with 4M of RAM).  And we
>> >> don't mind lopping off features or coding around
>> >> problem areas to support our special case.
>> >
>> > I would imagine that in those cases, you can gain more by reducing the
>> > number of threads in the system. What is the highest number of
>> > concurrent threads that you expect in a limited use case with no
>> > networking or block devices?
>>
>> If system run for some time, sometimes it may be difficult for
>> memory allocator to allocate 2 continuous page frames even  there are
>> many spare page frames in system because of
>> fragment issue, so the patch does make sense.
>
> If memory fragmentation is an issue for this, it probably means that we
> need to switch to a software page size of 8K (or maybe 16K) rather than
> stick with the hardware 4K size.  That would be a much more reliable
> solution, especially as the L1 page table is 16K (if you're suffering
> from memory fragmentation, the first thing which'd get you is the L1
> page table allocation, not the kernel stack allocation.)

If large page size is taken, memory utilization will be decreased a lot, so
may cause some low memory system not workable at all.

>> Anyway, it provides one option for user to apply 4k stack to avoid
>> such kind of process creation failure.
>
> I refer you to the comments made by people who've tried running with 4K
> stacks on x86, and their _vast_ experience of doing this.  If they say
> that it causes stack overflows, then it's a problem.

Stack overflow depends on code running path. For some low memory
and simple application, the code path is not deep as x86, so providing
a option of enabling 4K stack still makes sense for this kind of case or
application.


thanks,
-- 
Ming Lei
--
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