Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-07-01 Thread Alastair D'Silva
On Tue, 2019-07-02 at 08:13 +0200, Michal Hocko wrote: > On Tue 02-07-19 14:13:25, Alastair D'Silva wrote: > > On Mon, 2019-07-01 at 12:46 +0200, Michal Hocko wrote: > > > On Fri 28-06-19 10:46:28, Alastair D'Silva wrote: > > > [...] > > > > Given that there is already a VM_BUG_ON in the code, how

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-07-01 Thread Michal Hocko
On Tue 02-07-19 14:13:25, Alastair D'Silva wrote: > On Mon, 2019-07-01 at 12:46 +0200, Michal Hocko wrote: > > On Fri 28-06-19 10:46:28, Alastair D'Silva wrote: > > [...] > > > Given that there is already a VM_BUG_ON in the code, how do you > > > feel > > > about broadening the scope from 'VM_BUG_O

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-07-01 Thread Alastair D'Silva
On Mon, 2019-07-01 at 12:46 +0200, Michal Hocko wrote: > On Fri 28-06-19 10:46:28, Alastair D'Silva wrote: > [...] > > Given that there is already a VM_BUG_ON in the code, how do you > > feel > > about broadening the scope from 'VM_BUG_ON(!root)' to > > 'VM_BUG_ON(!root > > > > (root_nr == NR_SECTI

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-07-01 Thread Michal Hocko
On Fri 28-06-19 10:46:28, Alastair D'Silva wrote: [...] > Given that there is already a VM_BUG_ON in the code, how do you feel > about broadening the scope from 'VM_BUG_ON(!root)' to 'VM_BUG_ON(!root > || (root_nr == NR_SECTION_ROOTS))'? As far as I understand the existing VM_BUG_ON will hit when

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-28 Thread Michal Hocko
On Fri 28-06-19 13:37:07, David Hildenbrand wrote: > VM_BUG_ON is only really active with CONFIG_DEBUG_VM. On > !CONFIG_DEBUG_VM it translated to BUILD_BUG_ON_INVALID(), which is a > compile-time only check. > > Or am I missing something? You are not missing anything. -- Michal Hocko SUSE Labs

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-28 Thread David Hildenbrand
On 27.06.19 10:10, Michal Hocko wrote: > On Thu 27-06-19 10:50:57, Alastair D'Silva wrote: >> On Wed, 2019-06-26 at 08:57 +0200, Michal Hocko wrote: >>> On Wed 26-06-19 16:27:30, Alastair D'Silva wrote: On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > On Wed 26-06-19 16:11:21, Alas

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-27 Thread Alastair D'Silva
On Thu, 2019-06-27 at 10:10 +0200, Michal Hocko wrote: > On Thu 27-06-19 10:50:57, Alastair D'Silva wrote: > > On Wed, 2019-06-26 at 08:57 +0200, Michal Hocko wrote: > > > On Wed 26-06-19 16:27:30, Alastair D'Silva wrote: > > > > On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > > > > > On W

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-27 Thread Michal Hocko
On Thu 27-06-19 10:50:57, Alastair D'Silva wrote: > On Wed, 2019-06-26 at 08:57 +0200, Michal Hocko wrote: > > On Wed 26-06-19 16:27:30, Alastair D'Silva wrote: > > > On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > > > > On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > > > > > From: Ala

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-26 Thread Alastair D'Silva
On Wed, 2019-06-26 at 08:57 +0200, Michal Hocko wrote: > On Wed 26-06-19 16:27:30, Alastair D'Silva wrote: > > On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > > > On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > > > > From: Alastair D'Silva > > > > > > > > If a memory section comes in

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-25 Thread Michal Hocko
On Wed 26-06-19 16:27:30, Alastair D'Silva wrote: > On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > > On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > > > From: Alastair D'Silva > > > > > > If a memory section comes in where the physical address is greater > > > than > > > that which

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-25 Thread Alastair D'Silva
On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > If a memory section comes in where the physical address is greater > > than > > that which is managed by the kernel, this function would not > > trigger th

Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-25 Thread Michal Hocko
On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > From: Alastair D'Silva > > If a memory section comes in where the physical address is greater than > that which is managed by the kernel, this function would not trigger the > bug and instead return a bogus section number. > > This patch tracks

[PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr

2019-06-25 Thread Alastair D'Silva
From: Alastair D'Silva If a memory section comes in where the physical address is greater than that which is managed by the kernel, this function would not trigger the bug and instead return a bogus section number. This patch tracks whether the section was actually found, and triggers the bug if