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-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 May 2024 11:03:50 -0700
From: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
To: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
        <ysato@...rs.sourceforge.jp>, <dalias@...c.org>
CC: <akpm@...ux-foundation.org>, <linux-sh@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <robh+dt@...nel.org>,
        <kernel@...cinc.com>, Rob Herring <robh@...nel.org>,
        Rob Landley <rob@...dley.net>
Subject: Re: [PATCH v2] sh: Call paging_init() earlier in the init sequence


On 5/7/2024 3:41 PM, John Paul Adrian Glaubitz wrote:
> Hello Oreoluwa,
>
> On Tue, 2024-05-07 at 14:42 -0700, Oreoluwa Babatunde wrote:
>> memblock_alloc() marks all its allocations as reserved by calling
>> memblock_reserve().
>> https://elixir.bootlin.com/linux/latest/source/mm/memblock.c#L1463
>>
>> This should normally stop other users from allocating from within that
>> region of memory.
>>
>> But in this case, since all the free memory regions have already been
>> transferred over to the bootmem framework by paging_init(), I am not
>> sure if that logic will still hold for the unflatten_deivcetree allocated memory.
>>
>> The main goal of this patch is to make sure that the reserved memory
>> regions defined in the DT are set aside before any memblock allocations
>> are done (which includes the allocation done by unflatten_devicetree).
>>
>> Hence, I can restructure the patch to only remove the portion of code that is
>> is responsible for setting aside the DT defined reserved memory regions from
>> within paging_init(), and move it above the unflatten_devicetree() call.
>> https://elixir.bootlin.com/linux/latest/source/arch/sh/mm/init.c#L292
>>
>> I will explore further and possibly restructure this patch based on my findings.
> OK, sounds like a plan. In the meantime, I have set up my J2 Turtle Board and
> I am actually now able to test patches for this target, so that I would be
> able to verify that your patch didn't break anything.
>
> However, I think for v6.10 I think the ship has sailed.
>
> Adrian
Hi Adrian,

I have uploaded v3 of this patch now.
https://lore.kernel.org/all/20240520175802.2002183-1-quic_obabatun@quicinc.com/

In this new version, paging_init() is left in its original position and only the portion
of code that is responsible for setting aside the reserved memory regions is moved.

Thank you!
Oreoluwa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ