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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Mar 2023 16:52:45 +0200
From:   Alexandre Ghiti <alexghiti@...osinc.com>
To:     Conor Dooley <conor@...nel.org>
Cc:     Jonathan Corbet <corbet@....net>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Conor Dooley <conor.dooley@...rochip.com>,
        linux-doc@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -fixes v2 2/3] riscv: Do not set initial_boot_params to
 the linear address of the dtb

On Wed, Mar 29, 2023 at 4:37 PM Conor Dooley <conor@...nel.org> wrote:
>
> On Wed, Mar 29, 2023 at 10:19:31AM +0200, Alexandre Ghiti wrote:
> > early_init_dt_verify() is already called in parse_dtb() and since the dtb
> > address does not change anymore (it is now in the fixmap region), no need
> > to reset initial_boot_params by calling early_init_dt_verify() again.
> >
> > Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
> > ---
> >  arch/riscv/kernel/setup.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
> > index 542eed85ad2c..a059b73f4ddb 100644
> > --- a/arch/riscv/kernel/setup.c
> > +++ b/arch/riscv/kernel/setup.c
> > @@ -278,10 +278,7 @@ void __init setup_arch(char **cmdline_p)
> >  #if IS_ENABLED(CONFIG_BUILTIN_DTB)
> >       unflatten_and_copy_device_tree();
> >  #else
> > -     if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa))))
> > -             unflatten_device_tree();
>
> Silly question maybe, but since it isn't explicitly mentioned, the
> XIP_FIXUP bits no longer matter?

The XIP_FIXUP is only needed when translating virtual to physical
addresses, but that does not mean I did not break it, I haven't
considered XIP at all...

> Also, in related news, I assume you don't have a QEMU setup that can do
> boot an XIP kernel?

I haven't booted a XIP kernel for a long time now, here are my notes
from that time:
https://github.com/AlexGhiti/alexghiti.github.io/blob/main/xip/XIP.md

>
> Cheers,
> Conor.
>
> > -     else
> > -             pr_err("No DTB found in kernel mappings\n");
> > +     unflatten_device_tree();
> >  #endif
> >       misc_mem_init();
> >
> > --
> > 2.37.2
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ