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-95003209-d4f2-4394-be70-d041a44af77b@palmer-ri-x1c9>
Date:   Thu, 21 Apr 2022 14:12:49 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     apatel@...tanamicro.com
CC:     Paul Walmsley <paul.walmsley@...ive.com>,
        alexandre.ghiti@...onical.com, atishp@...shpatra.org,
        Alistair Francis <Alistair.Francis@....com>,
        anup@...infault.org, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org, mchitale@...tanamicro.com
Subject:     Re: [PATCH] RISC-V: mm: Fix set_satp_mode() for platform not having Sv57

On Thu, 21 Apr 2022 02:30:05 PDT (-0700), apatel@...tanamicro.com wrote:
> Hi Palmer,
>
> On Tue, Apr 12, 2022 at 9:04 AM Anup Patel <apatel@...tanamicro.com> wrote:
>>
>> When Sv57 is not available the satp.MODE test in set_satp_mode() will
>> fail and lead to pgdir re-programming for Sv48. The pgdir re-programming
>> will fail as well due to pre-existing pgdir entry used for Sv57 and as
>> a result kernel fails to boot on RISC-V platform not having Sv57.
>>
>> To fix above issue, we should clear the pgdir memory in set_satp_mode()
>> before re-programming.
>>
>> Fixes: 011f09d12052 ("riscv: mm: Set sv57 on defaultly")
>> Reported-by: Mayuresh Chitale <mchitale@...tanamicro.com>
>> Signed-off-by: Anup Patel <apatel@...tanamicro.com>
>
> Can this be considered for 5.18-rcX ?

Sorry, there's a queue but I just say this one at the top and it's super 
simple so I'm going to take it now -- IRC is good to ping this sort of 
stuff.

It's in fixes.

Thanks!

>
> Regards,
> Anup
>
>> ---
>>  arch/riscv/mm/init.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
>> index 9535bea8688c..b0793dc0c291 100644
>> --- a/arch/riscv/mm/init.c
>> +++ b/arch/riscv/mm/init.c
>> @@ -718,6 +718,7 @@ static __init void set_satp_mode(void)
>>                 if (!check_l4) {
>>                         disable_pgtable_l5();
>>                         check_l4 = true;
>> +                       memset(early_pg_dir, 0, PAGE_SIZE);
>>                         goto retry;
>>                 }
>>                 disable_pgtable_l4();
>> --
>> 2.25.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ