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:   Tue, 1 Aug 2017 12:49:18 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     kan.liang@...el.com
Cc:     linux-kernel@...r.kernel.org, axboe@...com,
        viro@...iv.linux.org.uk, kirill.shutemov@...ux.intel.com,
        ying.huang@...el.com, npiggin@...il.com, mingo@...nel.org
Subject: Re: [PATCH] mm: allow page_cache_get_speculative in interrupt
 context

On Tue,  1 Aug 2017 13:39:06 -0400 kan.liang@...el.com wrote:

> Kernel panic when calling the IRQ-safe __get_user_pages_fast in NMI
> handler.
> 
> The bug was introduced by commit:
> 
>   2947ba054a4d ("x86/mm/gup: Switch GUP to the generic
> get_user_page_fast() implementation")
> 
> The original x86 __get_user_page_fast used plain get_page() or
> page_ref_add(). However, the generic __get_user_page_fast uses
> page_cache_get_speculative(), which has VM_BUG_ON(in_interrupt()).
> 
> There is no reason to prevent page_cache_get_speculative from using in
> interrupt context. According to the author, putting a BUG_ON there is
> just because the code is not verifying correctness of interrupt races.
> I did some tests in interrupt context. There is no issue found.
> Removing VM_BUG_ON(in_interrupt()) for page_cache_get_speculative().

What code calls page_cache_get_speculative() from NMI context?  

I'm trying to work out which kernel versions need this fix, but there
isn't enough info in the changelog for this.  Please don't do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ