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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180624071343.GC29407@gmail.com>
Date:   Sun, 24 Jun 2018 09:13:43 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Baoquan He <bhe@...hat.com>
Cc:     linux-kernel@...r.kernel.org, lcapitulino@...hat.com,
        keescook@...omium.org, tglx@...utronix.de, x86@...nel.org,
        hpa@...or.com, fanc.fnst@...fujitsu.com, yasu.isimatu@...il.com,
        indou.takao@...fujitsu.com, douly.fnst@...fujitsu.com
Subject: Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages
 handling


* Baoquan He <bhe@...hat.com> wrote:

> On 06/21/18 at 05:01pm, Ingo Molnar wrote:
> > 
> > * Baoquan He <bhe@...hat.com> wrote:
> > 
> > > +/* Store the number of 1GB huge pages which user specified.*/
> > > +static unsigned long max_gb_huge_pages;
> > > +
> > > +static int parse_gb_huge_pages(char *param, char* val)
> > > +{
> > > +	char *p;
> > > +	u64 mem_size;
> > > +	static bool gbpage_sz = false;
> > > +
> > > +	if (!strcmp(param, "hugepagesz")) {
> > > +		p = val;
> > > +		mem_size = memparse(p, &p);
> > > +		if (mem_size == PUD_SIZE) {
> > > +			if (gbpage_sz)
> > > +				warn("Repeadly set hugeTLB page size of 1G!\n");
> > > +			gbpage_sz = true;
> > > +		} else
> > > +			gbpage_sz = false;
> > > +	} else if (!strcmp(param, "hugepages") && gbpage_sz) {
> > > +		p = val;
> > > +		max_gb_huge_pages = simple_strtoull(p, &p, 0);
> > > +		debug_putaddr(max_gb_huge_pages);
> > > +	}
> > > +}
> > 
> > This function has at least one style problem and one typo.
> > 
> > Also, we don't put statics in the middle of function variable blocks.
> > 
> 
> Sorry, I will check all of them carefully and repost according to your
> comments.

Thanks!

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ