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: <20240718021822.1545976-1-quic_obabatun@quicinc.com>
Date: Wed, 17 Jul 2024 19:18:20 -0700
From: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
To: <dalias@...c.org>, <glaubitz@...sik.fu-berlin.de>,
        <ysato@...rs.sourceforge.jp>
CC: <kernel@...cinc.com>, <linux-kernel@...r.kernel.org>,
        <linux-sh@...r.kernel.org>, <robh+dt@...nel.org>,
        Oreoluwa Babatunde
	<quic_obabatun@...cinc.com>
Subject: [PATCH v5 0/2] sh: Restructure setup code to reserve memory regions earlier

The unflatten_devicetree() function allocates memory from memblock
before the system gets a chance to set aside the regions of memory that
are meant to be reserved.
This means that there is a possibility for memblock to allocate from
these regions, thereby preventing them from being reserved.

This series makes changes to the arch specific setup code to call the
functions responsible for setting aside the reserved memory regions
earlier in the init sequence.

Hence, by the time memblock starts being used to allocate memory, the
memory regions that are meant to be carved out would already be set aside.

Oreoluwa Babatunde (2):
  sh: Restructure call site for early_reserve_mem()
  sh: Restructure setup code to reserve memory regions earlier

 arch/sh/include/asm/mmu.h |  1 +
 arch/sh/kernel/setup.c    |  3 +++
 arch/sh/mm/init.c         | 20 +++++++++-----------
 3 files changed, 13 insertions(+), 11 deletions(-)

-- 
2.34.1

v5:
- Keep the definition of early_reserve_mem() inside "arch/sh/mm/init.c"
  and make it available to be called from the setup code.
- Move the sh_mv reserved memory functions into early_reserve_mem().

v4:
- Rebase patch on top of v6.10-rc1 as requested by Maintainer.
- Add missing include in arch/sh/kernel/setup.c

v3:
https://lore.kernel.org/all/20240520175802.2002183-1-quic_obabatun@quicinc.com/
- Instead of moving all of paging_init(), move only the parts
  that are responsible for setting aside the reserved memory
  regions.

v2:
https://lore.kernel.org/all/20240423233150.74302-1-quic_obabatun@quicinc.com/
- Add Rob Herrings Reviewed-by.
- cc Andrew Morton to assist with merging this for sh architecture.
  Similar change made for loongarch and openrisc in v1 have already
  been merged.

v1:
https://lore.kernel.org/all/1707524971-146908-4-git-send-email-quic_obabatun@quicinc.com/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ