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]
Date:   Mon, 02 Nov 2020 02:08:23 +0100
From:   Thomas Gleixner <>
To:     LKML <>
        Linus Torvalds <>,
        Peter Zijlstra <>,
        Paul McKenney <>,
        David Airlie <>,
        Daniel Vetter <>,
        Ard Biesheuvel <>,
        Herbert Xu <>,
        Christoph Hellwig <>,
        Sebastian Andrzej Siewior <>,
        Ingo Molnar <>,
        Juri Lelli <>,
        Vincent Guittot <>,
        Dietmar Eggemann <>,
        Steven Rostedt <>,
        Ben Segall <>, Mel Gorman <>,
        Daniel Bristot de Oliveira <>,
        Andrew Morton <>,,, Vineet Gupta <>,,
        Russell King <>,
        Arnd Bergmann <>,, Guo Ren <>,, Michal Simek <>,
        Thomas Bogendoerfer <>,, Nick Hu <>,
        Greentime Hu <>,
        Vincent Chen <>,
        Michael Ellerman <>,
        Benjamin Herrenschmidt <>,
        Paul Mackerras <>,,
        "David S. Miller" <>,, Chris Zankel <>,
        Max Filippov <>,, Matthew Wilcox <>
Subject: Re: [patch V2 00/18] mm/highmem: Preemptible variant of kmap_atomic & friends

On Thu, Oct 29 2020 at 23:18, Thomas Gleixner wrote:
> There is also a still to be investigated question from Linus on the initial
> posting versus the per cpu / per task mapping stack depth which might need
> to be made larger due to the ability to take page faults within a mapping
> region.

I looked deeper into that and we have a stack depth of 20. That's plenty
and I couldn't find a way to get above 10 nested ones including faults,
interrupts, softirqs. With some stress testing I was not able to get over
a maximum of 6 according to the traceprintk I added.

For some obscure reason when CONFIG_DEBUG_HIGHMEM is enabled the stack
depth is increased from 20 to 41. But the only thing DEBUG_HIGHMEM does
is to enable a few BUG_ON()'s in the mapping code.

That's a leftover from the historical mapping code which had fixed
entries for various purposes. DEBUG_HIGHMEM inserted guard mappings
between the map types. But that got all ditched when kmap_atomic()
switched to a stack based map management. Though the WITH_KM_FENCE magic
survived without being functional. All the thing does today is to
increase the stack depth.

I just made that functional again by keeping the stack depth increase
and utilizing every second slot. That should catch Willy's mapping
problem nicely if he bothers to test on 32bit :)



Powered by blists - more mailing lists