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-next>] [day] [month] [year] [list]
Message-Id: <20190212021215.13247-1-richardw.yang@linux.intel.com>
Date:   Tue, 12 Feb 2019 10:12:09 +0800
From:   Wei Yang <richardw.yang@...ux.intel.com>
To:     x86@...nel.org, linux-kernel@...r.kernel.org
Cc:     dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.or,
        tglx@...utronix.de, Wei Yang <richardw.yang@...ux.intel.com>
Subject: [PATCH 0/6] x86, mm: refine split_mem_range a little

split_mem_range is used to prepare range before mapping kernel page table.
Here are some patches to refine it.

Patch [1-2] are trivial clean up.
Patch [3]   add some comment to illustrate the split process and prepare for
            following refine work.
Patch [4-6] are the interesting refine.

There are totally 3 kinds of ranges, while 1G range is only valid on x86_64.
Because of this, the code needs to handle two different configurations. The
conditional macro makes it a little difficult to understand the logic.

We could simplify the logic with a different perception of those ranges, this
is done in Patch [4]. The change is a little, while the result is neat and
clean.

After this, the refreshed code shows we could skip some redundant work when
the range doesn't span PMD or PUD. This is in Patch [4-5].

Wei Yang (6):
  x86, mm: remove second argument of split_mem_range()
  x86, mm: remove check in save_mr
  x86, mm: add comment for split_mem_range to help understanding
  x86, mm: make split_mem_range() more easy to read
  x86, mm: skip 1G range if the range doesn't span PUD
  x86, mm: x86, mm: jump to split only 4K range when range doesn't span
    PMD

 arch/x86/mm/init.c | 87 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 61 insertions(+), 26 deletions(-)

-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ