LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org, lcapitulino@redhat.com,
	keescook@chromium.org, tglx@linutronix.de, x86@kernel.org,
	hpa@zytor.com, fanc.fnst@cn.fujitsu.com, yasu.isimatu@gmail.com,
	indou.takao@jp.fujitsu.com, douly.fnst@cn.fujitsu.com
Subject: Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling
Date: Sun, 24 Jun 2018 09:13:43 +0200	[thread overview]
Message-ID: <20180624071343.GC29407@gmail.com> (raw)
In-Reply-To: <20180622121445.GP29979@MiWiFi-R3L-srv>


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

> On 06/21/18 at 05:01pm, Ingo Molnar wrote:
> > 
> > * Baoquan He <bhe@redhat.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

  reply	other threads:[~2018-06-24  7:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 10:05 [PATCH 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization Baoquan He
2018-05-16 10:05 ` [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling Baoquan He
2018-05-17  3:27   ` Chao Fan
2018-05-17  4:03     ` Baoquan He
2018-05-17  5:53       ` Chao Fan
2018-05-17  6:13         ` Baoquan He
2018-05-17  5:12   ` damian
2018-05-17  5:38     ` Baoquan He
2018-06-21 15:01   ` Ingo Molnar
2018-06-22 12:14     ` Baoquan He
2018-06-24  7:13       ` Ingo Molnar [this message]
2018-05-16 10:05 ` [PATCH 2/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization Baoquan He
2018-05-18  7:00 ` [PATCH 0/2] " Ingo Molnar
2018-05-18  7:43   ` Baoquan He
2018-05-18  8:19     ` Ingo Molnar
2018-05-18 11:28       ` Baoquan He
2018-05-18 12:14         ` Baoquan He
2018-05-23 19:10         ` Luiz Capitulino
2018-05-28  9:54           ` Baoquan He
2018-05-29 13:27             ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180624071343.GC29407@gmail.com \
    --to=mingo@kernel.org \
    --cc=bhe@redhat.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=keescook@chromium.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yasu.isimatu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).