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] [day] [month] [year] [list]
Date:   Fri, 12 Mar 2021 16:50:16 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Atish Patra <atish.patra@....com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greentime Hu <greentime.hu@...ive.com>,
        Anup Patel <anup@...infault.org>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Ard Biesheuvel <ardb@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Baoquan He <bhe@...hat.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Mike Rapoport <rppt@...nel.org>,
        Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Steven Price <steven.price@....com>,
        Will Deacon <will@...nel.org>,
        Zhengyuan Liu <liuzhengyuan@...kylinos.cn>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 3/5] riscv: Separate memory init from paging init

Hi Atish,

On Wed, Mar 10, 2021 at 5:41 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Thu, Nov 19, 2020 at 1:40 AM Atish Patra <atish.patra@....com> wrote:
> > Currently, we perform some memory init functions in paging init. But,
> > that will be an issue for NUMA support where DT needs to be flattened
> > before numa initialization and memblock_present can only be called
> > after numa initialization.
> >
> > Move memory initialization related functions to a separate function.
> >
> > Signed-off-by: Atish Patra <atish.patra@....com>
> > Reviewed-by: Greentime Hu <greentime.hu@...ive.com>
> > Reviewed-by: Anup Patel <anup@...infault.org>
> > Reviewed-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
>
> This is now commit cbd34f4bb37d62d8 in v5.12-rc1, breaking the boot on
> Vexriscv:
>
> [    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
> [    0.000000] printk: bootconsole [sbi0] enabled
> [    0.000000] printk: debug: ignoring loglevel setting.
> [    0.000000] Initial ramdisk at: 0x(ptrval) (8388608 bytes)
> [    0.000000] Unable to handle kernel paging request at virtual
> address c8000008

> Note that I have "[PATCH v2 3/4] RISC-V: Fix L1_CACHE_BYTES for RV32"[1]
> applied, to avoid another crash (7c4fc8e3e982 = v5.11 + [1] +
> cherry-picked commits from the riscv-for-linus-5.12-mw0 pull request).
>
> If I revert the L1_CACHE_BYTES change, the boot continues, but I'm back
> to the old issue fixed by [1]:
>
> [   22.126687] Freeing initrd memory: 8192K
> [   22.321811] workingset: timestamp_bits=30 max_order=15 bucket_order=0
> [   29.001509] Block layer SCSI generic (bsg) driver version 0.4
> loaded (major 253)
> [   29.021555] io scheduler mq-deadline registered
> [   29.033692] io scheduler kyber registered
> [   29.141294] Unable to handle kernel paging request at virtual
> address 69726573

> Will have a deeper look later...

I found the core issue, and sent a fix: "[PATCH] RISC-V: Fix
out-of-bounds accesses in init_resources()"
https://lore.kernel.org/linux-riscv/20210312154634.3541844-1-geert@linux-m68k.org/

It works now with either value of L1_CACHE_SHIFT, so patch "[PATCH v2
3/4] RISC-V: Fix L1_CACHE_BYTES for RV32" is no longer needed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ