Re: [PATCH] fork: Improve error message for corrupted page tables

2019-08-05 Thread Sai Praneeth Prakhya
On Mon, 2019-08-05 at 15:28 +0200, Vlastimil Babka wrote: > On 8/2/19 8:46 AM, Prakhya, Sai Praneeth wrote: > > > > > > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > > > > > > + "MM_FILEPAGES", > > > > > > + "MM_ANONPAGES", > > > > > > + "MM_SWAPENTS", > > > > > > +

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-08-05 Thread Vlastimil Babka
On 8/2/19 8:46 AM, Prakhya, Sai Praneeth wrote: > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > + "MM_FILEPAGES", > + "MM_ANONPAGES", > + "MM_SWAPENTS", > + "MM_SHMEMPAGES", > +}; But please let's not put this in a header file. We're asking

RE: [PATCH] fork: Improve error message for corrupted page tables

2019-08-02 Thread Prakhya, Sai Praneeth
> > > > Cc: Ingo Molnar > > Cc: Peter Zijlstra > > Cc: Andrew Morton > > Suggested-by/Acked-by: Dave Hansen > > Though I am not sure, should the above be two separate lines instead ? Sure! Will split them in V2. > > > Signed-off-by: Sai Praneeth Prakhya > > --- > >

RE: [PATCH] fork: Improve error message for corrupted page tables

2019-08-02 Thread Prakhya, Sai Praneeth
> > > > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > > > > + "MM_FILEPAGES", > > > > + "MM_ANONPAGES", > > > > + "MM_SWAPENTS", > > > > + "MM_SHMEMPAGES", > > > > +}; > > > > > > But please let's not put this in a header file. We're asking the > > >

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-07-31 Thread Anshuman Khandual
On 07/31/2019 03:48 AM, Sai Praneeth Prakhya wrote: > When a user process exits, the kernel cleans up the mm_struct of the user > process and during cleanup, check_mm() checks the page tables of the user > process for corruption (E.g: unexpected page flags set/cleared). For > corrupted page

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-07-31 Thread Andrew Morton
On Wed, 31 Jul 2019 15:36:49 -0700 Sai Praneeth Prakhya wrote: > > > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > > > + "MM_FILEPAGES", > > > + "MM_ANONPAGES", > > > + "MM_SWAPENTS", > > > + "MM_SHMEMPAGES", > > > +}; > > > > But please let's not put this in a header

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-07-31 Thread Sai Praneeth Prakhya
> > With patch: > > --- > > [ 69.815453] mm/pgtable-generic.c:29: bad p4d > > 84653642(80025ca37467) > > [ 69.815872] BUG: Bad rss-counter state mm:014a6c03 > > type:MM_FILEPAGES val:2 > > [ 69.815962] BUG: Bad rss-counter state mm:014a6c03 > >

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-07-31 Thread Andrew Morton
On Tue, 30 Jul 2019 15:18:20 -0700 Sai Praneeth Prakhya wrote: > When a user process exits, the kernel cleans up the mm_struct of the user > process and during cleanup, check_mm() checks the page tables of the user > process for corruption (E.g: unexpected page flags set/cleared). For >

[PATCH] fork: Improve error message for corrupted page tables

2019-07-30 Thread Sai Praneeth Prakhya
When a user process exits, the kernel cleans up the mm_struct of the user process and during cleanup, check_mm() checks the page tables of the user process for corruption (E.g: unexpected page flags set/cleared). For corrupted page tables, the error message printed by check_mm() isn't very clear