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]
Message-ID: <20250422124402.4b891d14@canb.auug.org.au>
Date: Tue, 22 Apr 2025 12:44:02 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>, Thomas Gleixner
 <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin"
 <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>
Cc: Alexander Graf <graf@...zon.com>, Changyuan Lyu <changyuanl@...gle.com>,
 Ingo Molnar <mingo@...nel.org>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, "Mike Rapoport (Microsoft)" <rppt@...nel.org>
Subject: linux-next: manual merge of the mm-unstable tree with the tip-fixes
 tree

Hi all,

Today's linux-next merge of the mm-unstable tree got a conflict in:

  arch/x86/kernel/e820.c

between commit:

  83b2d345e178 ("x86/e820: Discard high memory that can't be addressed by 32-bit systems")

from the tip-fixes tree and commit:

  5a64fe1a39e7 ("x86: add KHO support")

from the mm-unstable tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kernel/e820.c
index 9920122018a0,7d1c74681c61..000000000000
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@@ -1299,14 -1299,24 +1299,32 @@@ void __init e820__memblock_setup(void
  		memblock_add(entry->addr, entry->size);
  	}
  
 +	/*
 +	 * 32-bit systems are limited to 4BG of memory even with HIGHMEM and
 +	 * to even less without it.
 +	 * Discard memory after max_pfn - the actual limit detected at runtime.
 +	 */
 +	if (IS_ENABLED(CONFIG_X86_32))
 +		memblock_remove(PFN_PHYS(max_pfn), -1);
 +
+ 	/*
+ 	 * At this point with KHO we only allocate from scratch memory.
+ 	 * At the same time, we configure memblock to only allow
+ 	 * allocations from memory below ISA_END_ADDRESS which is not
+ 	 * a natural scratch region, because Linux ignores memory below
+ 	 * ISA_END_ADDRESS at runtime. Beside very few (if any) early
+ 	 * allocations, we must allocate real-mode trapoline below
+ 	 * ISA_END_ADDRESS.
+ 	 *
+ 	 * To make sure that we can actually perform allocations during
+ 	 * this phase, let's mark memory below ISA_END_ADDRESS as scratch
+ 	 * so we can allocate from there in a scratch-only world.
+ 	 *
+ 	 * After real mode trampoline is allocated, we clear scratch
+ 	 * marking from the memory below ISA_END_ADDRESS
+ 	 */
+ 	memblock_mark_kho_scratch(0, ISA_END_ADDRESS);
+ 
  	/* Throw away partial pages: */
  	memblock_trim_memory(PAGE_SIZE);
  

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ