lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 2 Feb 2015 15:50:10 +0200
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>
Subject: Re: [PATCHv2 05/19] ia64: expose number of page table levels on
 Kconfig level

On Mon, Feb 02, 2015 at 01:56:39PM +0100, Paul Bolle wrote:
> On Sat, 2015-01-31 at 02:17 +0200, Kirill A. Shutemov wrote:
> > We would want to use number of page table level to define mm_struct.
> > Let's expose it as CONFIG_PGTABLE_LEVELS.
> > 
> > We need to define PGTABLE_LEVELS before sourcing init/Kconfig:
> > arch/Kconfig will define default value and it's sourced from init/Kconfig.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > Cc: Tony Luck <tony.luck@...el.com>
> > Cc: Fenghua Yu <fenghua.yu@...el.com>
> > ---
> >  v2: fix default for IA64_PAGE_SIZE_64KB
> > ---
> >  arch/ia64/Kconfig                | 18 +++++-------------
> >  arch/ia64/include/asm/page.h     |  4 ++--
> >  arch/ia64/include/asm/pgalloc.h  |  4 ++--
> >  arch/ia64/include/asm/pgtable.h  | 12 ++++++------
> >  arch/ia64/kernel/ivt.S           | 12 ++++++------
> >  arch/ia64/kernel/machine_kexec.c |  4 ++--
> >  6 files changed, 23 insertions(+), 31 deletions(-)
> > 
> > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
> > index 074e52bf815c..4f9a6661491b 100644
> > --- a/arch/ia64/Kconfig
> > +++ b/arch/ia64/Kconfig
> > @@ -1,3 +1,8 @@
> > +config PGTABLE_LEVELS
> > +	int "Page Table Levels" if !IA64_PAGE_SIZE_64KB
> > +	range 3 4 if !IA64_PAGE_SIZE_64KB
> > +	default 3
> > +
> 
> Why didn't you choose to make this something like
>     config PGTABLE_LEVELS
> 	int
> 	default 3 if PGTABLE_3
> 	default 4 if PGTABLE_4
> 
> >  source "init/Kconfig"
> >  
> >  source "kernel/Kconfig.freezer"
> > @@ -286,19 +291,6 @@ config IA64_PAGE_SIZE_64KB
> >  
> >  endchoice
> >  
> > -choice
> > -	prompt "Page Table Levels"
> > -	default PGTABLE_3
> > -
> > -config PGTABLE_3
> > -	bool "3 Levels"
> > -
> > -config PGTABLE_4
> > -	depends on !IA64_PAGE_SIZE_64KB
> > -	bool "4 Levels"
> > -
> > -endchoice
> > -
> >  if IA64_HP_SIM
> >  config HZ
> >  	default 32
> 
> ... and drop this hunk (ie, keep this choice as it is)? That would make
> upgrading to a release that uses PGTABLE_LEVELS do the right thing
> automagically, wouldn't it? As currently in the !IA64_PAGE_SIZE_64KB
> case people need to reconfigure their "Page Table Levels".

Again: I can do it if maintainers prefer.

But I don't see much sense in having arch-specific kconfig option if we
have generic one.

-- 
 Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ