Re: [PATCH 1/1] userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered

2018-12-06 Thread Hugh Dickins
> Cc: > Fixes: 29ec90660d68 ("userfaultfd: shmem/hugetlbfs: only allow to register > VM_MAYWRITE vmas") > Reported-by: syzbot+06c7092e7d71218a2...@syzkaller.appspotmail.com > Signed-off-by: Andrea Arcangeli Acked-by: Hugh Dickins > --- > fs/userfaultfd.c | 3 ++-

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-27 Thread Hugh Dickins
On Tue, 27 Nov 2018, Mike Rapoport wrote: > On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: > > > > +/* > > + * A choice of three behaviors for wait_on_page_bit_common(): > > + */ > > +enum behavior { > > + EXCLUSIVE, /* Hold ref to

[PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-26 Thread Hugh Dickins
ut I don't think it matters much, since shrink_page_list() already had to win its trylock_page(), so waiters are not very common there: I noticed no difference when trying the bigger change, and it's surely not needed while put_and_wait_on_page_locked() is only used for page migration. Reported-an

Re: [PATCH] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-25 Thread Hugh Dickins
On Sun, 25 Nov 2018, Linus Torvalds wrote: > On Sat, Nov 24, 2018 at 7:21 PM Hugh Dickins wrote: > > > > Linus, I'm addressing this patch to you because I see from Tim Chen's > > thread that it would interest you, and you were disappointed not to > > root caus

[PATCH] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-24 Thread Hugh Dickins
h, since shrink_page_list() already had to win its trylock_page(), so waiters are not very common there: I noticed no difference when trying the bigger change, and it's surely not needed while put_and_wait_on_page_locked() is only used for page migration. Reported-and-tested-by: Baoquan He S

Re: [RFC PATCH 3/3] mm, fault_around: do not take a reference to a locked page

2018-11-23 Thread Hugh Dickins
On Thu, 22 Nov 2018, Michal Hocko wrote: > > If you want some update to the comment in this function or to the > changelog, I am open of course. Right now I have > +* Check for a locked page first, as a speculative > +* reference may adversely influence page

Re: [PATCH v3] mm: use swp_offset as key in shmem_replace_page()

2018-11-23 Thread Hugh Dickins
On Wed, 21 Nov 2018, Andrew Morton wrote: > On Wed, 21 Nov 2018 14:54:42 -0700 Yu Zhao wrote: > > > We changed key of swap cache tree from swp_entry_t.val to > > swp_offset. Need to do so in shmem_replace_page() as well. > > What are the user-visible effects of this change? Sorry, I don't

Re: [RFC PATCH 3/3] mm, fault_around: do not take a reference to a locked page

2018-11-21 Thread Hugh Dickins
On Wed, 21 Nov 2018, Michal Hocko wrote: > On Tue 20-11-18 17:47:21, Hugh Dickins wrote: > > On Tue, 20 Nov 2018, Michal Hocko wrote: > > > > > From: Michal Hocko > > > > > > filemap_map_pages takes a speculative reference to each page in the > >

Re: Memory hotplug softlock issue

2018-11-21 Thread Hugh Dickins
On Wed, 21 Nov 2018, Michal Hocko wrote: > On Mon 19-11-18 21:44:41, Hugh Dickins wrote: > [...] > > [PATCH] mm: put_and_wait_on_page_locked() while page is migrated > > > > We have all assumed that it is essential to hold a page reference while > > waiting on a

Re: [PATCH v3] mm: use swp_offset as key in shmem_replace_page()

2018-11-21 Thread Hugh Dickins
nel.org # v4.9+ > Signed-off-by: Yu Zhao Acked-by: Hugh Dickins Thanks! > --- > mm/shmem.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index d44991ea5ed4..42b70978e814 100644 > --- a/mm/shmem.c >

Re: Memory hotplug softlock issue

2018-11-20 Thread Hugh Dickins
On Tue, 20 Nov 2018, Hugh Dickins wrote: > On Tue, 20 Nov 2018, Vlastimil Babka wrote: > > > > > > finish_wait(q, wait); > > > > ... the code continues by: > > > > if (thrashing) { > > if (!PageSwapBacked(page)) &

Re: [RFC PATCH 3/3] mm, fault_around: do not take a reference to a locked page

2018-11-20 Thread Hugh Dickins
an Kara > Signed-off-by: Michal Hocko Acked-by: Hugh Dickins though I think this patch is more useful to the avoid atomic ops, and unnecessary dirtying of the cacheline, than to avoid the very transient elevation of refcount, which will not affect page migration very much. > --- >

Re: Memory hotplug softlock issue

2018-11-20 Thread Hugh Dickins
On Tue, 20 Nov 2018, Baoquan He wrote: > On 11/20/18 at 02:38pm, Vlastimil Babka wrote: > > On 11/20/18 6:44 AM, Hugh Dickins wrote: > > > [PATCH] mm: put_and_wait_on_page_locked() while page is migrated > > > > > > We have all assumed that it is esse

Re: Memory hotplug softlock issue

2018-11-20 Thread Hugh Dickins
On Tue, 20 Nov 2018, Vlastimil Babka wrote: > On 11/20/18 6:44 AM, Hugh Dickins wrote: > > [PATCH] mm: put_and_wait_on_page_locked() while page is migrated > > > > We have all assumed that it is essential to hold a page reference while > > waiting on a pag

Re: Memory hotplug softlock issue

2018-11-19 Thread Hugh Dickins
On Tue, 20 Nov 2018, Baoquan He wrote: > On 11/19/18 at 09:59pm, Michal Hocko wrote: > > On Mon 19-11-18 12:34:09, Hugh Dickins wrote: > > > I'm glad that I delayed, what I had then (migration_waitqueue instead > > > of using page_waitqueue) was not wrong, but what I'v

Re: [PATCH v2] mm: fix swap offset when replacing shmem page

2018-11-19 Thread Hugh Dickins
On Mon, 19 Nov 2018, Yu Zhao wrote: > On Mon, Nov 19, 2018 at 02:11:27PM -0800, Hugh Dickins wrote: > > On Sun, 18 Nov 2018, Yu Zhao wrote: > > > > > We used to have a single swap address space with swp_entry_t.val > > > as its radix tree index. This

Re: [PATCH v2] mm: fix swap offset when replacing shmem page

2018-11-19 Thread Hugh Dickins
On Sun, 18 Nov 2018, Yu Zhao wrote: > We used to have a single swap address space with swp_entry_t.val > as its radix tree index. This is not the case anymore. Now Each > swp_type() has its own address space and should use swp_offset() > as radix tree index. > > Signed-off-by: Yu Zhao This fix

Re: Memory hotplug softlock issue

2018-11-19 Thread Hugh Dickins
On Mon, 19 Nov 2018, Michal Hocko wrote: > On Mon 19-11-18 15:10:16, Michal Hocko wrote: > [...] > > In other words. Why cannot we do the following? > > Baoquan, this is certainly not the right fix but I would be really > curious whether it makes the problem go away. > > > diff --git

Re: [BUG] mm: direct I/O (using GUP) can write to COW anonymous pages

2018-09-17 Thread Hugh Dickins
Hi Jann, On Mon, 17 Sep 2018, Jann Horn wrote: > [I'm not sure who the best people to ask about this are, I hope the > recipient list resembles something reasonable...] > > I have noticed that the dup_mmap() logic on fork() doesn't handle > pages with active direct I/O properly: dup_mmap()

Re: Plumbers 2018 - Performance and Scalability Microconference

2018-09-06 Thread Hugh Dickins
ng larger base page sizes than 4k. No such workarounds needed on > >> platforms that support large sizes. Things just zoom along without > >> contortions necessary to deal with huge pages etc. > >> > >> Can we come up with a 2M base page VM or someth

Re: Re: [PATCH] [PATCH] mm: disable preemption before swapcache_free

2018-08-06 Thread Hugh Dickins
On Tue, 7 Aug 2018, zhaowu...@wingtech.com wrote: > > Thanks for affirming the modification of disabling preemption and > pointing out the incompleteness, delete_from_swap_cache() needs the same > protection. > I'm curious about that why don't put swapcache_free(swap) under protection of  >

Re: Re: [PATCH] [PATCH] mm: disable preemption before swapcache_free

2018-08-04 Thread Hugh Dickins
On Fri, 27 Jul 2018, zhaowu...@wingtech.com wrote: > >On Thu, 26 Jul 2018 15:03:23 +0800 "zhaowu...@wingtech.com" > > wrote: > > > >> >On Thu 26-07-18 10:21:40, zhaowu...@wingtech.com wrote: > >> >[...] > >> >> Our project really needs a fix to this issue > >> > > >> >Could you be more specific

Re: [PATCH 3/7] x86/mm/init: pass unconverted symbol addresses to free_init_pages()

2018-08-04 Thread Hugh Dickins
On Sat, 4 Aug 2018, Linus Torvalds wrote: > On Fri, Aug 3, 2018 at 5:19 PM Hugh Dickins wrote: > > > > I thought that virt_to_page() only works on virtual addresses > > in the direct map > > You're right that virt_to_page() does not work on any _actual_ virtual &

Re: [PATCH 5/7] x86/mm/init: remove freed kernel image areas from alias mapping

2018-08-03 Thread Hugh Dickins
xffff826000001504K > pte > current_user-0x8260-0xa000 474M > pmd > > Signed-off-by: Dave Hansen > Cc: Kees Cook > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: And

Re: [PATCH 3/7] x86/mm/init: pass unconverted symbol addresses to free_init_pages()

2018-08-03 Thread Hugh Dickins
d wonder if you meant " now ". > Signed-off-by: Dave Hansen > Cc: Kees Cook > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Andrea Arcangeli > Cc: Juergen Gross > Cc: Josh Poimboeuf > Cc: Greg Kroah-Hartman > Cc: Peter Zijlstra > Cc: Hugh Dickins >

Re: [PATCH 5/5] x86/mm/init: remove freed kernel image areas from alias mapping

2018-08-01 Thread Hugh Dickins
8200-0x8240 4M ro >PSE GLB NX pmd > current_user-0x8240-0x82488000 544K ro >NX pte > current_user-0x82488000-0x8260 1504K >

Re: Linux 4.18-rc7

2018-08-01 Thread Hugh Dickins
On Wed, 1 Aug 2018, Kirill A. Shutemov wrote: > On Wed, Aug 01, 2018 at 11:31:52AM -0700, Hugh Dickins wrote: > > On Wed, 1 Aug 2018, Linus Torvalds wrote: > > > > > > Anyway, the upshot of all this is that I think I know what the ia64 > > > problem was, an

Re: Linux 4.18-rc7

2018-08-01 Thread Hugh Dickins
ely clear, but the danger of sometimes crashing on the BUG is now fairly clear. Signed-off-by: Hugh Dickins --- mm/memory.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) --- 4.18-rc7/mm/memory.c2018-06-16 18:48:22.041173422 -0700 +++ linux/mm/memory.c 2018-08-01

Re: Linux 4.18-rc7

2018-07-31 Thread Hugh Dickins
On Tue, 31 Jul 2018, Kirill A. Shutemov wrote: > On Tue, Jul 31, 2018 at 09:29:27AM +0300, Kirill A. Shutemov wrote: > > On Mon, Jul 30, 2018 at 06:01:26PM -0700, Linus Torvalds wrote: > > > > > > So to me it looks like a historical check that simply doesn't > > > "normally" trigger, but there's

Re: Linux 4.18-rc7

2018-07-30 Thread Hugh Dickins
On Mon, 30 Jul 2018, Linus Torvalds wrote: > On Mon, Jul 30, 2018 at 2:53 PM Hugh Dickins wrote: > > > > I have no problem with reverting -rc7's vma_is_anonymous() series. > > I don't think we need to revert the whole series: I think the rest are > all fairly obvious

Re: Linux 4.18-rc7

2018-07-30 Thread Hugh Dickins
On Mon, 30 Jul 2018, Linus Torvalds wrote: > On Mon, Jul 30, 2018 at 6:01 AM Kirill A. Shutemov > wrote: > > > > I think I missed vma_set_anonymous() somewhere, but I fail to see where. > > Honestly, by now we just need to revert that commit. > > It's not even clear that it was a good idea to

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-26 Thread Hugh Dickins
On Thu, 26 Jul 2018, Matthew Wilcox wrote: > On Wed, Jul 25, 2018 at 11:53:15PM -0700, Hugh Dickins wrote: > > and fixing the bug differently ;-) But many thanks for spotting it! I thought you might :) > > I'll look into the next bug you reported ... No need: that idea now wor

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-26 Thread Hugh Dickins
On Tue, 24 Jul 2018, Hugh Dickins wrote: > On Mon, 23 Jul 2018, Matthew Wilcox wrote: > > On Mon, Jul 23, 2018 at 03:42:22PM -0700, Hugh Dickins wrote: > > > On Mon, 23 Jul 2018, Matthew Wilcox wrote: > > > > I figured out a fix and pushed it to the 'ida' branch in &

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-24 Thread Hugh Dickins
On Mon, 23 Jul 2018, Matthew Wilcox wrote: > On Mon, Jul 23, 2018 at 03:42:22PM -0700, Hugh Dickins wrote: > > On Mon, 23 Jul 2018, Matthew Wilcox wrote: > > > I figured out a fix and pushed it to the 'ida' branch in > > > git://git.infradead.org/users/willy/linux-dax

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-23 Thread Hugh Dickins
On Mon, 23 Jul 2018, Matthew Wilcox wrote: > On Mon, Jul 23, 2018 at 12:14:41PM -0700, Hugh Dickins wrote: > > On Mon, 23 Jul 2018, Matthew Wilcox wrote: > > > On Sun, Jul 22, 2018 at 07:28:01PM -0700, Hugh Dickins wrote: > > > > Whether or not that fixed syzbot'

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-23 Thread Hugh Dickins
On Mon, 23 Jul 2018, Matthew Wilcox wrote: > On Sun, Jul 22, 2018 at 07:28:01PM -0700, Hugh Dickins wrote: > > Whether or not that fixed syzbot's kernel BUG at mm/shmem.c:815! > > I don't know, but I'm afraid it has not fixed linux-next breakage of > > huge tmpfs: I get a simi

Re: kernel BUG at mm/shmem.c:LINE!

2018-07-22 Thread Hugh Dickins
On Mon, 9 Jul 2018, Matthew Wilcox wrote: > On Fri, Jul 06, 2018 at 06:19:02PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:526674536360 Add linux-next specific files for 20180706 > > git tree: linux-next > > console output:

[tip:x86/pti] x86/events/intel/ds: Fix bts_interrupt_threshold alignment

2018-07-15 Thread tip-bot for Hugh Dickins
Commit-ID: 2c991e408df6a407476dbc453d725e1e975479e7 Gitweb: https://git.kernel.org/tip/2c991e408df6a407476dbc453d725e1e975479e7 Author: Hugh Dickins AuthorDate: Sat, 14 Jul 2018 12:58:07 -0700 Committer: Thomas Gleixner CommitDate: Sun, 15 Jul 2018 11:38:44 +0200 x86/events/intel/ds

[PATCH] x86/events/intel/ds: Fix bts_interrupt_threshold alignment

2018-07-14 Thread Hugh Dickins
_interrupt_threshold correctly: which turns out to fix problem seen. Fixes: c1961a4631da ("x86/events/intel/ds: Map debug buffers in cpu_entry_area") Signed-off-by: Hugh Dickins Reported-and-tested-by: Markus T Metzger Cc: # v4.14+ --- Sorry for the spam: I missed out [PATCH] and x...

x86/events/intel/ds: Fix bts_interrupt_threshold alignment

2018-07-13 Thread Hugh Dickins
_interrupt_threshold correctly: which turns out to fix problem seen. Fixes: c1961a4631da ("x86/events/intel/ds: Map debug buffers in cpu_entry_area") Signed-off-by: Hugh Dickins Reported-and-tested-by: Markus T Metzger Cc: # v4.14+ --- arch/x86/events/intel/ds.c |8 +--- 1 fi

RE: [bug] kpti, perf_event, bts: sporadic truncated trace

2018-07-13 Thread Hugh Dickins
On Fri, 13 Jul 2018, Metzger, Markus T wrote: > Hello Hugh, > > > A little "optimization" crept into alloc_bts_buffer() along the way, which > > now > > places bts_interrupt_threshold not on a record boundary. > > And Stephane has shown me the sentence in Vol 3B, 17.4.9, which says "This > >

Re: [bug] kpti, perf_event, bts: sporadic truncated trace

2018-07-12 Thread Hugh Dickins
On Thu, 12 Jul 2018, Metzger, Markus T wrote: > Hello, > > Starting with 4.15 I noticed that BTS is sporadically missing the tail > of the trace in the perf_event data buffer. It shows as > > [decode error (1): instruction overflow] > > in GDB. Chances to see this are higher the longer

[PATCH] thp: fix data loss when splitting a file pmd

2018-07-11 Thread Hugh Dickins
file pages in split_huge_pmd()") Reported-by: Ashwin Chaugule Signed-off-by: Hugh Dickins Cc: "Kirill A. Shutemov" Cc: "Huang, Ying" Cc: Yang Shi Cc: # v4.8+ --- mm/huge_memory.c |2 ++ 1 file changed, 2 insertions(+) --- 4.18-rc4/mm/huge_memory.c 2018-06-16 18:4

Re: [PATCH 3.16 183/410] mm: pin address_space before dereferencing it while isolating an LRU page

2018-06-10 Thread Hugh Dickins
On Thu, 7 Jun 2018, Ben Hutchings wrote: > 3.16.57-rc1 review patch. If anyone has any objections, please let me know. Not an objection as such, but if you're including this one, please be sure to add 145e1a71e090575c74969e3daa8136d1e5b99fc8 "mm: fix the NULL mapping case in

Re: [PATCH] mm/shmem: Zero out unused vma fields in shmem_pseudo_vma_init()

2018-05-31 Thread Hugh Dickins
On Thu, 31 May 2018, Andrew Morton wrote: > On Thu, 31 May 2018 16:56:02 +0300 "Kirill A. Shutemov" > wrote: > > > shmem/tmpfs uses pseudo vma to allocate page with correct NUMA policy. > > > > The pseudo vma doesn't have vm_page_prot set. We are going to encode > > encryption KeyID in

Re: [PATCH] mm/shmem: Zero out unused vma fields in shmem_pseudo_vma_init()

2018-05-31 Thread Hugh Dickins
On Thu, 31 May 2018, Kirill A. Shutemov wrote: > shmem/tmpfs uses pseudo vma to allocate page with correct NUMA policy. > > The pseudo vma doesn't have vm_page_prot set. We are going to encode > encryption KeyID in vm_page_prot. Having garbage there causes problems. > > Zero out all unused

[PATCH] mm: fix the NULL mapping case in __isolate_lru_page()

2018-05-30 Thread Hugh Dickins
encing it while isolating an LRU page") Signed-off-by: Hugh Dickins --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 4.17-rc7/mm/vmscan.c2018-04-26 10:48:36.027288294 -0700 +++ linux/mm/vmscan.c 2018-05-30 20:08:39.184634029 -0700 @@ -1418,7 +1418,7 @@ int __iso

[PATCH] mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty()

2018-05-29 Thread Hugh Dickins
) introduced it, but liable to erase PageWaiters after 4.10's 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit"). Fixes: 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit") Signed-off-by: Hugh Dickins --- It's not a 4.17

[PATCH] proc: fix smaps and meminfo alignment

2018-05-24 Thread Hugh Dickins
width to speed up /proc/pid/smaps") Signed-off-by: Hugh Dickins <hu...@google.com> --- fs/seq_file.c |5 - 1 file changed, 5 deletions(-) --- 4.17-rc6/fs/seq_file.c 2018-04-15 21:45:06.740885410 -0700 +++ linux/fs/seq_file.c 2018-05-24 14:41:21.508491794 -0700 @@ -709,1

Re: [PATCH 4.4 50/92] mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read

2018-05-24 Thread Hugh Dickins
On Thu, May 24, 2018 at 12:06 PM Greg KH <gre...@linuxfoundation.org> wrote: > On Thu, May 24, 2018 at 10:27:59AM -0700, Hugh Dickins wrote: > > On Thu, May 24, 2018 at 4:28 AM Greg KH <gre...@linuxfoundation.org> wrote: > > > On Thu, May 24, 2018 at 04:17:

Re: [PATCH 4.4 50/92] mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read

2018-05-24 Thread Hugh Dickins
On Thu, May 24, 2018 at 4:28 AM Greg KH <gre...@linuxfoundation.org> wrote: > On Thu, May 24, 2018 at 04:17:12AM -0700, Hugh Dickins wrote: > > Thu, May 24, 2018 at 4:06 AM Greg Kroah-Hartman > > <gre...@linuxfoundation.org> > > wrote: > > > > > On

Re: [PATCH 4.4 50/92] mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read

2018-05-24 Thread Hugh Dickins
Thu, May 24, 2018 at 4:06 AM Greg Kroah-Hartman wrote: > On Thu, May 24, 2018 at 12:50:11PM +0200, Jan Kara wrote: > > On Thu 24-05-18 11:38:27, Greg Kroah-Hartman wrote: > > > 4.4-stable review patch. If anyone has any objections, please let me know. > > > > Just

Re: [PATCH] x86/boot/compressed: Exclude 'top_pgtable' from relocation

2018-05-03 Thread Hugh Dickins
On Thu, 3 May 2018, Kirill A. Shutemov wrote: > On Thu, May 03, 2018 at 08:38:49AM +, Kirill A. Shutemov wrote: > > The patch is bogus and I still don't understand what is going on. > > I think I found the issue. Could you check the patch below: Sorry, no good on either machine, immediate

Re: [PATCH] x86/boot/compressed: Exclude 'top_pgtable' from relocation

2018-05-02 Thread Hugh Dickins
On Wed, 2 May 2018, Kirill A. Shutemov wrote: > startup_64() copies kernel (including .data section) to the new place. > It's required for safe in-place decompression. > > This is a problem if the original place is referenced: by mistake I've > put 'top_pgtable' into .data section and the

Re: [RFC v5 PATCH] mm: shmem: make stat.st_blksize return huge page size if THP is on

2018-05-01 Thread Hugh Dickins
age > size via stat.st_blksize sounds good enough. > > Since PUD size huge page for THP has not been supported, now it just > returns HPAGE_PMD_SIZE. > > Signed-off-by: Yang Shi <yang....@linux.alibaba.com> > Cc: "Kirill A. Shutemov" <kirill.shute...@linux.int

Re: [PATCH 1/2] [stable-4.9] x86: fix build without CONFIG_X86_VSYSCALL_EMULATION

2018-02-15 Thread Hugh Dickins
On Thu, 15 Feb 2018, Greg Kroah-Hartman wrote: > On Thu, Feb 15, 2018 at 04:16:56PM +0100, Arnd Bergmann wrote: > > I ran into a 4.9 build regression in randconfig testing, starting with the > > KAISER patches: > > > > arch/x86/mm/kaiser.c: In function 'kaiser_init': > >

Re: [PATCH] mm/migrate: Rename various page allocation helper functions

2018-02-08 Thread Hugh Dickins
On Thu, 8 Feb 2018, Anshuman Khandual wrote: > On 02/04/2018 12:28 PM, Anshuman Khandual wrote: > > Allocation helper functions for migrate_pages() remmain scattered with > > similar names making them really confusing. Rename these functions based > > on type of the intended migration. Function

Re: [RFC] mm/migrate: Consolidate page allocation helper functions

2018-01-30 Thread Hugh Dickins
On Wed, 31 Jan 2018, Anshuman Khandual wrote: > On 01/30/2018 08:06 PM, Michal Hocko wrote: > > On Tue 30-01-18 10:36:42, Anshuman Khandual wrote: > >> Allocation helper functions for migrate_pages() remmain scattered with > >> similar names making them really confusing. Rename these functions

Re: [PATCH] Lock mmap_sem when calling migrate_pages() in do_move_pages_to_node()

2018-01-29 Thread Hugh Dickins
On Mon, 29 Jan 2018, Zi Yan wrote: > From: Zi Yan > > migrate_pages() requires at least down_read(mmap_sem) to protect > related page tables and VMAs from changing. Let's do it in Page tables are protected by their locks. VMAs may change while migration is active on

Re: [PATCH] cfg80211: stop demanding lots of new stuff

2018-01-18 Thread Hugh Dickins
A familiar error, let's try to attach this time... On Thu, 18 Jan 2018, Hugh Dickins wrote: > On Thu, 18 Jan 2018, Johannes Berg wrote: > > On Wed, 2018-01-17 at 14:55 -0800, Hugh Dickins wrote: > > > "make oldconfig" from 4.14 (when CONFIG_CFG80211_CERTIFICATION_ONUS

Re: [PATCH] cfg80211: stop demanding lots of new stuff

2018-01-18 Thread Hugh Dickins
On Thu, 18 Jan 2018, Johannes Berg wrote: > On Wed, 2018-01-17 at 14:55 -0800, Hugh Dickins wrote: > > "make oldconfig" from 4.14 (when CONFIG_CFG80211_CERTIFICATION_ONUS > > is not set) to 4.15-rc, gets into asking lots of new questions, and > > configuring in u

[PATCH] cfg80211: stop demanding lots of new stuff

2018-01-17 Thread Hugh Dickins
d down when we don't even have CFG80211_CERTIFICATION_ONUS. Signed-off-by: Hugh Dickins <hu...@google.com> --- net/wireless/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 4.15-rc8/net/wireless/Kconfig 2017-12-03 10:22:51.928845056 -0800 +++ linux/net/wireless

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Hugh Dickins
On Fri, Jan 5, 2018 at 6:03 AM, Mike Galbraith wrote: > On Fri, 2018-01-05 at 14:34 +0100, Greg Kroah-Hartman wrote: >> >> Ok, we found two patches that were missing in 4.4-stable that were in >> the SLES12 tree (thanks to Jamie Iles), now I only have 19k more to sift >> through :)

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Hugh Dickins
On Fri, Jan 5, 2018 at 1:03 PM, Pavel Tatashin wrote: > The hardware works :) I meant that before the patch linked in > https://lkml.org/lkml/2018/1/5/534, I was never able to boot 4.4.110. But > with that patch applied, I was able to boot it at least once, but it could

Re: [PATCH 05/23] x86, kaiser: unmap kernel from userspace page tables (core patch)

2018-01-05 Thread Hugh Dickins
On Fri, Jan 5, 2018 at 1:14 PM, Jiri Kosina wrote: > On Fri, 5 Jan 2018, Dave Hansen wrote: > >> >>> --- a/arch/x86/platform/efi/efi_64.c >> >>> +++ b/arch/x86/platform/efi/efi_64.c >> >>> @@ -95,6 +95,12 @@ pgd_t * __init efi_call_phys_prolog(void >> >>> save_pgd[pgd]

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Hugh Dickins
On Thu, Jan 4, 2018 at 1:23 PM, Pavel Tatashin wrote: > I tried cherry picking > 435086b36f62 x86/vsyscall/64: Explicitly set _PAGE_USER in the > pagetable hierarchy > > on top of 4.4.110-rc1, (needed to resolve a small 5level table to > 4level page table conflict).

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Hugh Dickins
On Thu, Jan 4, 2018 at 12:43 PM, Andy Lutomirski wrote: > >> On Jan 4, 2018, at 12:29 PM, Linus Torvalds >> wrote: >> >>> On Thu, Jan 4, 2018 at 12:16 PM, Thomas Voegtle wrote: >>> >>> Attached a screenshot. >>> Is that useful?

Re: [PATCH 4.9 00/39] 4.9.75-stable review

2018-01-03 Thread Hugh Dickins
On Wed, Jan 3, 2018 at 5:24 PM, Ben Hutchings wrote: > On Wed, 2018-01-03 at 21:11 +0100, Greg Kroah-Hartman wrote: >> This is the start of the stable review cycle for the 4.9.75 release. >> There are 39 patches in this series, all will be posted as a response >> to this

Re: [PATCH 18/30] x86, kaiser: map virtually-addressed performance monitoring buffers

2017-11-14 Thread Hugh Dickins
On Tue, 14 Nov 2017, Dave Hansen wrote: > On 11/14/2017 10:20 AM, Peter Zijlstra wrote: > > On Fri, Nov 10, 2017 at 11:31:39AM -0800, Dave Hansen wrote: > >> static int alloc_ds_buffer(int cpu) > >> { > >> + struct debug_store *ds = per_cpu_ptr(_debug_store, cpu); > >> > >> + memset(ds, 0,

Re: [PATCH 1/2] shmem: drop lru_add_drain_all from shmem_wait_for_pins

2017-11-04 Thread Hugh Dickins
On Fri, 3 Nov 2017, Michal Hocko wrote: > On Fri 03-11-17 00:46:18, Hugh Dickins wrote: > > > > NAK. shmem_wait_for_pins() is waiting for temporary pins on the pages > > to go away, and using lru_add_drain_all() in the usual way, to lower > > the refcount of pages temp

Re: [PATCH 1/2] shmem: drop lru_add_drain_all from shmem_wait_for_pins

2017-11-03 Thread Hugh Dickins
//lkml.kernel.org/r/http://lkml.kernel.org/r/20171030151009.ip4k7nwan7muo...@hirez.programming.kicks-ass.net > > Cc: David Herrmann <dh.herrm...@gmail.com> > Cc: Hugh Dickins <hu...@google.com> > Signed-off-by: Michal Hocko <mho...@suse.com> NAK. shmem_wait_for_pins()

Re: [PATCH] mm, vmscan: do not loop on too_many_isolated for ever

2017-07-24 Thread Hugh Dickins
On Thu, 20 Jul 2017, Michal Hocko wrote: > On Wed 19-07-17 18:54:40, Hugh Dickins wrote: > [...] > > You probably won't welcome getting into alternatives at this late stage; > > but after hacking around it one way or another because of its pointless > >

Re: [PATCH] mm, vmscan: do not loop on too_many_isolated for ever

2017-07-24 Thread Hugh Dickins
On Thu, 20 Jul 2017, Tetsuo Handa wrote: > Hugh Dickins wrote: > > You probably won't welcome getting into alternatives at this late stage; > > but after hacking around it one way or another because of its pointless > > lockups, I lost patience with that too_many_isolate

Re: [RFC PATCH] mm, oom: allow oom reaper to race with exit_mmap

2017-07-24 Thread Hugh Dickins
On Thu, 20 Jul 2017, Michal Hocko wrote: > On Wed 19-07-17 18:18:27, Hugh Dickins wrote: > > > > But I haven't looked at the oom_kill or oom_reaper end of it at all, > > perhaps you have an overriding argument on the placement from that end. > > Well, the main problem

Re: [PATCH] mm, vmscan: do not loop on too_many_isolated for ever

2017-07-19 Thread Hugh Dickins
On Mon, 10 Jul 2017, Michal Hocko wrote: > From: Michal Hocko > > Tetsuo Handa has reported [1][2][3]that direct reclaimers might get stuck > in too_many_isolated loop basically for ever because the last few pages > on the LRU lists are isolated by the kswapd which is stuck on

Re: [RFC PATCH] mm, oom: allow oom reaper to race with exit_mmap

2017-07-19 Thread Hugh Dickins
On Wed, 19 Jul 2017, Michal Hocko wrote: > On Thu 29-06-17 10:46:21, Michal Hocko wrote: > > Forgot to CC Hugh. > > > > Hugh, Andrew, do you see this could cause any problem wrt. > > ksm/khugepaged exit path? > > ping. I would really appreciate some help here. I would like to resend > the patch

Re: [PATCH] mm: larger stack guard gap, between vmas

2017-06-24 Thread Hugh Dickins
On Thu, 22 Jun 2017, Hugh Dickins wrote: > On Thu, 22 Jun 2017, Ben Hutchings wrote: > > > Here's my attempt at a backport to 3.2. This is only tested on > > x86_64 and I think I should introduce local variables for > > vma_start_gap() in a few places. I h

Re: [PATCH] mm: larger stack guard gap, between vmas

2017-06-22 Thread Hugh Dickins
On Thu, 22 Jun 2017, Ben Hutchings wrote: > Here's my attempt at a backport to 3.2. This is only tested on > x86_64 and I think I should introduce local variables for > vma_start_gap() in a few places. I had to cherry-pick commit > 09884964335e "mm: do not grow the stack vma just because of an

Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c

2017-06-22 Thread Hugh Dickins
On Thu, 22 Jun 2017, Oleg Nesterov wrote: > On 06/21, Hugh Dickins wrote: > > > > On Wed, 21 Jun 2017, Linus Torvalds wrote: > > > On Wed, Jun 21, 2017 at 1:56 PM, Oleg Nesterov <o...@redhat.com> wrote: > > > > > > > > I understand. My poin

Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c

2017-06-21 Thread Hugh Dickins
On Wed, 21 Jun 2017, Oleg Nesterov wrote: > On 06/21, Linus Torvalds wrote: > > > > Hugh, Michal - I also merged Helge's drop-up cleanup, is there > > anything I've missed? I think Oleg had something, but I can't recall > > right now, and I might just have missed it. > > Well, I meant, perhaps we

Re: [criu] 1M guard page ruined restore

2017-06-21 Thread Hugh Dickins
On Wed, 21 Jun 2017, Dmitry Safonov wrote: > On 06/21/2017 08:31 PM, Oleg Nesterov wrote: > > On 06/21, Dmitry Safonov wrote: > > > > > > The only question I have - how is it connected to guard page? > > > > Because with stack guard page do_page_fault() almost never needs to > > call

Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c

2017-06-21 Thread Hugh Dickins
On Wed, 21 Jun 2017, Linus Torvalds wrote: > On Wed, Jun 21, 2017 at 1:56 PM, Oleg Nesterov wrote: > > > > I understand. My point is that this check was invalidated by > > stack-guard-page > > a long ago, and this means that we add the user-visible change now. > > Yeah. I guess

Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c

2017-06-21 Thread Hugh Dickins
On Wed, 21 Jun 2017, Linus Torvalds wrote: > On Tue, Jun 20, 2017 at 7:41 PM, Hugh Dickins <hu...@google.com> wrote: > > On Wed, 21 Jun 2017, kernel test robot wrote: > > > > Thanks for the report: yes, this is the same one as Dave Jones > > found yesterday, wh

Re: [PATCH 3.10 268/268] mm: larger stack guard gap, between vmas

2017-06-21 Thread Hugh Dickins
On Mon, 19 Jun 2017, Willy Tarreau wrote: > From: Hugh Dickins <hu...@google.com> > > commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream. Some of these suggested adjustments below are just what comparing mine and yours showed up, and I'm being anal in passing them on e.g.

Re: [PATCH 3.18 32/32] mm: larger stack guard gap, between vmas

2017-06-21 Thread Hugh Dickins
On Wed, 21 Jun 2017, Willy Tarreau wrote: > On Tue, Jun 20, 2017 at 10:49:16PM -0700, Hugh Dickins wrote: > > On Mon, 19 Jun 2017, Greg Kroah-Hartman wrote: > > > > > 3.18-stable review patch. If anyone has any objections, p

Re: [PATCH 3.18 32/32] mm: larger stack guard gap, between vmas

2017-06-20 Thread Hugh Dickins
On Mon, 19 Jun 2017, Greg Kroah-Hartman wrote: > 3.18-stable review patch. If anyone has any objections, please let me know. > > -- > > From: Hugh Dickins <hu...@google.com> > > commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream. Here's a

Re: [PATCH 4.4 30/30] mm: larger stack guard gap, between vmas

2017-06-20 Thread Hugh Dickins
On Mon, 19 Jun 2017, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > -- > > From: Hugh Dickins <hu...@google.com> > > commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream. The 4.11 and

Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c

2017-06-20 Thread Hugh Dickins
does not have to respect our stack guard gap intentions) could result in gap_end below gap_start there. Fix that, and the similar case in its alternative, unmapped_area(). Fixes: 1be7107fbe18 ("mm: larger stack guard gap, between vmas") Reported-by: Dave Jones <da...@codemonkey.org.u

Re: [criu] 1M guard page ruined restore

2017-06-20 Thread Hugh Dickins
1: Error (criu/cr-restore.c:1465): 4 exited, status=1 > > Andrew has narrowed it down to the commit > > | commit 1be7107fbe18eed3e319a6c3e83c78254b693acb > | Author: Hugh Dickins <hu...@google.com> > | Date: Mon Jun 19 04:03:24 2017 -0700 > | > | mm: large

[PATCH] mm: fix new crash in unmapped_area_topdown()

2017-06-20 Thread Hugh Dickins
art there. Fix that, and the similar case in its alternative, unmapped_area(). Cc: sta...@vger.kernel.org Fixes: 1be7107fbe18 ("mm: larger stack guard gap, between vmas") Reported-by: Dave Jones <da...@codemonkey.org.uk> Debugged-by: Linus Torvalds <torva...@linux-foundation.or

Re: Linux 4.12-rc6

2017-06-20 Thread Hugh Dickins
On Mon, 19 Jun 2017, Dave Jones wrote: > > I hacked up this harness to try and narrow it down more.. > > #!/bin/bash > > . scripts/taint.sh > > while [ 1 ]; > do > ./trinity -a64 -C1 -c mmap -N1 --enable-fds=testfile > check_tainted > done Very helpful reproducer, thank you Dave: I tried

Re: Linux 4.12-rc6

2017-06-19 Thread Hugh Dickins
On Mon, 19 Jun 2017, Hugh Dickins wrote: > On Tue, 20 Jun 2017, Linus Torvalds wrote: > > On Tue, Jun 20, 2017 at 8:26 AM, Dave Jones <da...@codemonkey.org.uk> wrote: > > > > Hugh Dickins (1): > > > > mm: larger stack guard gap, between vma

Re: Linux 4.12-rc6

2017-06-19 Thread Hugh Dickins
On Tue, 20 Jun 2017, Linus Torvalds wrote: > On Tue, Jun 20, 2017 at 8:26 AM, Dave Jones <da...@codemonkey.org.uk> wrote: > > > Hugh Dickins (1): > > > mm: larger stack guard gap, between vmas > > > > This seems to be buggered. > > > > 002

Re: [PATCH 3.10 060/268] xen/gntdev: Use VM_MIXEDMAP instead of VM_IO to avoid NUMA balancing

2017-06-19 Thread Hugh Dickins
of the "larger stack guard gap" - thank you all for those - will do so, but won't get through them tonight - I must look into DaveJ's trinity VM_BUG_ON now.) Hugh > > Reported-by: Olaf Hering <o...@aepfle.de> > Suggested-by: Hugh Dickins <hu...@google.com> > Sign

Re: [REGRESSION] [4.11/4.12-rc3] Hang on Suspend to RAM

2017-06-01 Thread Hugh Dickins
t call synchronize_rcu_expedited under struct_mutex") Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> Reported-by: J. R. Okajima <hooanon...@gmail.com> Signed-off-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com> Reviewed-by: Chris Wilson <ch...@chri

Re: Q. drm/i915 shrinker, synchronize_rcu_expedited() from handlers

2017-05-30 Thread Hugh Dickins
On Mon, 22 May 2017, Joonas Lahtinen wrote: > On la, 2017-05-20 at 10:56 +0900, J. R. Okajima wrote: > > "J. R. Okajima": > > > > > > I don't know whether the fix is good to me or not yet. I will test your > > > fix, but I am busy now and my test will be a few weeks later. Other > > > people may

Re: mm, something wring in page_lock_anon_vma_read()?

2017-05-22 Thread Hugh Dickins
On Tue, 23 May 2017, Xishi Qiu wrote: > On 2017/5/23 3:26, Hugh Dickins wrote: > > I mean, there are various places in mm/memory.c which decide what they > > intend to do based on orig_pte, then take pte lock, then check that > > pte_same(pte, orig_pte) before taking it any fu

Re: [HMM 08/15] mm/ZONE_DEVICE: special case put_page() for device private pages

2017-05-22 Thread Hugh Dickins
On Mon, 22 May 2017, Jerome Glisse wrote: > On Mon, May 22, 2017 at 12:29:53PM -0700, Dan Williams wrote: > > On Mon, May 22, 2017 at 9:51 AM, Jerome Glisse wrote: > > > A ZONE_DEVICE page that reach a refcount of 1 is free ie no longer > > > have any user. For device private

Re: mm, something wring in page_lock_anon_vma_read()?

2017-05-22 Thread Hugh Dickins
On Mon, 22 May 2017, Xishi Qiu wrote: > On 2017/5/20 10:40, Hugh Dickins wrote: > > On Sat, 20 May 2017, Xishi Qiu wrote: > >> > >> Here is a bug report form redhat: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1305620 > >> And I meet

Re: mm, something wring in page_lock_anon_vma_read()?

2017-05-19 Thread Hugh Dickins
On Sat, 20 May 2017, Xishi Qiu wrote: > > Here is a bug report form redhat: > https://bugzilla.redhat.com/show_bug.cgi?id=1305620 > And I meet the bug too. However it is hard to reproduce, and > 624483f3ea82598("mm: rmap: fix use-after-free in __put_anon_vma") is not help. > > From the vmcore,

  1   2   3   4   5   6   7   8   9   10   >