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>] [day] [month] [year] [list]
Date:   Thu, 28 Mar 2019 09:02:33 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Wei Yang <richardw.yang@...ux.intel.com>
cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.or
Subject: Re: [PATCH 4/6] x86, mm: make split_mem_range() more easy to read

Wei,

On Thu, 28 Mar 2019, Wei Yang wrote:

please trim your replies. It's annoying if one has to search the content in
the middle of a large useless quote.

> On Sun, Mar 24, 2019 at 03:29:04PM +0100, Thomas Gleixner wrote:
> >Wei,
> >-static int __meminit split_mem_range(struct map_range *mr, int nr_range,
> >-				     unsigned long start,
> >-				     unsigned long end)
> >-{
> >-	unsigned long start_pfn, end_pfn, limit_pfn;
> >-	unsigned long pfn;
> >-	int i;
> >+	if (!IS_ALIGNED(mr->end, mi->size)) {
> >+		/* Try to fit as much as possible */
> >+		len = round_down(mr->end - mr->start, mi->size);
> >+		if (!len)
> >+			return false;
> >+		mr->end = mr->start + len;
> >+	}
> > 
> >-	limit_pfn = PFN_DOWN(end);
> >+	/* Store the effective page size mask */
> >+	mr->page_size_mask = mi->mask;
> 
> I don't get the point here. Why store the effective page size mask just for
> the "middle" range.
> 
> The original behavior will set the "head" and "tail" range with a lower level
> page size mask.

What has this to do with the middle range? Nothing. This is the path where
the current map level (1g, 2m, 4k) is applied from mr->start to
mr->end. That's the effective mapping of this map_range entry. 

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ