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: <20200807111720epcms5p1206fe967bcee6136774c8432ed5b514b@epcms5p1>
Date:   Fri, 07 Aug 2020 16:47:20 +0530
From:   Maninder Singh <maninder1.s@...sung.com>
To:     Vaneet Narang <v.narang@...sung.com>,
        Mark Rutland <mark.rutland@....com>
CC:     "catalin.marinas@....com" <catalin.marinas@....com>,
        "will@...nel.org" <will@...nel.org>,
        "oleg@...hat.com" <oleg@...hat.com>,
        "keescook@...omium.org" <keescook@...omium.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "adobriyan@...il.com" <adobriyan@...il.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "steve.capper@....com" <steve.capper@....com>,
        "vincenzo.frascino@....com" <vincenzo.frascino@....com>,
        "anshuman.khandual@....com" <anshuman.khandual@....com>,
        "ardb@...nel.org" <ardb@...nel.org>,
        "james.morse@....com" <james.morse@....com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "maz@...nel.org" <maz@...nel.org>,
        "kristina.martsenko@....com" <kristina.martsenko@....com>,
        "samitolvanen@...gle.com" <samitolvanen@...gle.com>,
        "ebiederm@...ssion.com" <ebiederm@...ssion.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "gladkov.alexey@...il.com" <gladkov.alexey@...il.com>,
        "daniel.m.jordan@...cle.com" <daniel.m.jordan@...cle.com>,
        "walken@...gle.com" <walken@...gle.com>,
        "bernd.edlinger@...mail.de" <bernd.edlinger@...mail.de>,
        "laoar.shao@...il.com" <laoar.shao@...il.com>,
        "avagin@...il.com" <avagin@...il.com>,
        "john.johansen@...onical.com" <john.johansen@...onical.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        AMIT SAHRAWAT <a.sahrawat@...sung.com>
Subject: RE: [PATCH 1/1] arm64: add support for PAGE_SIZE aligned kernel
 stack


Hi Mark, 

>>If you are seeing issues with the current stack size, can you please
>>explain that in more detail? Where are you seeing problems? Which
>>configuration options do you have selected?
>>

We checked on our system with netflix and youtube 4K videos running
max stack consumption was 7 KB:

sh-3.2# cat /sys/kernel/debug/tracing/stack_max_size  
7312

Thus we thought 16KB wil waste a lot of memory for our ARM64 target,
and 8KB can be less in some exceptional case.
So we decided for 12 KB change.


>>I'm not keen on making kernel stack sizes configurable as it's not
>>currently possible for the person building the kernel to figure out a
>>safe size (and if this were possible, it's be better to handle this
>>automatically).
>>

Ok, can we do something else?, like not making it configurable,
but do code changes to support it for PAGE_SIZE aligned stacks
rather than power of 2 alignement.

Although with configurable also, it depends on VMAP stack,
so user will have stack exhaust  exception and can increase acccordingly also.

> 
>Motivation behind these changes is saving memory on our system. 
>Our system runs around 2500 threads concurrently so saving 4Kb  
>might help us in saving 10MB memory.
> 
>To ensure 12KB is sufficient for our system we have used stack tracing and 
>realised maximum stack used is not more than 9KB. 
> /sys/kernel/tracing/stack_max_size
> 
>Tracing interface defined by kernel to track maximum stack size can be used
>by others to decide appropriate stack size.
> 

Thanks
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ