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
| ||
|
Date: Wed, 29 Mar 2017 11:12:26 -0700 From: Matthew Wilcox <willy@...radead.org> To: Peter Zijlstra <peterz@...radead.org> Cc: Jesper Dangaard Brouer <brouer@...hat.com>, Pankaj Gupta <pagupta@...hat.com>, Tariq Toukan <ttoukan.linux@...il.com>, Mel Gorman <mgorman@...hsingularity.net>, Tariq Toukan <tariqt@...lanox.com>, netdev@...r.kernel.org, akpm@...ux-foundation.org, linux-mm <linux-mm@...ck.org>, Saeed Mahameed <saeedm@...lanox.com>, linux-kernel@...r.kernel.org Subject: Re: in_irq_or_nmi() On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 29 Mar 2017 10:12:19 +0200 > > Peter Zijlstra <peterz@...radead.org> wrote: > > > No, that's horrible. Also, wth is this about? A memory allocator that > > > needs in_nmi()? That sounds beyond broken. > > > > It is the other way around. We want to exclude NMI and HARDIRQ from > > using the per-cpu-pages (pcp) lists "order-0 cache" (they will > > fall-through using the normal buddy allocator path). > > Any in_nmi() code arriving at the allocator is broken. No need to fix > the allocator. That's demonstrably true. You can't grab a spinlock in NMI code and the first thing that happens if this in_irq_or_nmi() check fails is ... spin_lock_irqsave(&zone->lock, flags); so this patch should just use in_irq(). (the concept of NMI code needing to allocate memory was blowing my mind a little bit)
Powered by blists - more mailing lists