Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-11 Thread David Hildenbrand
On 11.10.19 02:50, Naoya Horiguchi wrote: On Fri, Oct 11, 2019 at 12:11:25AM +, Horiguchi Naoya(堀口 直也) wrote: On Thu, Oct 10, 2019 at 09:30:01AM +0200, David Hildenbrand wrote: On 09.10.19 11:57, Naoya Horiguchi wrote: Hi David, On Wed, Oct 09, 2019 at 11:12:04AM +0200, David Hildenbrand

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-10 Thread Naoya Horiguchi
On Fri, Oct 11, 2019 at 12:11:25AM +, Horiguchi Naoya(堀口 直也) wrote: > On Thu, Oct 10, 2019 at 09:30:01AM +0200, David Hildenbrand wrote: > > On 09.10.19 11:57, Naoya Horiguchi wrote: > > > Hi David, > > > > > > On Wed, Oct 09, 2019 at 11:12:04AM +0200, David Hildenbrand wrote: > > >> There are

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-10 Thread Naoya Horiguchi
On Thu, Oct 10, 2019 at 09:30:01AM +0200, David Hildenbrand wrote: > On 09.10.19 11:57, Naoya Horiguchi wrote: > > Hi David, > > > > On Wed, Oct 09, 2019 at 11:12:04AM +0200, David Hildenbrand wrote: > >> There are various places where we access uninitialized memmaps, namely: > >> - /proc/kpagecou

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-10 Thread David Hildenbrand
On 09.10.19 11:57, Naoya Horiguchi wrote: > Hi David, > > On Wed, Oct 09, 2019 at 11:12:04AM +0200, David Hildenbrand wrote: >> There are various places where we access uninitialized memmaps, namely: >> - /proc/kpagecount >> - /proc/kpageflags >> - /proc/kpagecgroup >> - memory_failure() - which r

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread David Hildenbrand
On 09.10.19 15:29, Michal Hocko wrote: > On Wed 09-10-19 15:24:05, David Hildenbrand wrote: >> On 09.10.19 15:22, Michal Hocko wrote: >>> On Wed 09-10-19 14:58:24, David Hildenbrand wrote: >>> [...] I would be fine with this, but it means that - for now - the three /proc/ files won't be a

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread Michal Hocko
On Wed 09-10-19 15:24:05, David Hildenbrand wrote: > On 09.10.19 15:22, Michal Hocko wrote: > > On Wed 09-10-19 14:58:24, David Hildenbrand wrote: > > [...] > >> I would be fine with this, but it means that - for now - the three > >> /proc/ files won't be able to deal with ZONE_DEVICE memory. > >

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread David Hildenbrand
On 09.10.19 15:22, Michal Hocko wrote: > On Wed 09-10-19 14:58:24, David Hildenbrand wrote: > [...] >> I would be fine with this, but it means that - for now - the three >> /proc/ files won't be able to deal with ZONE_DEVICE memory. > > Thanks for the clarification. Is this an actual problem thoug

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread Michal Hocko
On Wed 09-10-19 14:58:24, David Hildenbrand wrote: [...] > I would be fine with this, but it means that - for now - the three > /proc/ files won't be able to deal with ZONE_DEVICE memory. Thanks for the clarification. Is this an actual problem though? Do we have any consumers of the functionality?

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread David Hildenbrand
On 09.10.19 13:24, Michal Hocko wrote: > On Wed 09-10-19 12:19:59, David Hildenbrand wrote: > [...] >>> pfn_to_online_page makes sense because offline pages are not really in a >>> defined state. This would be worth a patch of its own. I remember there >> >> The issue is, once I check for pfn_to_on

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread Michal Hocko
On Wed 09-10-19 12:19:59, David Hildenbrand wrote: [...] > > pfn_to_online_page makes sense because offline pages are not really in a > > defined state. This would be worth a patch of its own. I remember there > > The issue is, once I check for pfn_to_online_page(), these functions > can't handle

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread David Hildenbrand
On 09.10.19 11:37, Michal Hocko wrote: > On Wed 09-10-19 11:12:04, David Hildenbrand wrote: >> There are various places where we access uninitialized memmaps, namely: >> - /proc/kpagecount >> - /proc/kpageflags >> - /proc/kpagecgroup >> - memory_failure() - which reuses stable_page_flags() from fs/

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread Naoya Horiguchi
Hi David, On Wed, Oct 09, 2019 at 11:12:04AM +0200, David Hildenbrand wrote: > There are various places where we access uninitialized memmaps, namely: > - /proc/kpagecount > - /proc/kpageflags > - /proc/kpagecgroup > - memory_failure() - which reuses stable_page_flags() from fs/proc/page.c Ah rig

Re: [PATCH v1] mm: Fix access of uninitialized memmaps in fs/proc/page.c

2019-10-09 Thread Michal Hocko
On Wed 09-10-19 11:12:04, David Hildenbrand wrote: > There are various places where we access uninitialized memmaps, namely: > - /proc/kpagecount > - /proc/kpageflags > - /proc/kpagecgroup > - memory_failure() - which reuses stable_page_flags() from fs/proc/page.c > > We have initialized memmaps e