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]
Message-ID: <DB9PR04MB8477F7F3E4CF66528CD19FE580339@DB9PR04MB8477.eurprd04.prod.outlook.com>
Date:   Sat, 12 Jun 2021 11:20:02 +0000
From:   Aisheng Dong <aisheng.dong@....com>
To:     Rob Herring <robh+dt@...nel.org>,
        Quentin Perret <qperret@...gle.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Nicolas Boichat <drinkcat@...omium.org>,
        KarimAllah Ahmed <karahmed@...zon.de>
CC:     linux-mm <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Dong Aisheng <dongas86@...il.com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH 2/2] of: of_reserved_mem: mark nomap memory instead of
 removing

> From: Rob Herring <robh+dt@...nel.org>
> Sent: Saturday, June 12, 2021 1:11 AM
> 
> On Fri, Jun 11, 2021 at 7:13 AM Dong Aisheng <aisheng.dong@....com>
> wrote:
> >
> > Since commit 86588296acbf ("fdt: Properly handle "no-map" field in the
> > memory region"), nomap memory is changed to call
> memblock_mark_nomap()
> > instead of memblock_remove(). But it only changed the reserved memory
> > with fixed addr and size case in early_init_dt_reserve_memory_arch(),
> > not including the dynamical allocation by size case in
> > early_init_dt_alloc_reserved_memory_arch().
> >
> > Cc: Rob Herring <robh+dt@...nel.org>
> > Cc: devicetree@...r.kernel.org
> 
> Good practice is to Cc the people involved in referenced commits.
> Adding them now. This code is a minefield so I'd like other eyes on it.
> 

Yes, you're right. Thanks for the good suggestion.
Let's wait for their comments.

Regards
Aisheng

> > Signed-off-by: Dong Aisheng <aisheng.dong@....com>
> > ---
> >  drivers/of/of_reserved_mem.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/of/of_reserved_mem.c
> > b/drivers/of/of_reserved_mem.c index 367f298a83b2..ebba88395bf8
> 100644
> > --- a/drivers/of/of_reserved_mem.c
> > +++ b/drivers/of/of_reserved_mem.c
> > @@ -42,7 +42,7 @@ static int __init
> > early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
> >
> >         *res_base = base;
> >         if (nomap)
> > -               return memblock_remove(base, size);
> > +               return memblock_mark_nomap(base, size);
> >
> >         return memblock_reserve(base, size);  } @@ -276,7 +276,7 @@
> > void __init fdt_init_reserved_mem(void)
> >                                 pr_info("node %s compatible matching
> fail\n",
> >                                         rmem->name);
> >                                 if (nomap)
> > -                                       memblock_add(rmem->base,
> rmem->size);
> > +
> > + memblock_clear_nomap(rmem->base, rmem->size);
> >                                 else
> >                                         memblock_free(rmem->base,
> rmem->size);
> >                         }
> > --
> > 2.25.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ