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] [day] [month] [year] [list]
Message-ID: <mhng-d399244b-db6d-40e5-9113-77baf96bf987@palmer-ri-x1c9>
Date:   Sun, 09 Jan 2022 10:56:52 -0800 (PST)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     mick@....forth.gr
CC:     Paul Walmsley <paul.walmsley@...ive.com>, aou@...s.berkeley.edu,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        alex@...ti.fr, stable@...r.kernel.org
Subject:     Re: [PATCH 1/3] riscv: Don't use va_pa_offset on kdump

On Fri, 07 Jan 2022 10:03:59 PST (-0800), mick@....forth.gr wrote:
> Hello Palmer,
>
> Any updates on those 3 patches ?

Sorry, I hadn't realized these were fixes so they got stuck in the 
queue0.  I do now remember you saying you had some fixes at the RISC-V 
conference, but I guess that got lost as well.  Including something like 
"fix" or "-fixes" in a subject line always helps, but if I miss stuff 
IRC's always a good bet as that'll at least make sure I see it when I'm 
in front of the computer -- there's a lot of people who want things at 
these conferences.

It's too late for fixes, but it looks like things have been broken for a 
while so these will have to all get backported to stable regardless.

This is on for-next.

Thanks!

>
> Regards,
> Nick
>
> Στις 2021-11-26 20:04, Nick Kossifidis έγραψε:
>> On kdump instead of using an intermediate step to relocate the kernel,
>> that lives in a "control buffer" outside the current kernel's mapping,
>> we jump to the crash kernel directly by calling
>> riscv_kexec_norelocate().
>> The current implementation uses va_pa_offset while switching to
>> physical
>> addressing, however since we moved the kernel outside the linear
>> mapping
>> this won't work anymore since riscv_kexec_norelocate() is part of the
>> kernel mapping and we should use kernel_map.va_kernel_pa_offset, and
>> also
>> take XIP kernel into account.
>>
>> We don't really need to use va_pa_offset on riscv_kexec_norelocate, we
>> can just set STVEC to the physical address of the new kernel instead
>> and
>> let the hart jump to the new kernel on the next instruction after
>> setting
>> SATP to zero. This fixes kdump and is also simpler/cleaner.
>>
>> I tested this on the latest qemu and HiFive Unmatched and works as
>> expected.
>>
>> v2: I removed the direct jump after setting satp as suggested.
>>
>> Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear
>> mapping")
>>
>> Signed-off-by: Nick Kossifidis <mick@....forth.gr>
>> Reviewed-by: Alexandre Ghiti <alex@...ti.fr>
>> Cc: <stable@...r.kernel.org> # 5.13
>> Cc: <stable@...r.kernel.org> # 5.14

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ