From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 17 Nov 2015 13:51:20 -0700 From: Ross Zwisler To: Dan Williams Cc: linux-nvdimm@lists.01.org, Dave Chinner , stable@vger.kernel.org, linux-block@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, willy@linux.intel.com, ross.zwisler@linux.intel.com, akpm@linux-foundation.org, "Kirill A. Shutemov" Subject: Re: [PATCH 2/8] dax: disable pmd mappings Message-ID: <20151117205120.GF28024@linux.intel.com> References: <20151117201551.15053.32709.stgit@dwillia2-desk3.jf.intel.com> <20151117201603.15053.77916.stgit@dwillia2-desk3.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151117201603.15053.77916.stgit@dwillia2-desk3.jf.intel.com> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Nov 17, 2015 at 12:16:03PM -0800, Dan Williams wrote: > While dax pmd mappings are functional in the nominal path they trigger > kernel crashes in the following paths: > > BUG: unable to handle kernel paging request at ffffea0004098000 > IP: [] follow_trans_huge_pmd+0x117/0x3b0 > [..] > Call Trace: > [] follow_page_mask+0x2d3/0x380 > [] __get_user_pages+0xe8/0x6f0 > [] get_user_pages_unlocked+0x165/0x1e0 > [] get_user_pages_fast+0xa1/0x1b0 > > kernel BUG at arch/x86/mm/gup.c:131! > [..] > Call Trace: > [] gup_pud_range+0x1bc/0x220 > [] get_user_pages_fast+0x124/0x1b0 > > BUG: unable to handle kernel paging request at ffffea0004088000 > IP: [] copy_huge_pmd+0x159/0x350 > [..] > Call Trace: > [] copy_page_range+0x34c/0x9f0 > [] copy_process+0x1b7f/0x1e10 > [] _do_fork+0x91/0x590 > > All of these paths are interpreting a dax pmd mapping as a transparent > huge page and making the assumption that the pfn is covered by the > memmap, i.e. that the pfn has an associated struct page. PTE mappings > do not suffer the same fate since they have the _PAGE_SPECIAL flag to > cause the gup path to fault. We can do something similar for the PMD > path, or otherwise defer pmd support for cases where a struct page is > available. For now, 4.4-rc and -stable need to disable dax pmd support > by default. > > For development the "depends on BROKEN" line can be removed from > CONFIG_FS_DAX_PMD. > > Cc: > Cc: Jan Kara > Cc: Dave Chinner > Cc: Matthew Wilcox > Cc: Kirill A. Shutemov > Reported-by: Ross Zwisler > Signed-off-by: Dan Williams Acked-by: Ross Zwisler