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-df0a3f10-0713-440c-81c4-a47f22fb367a@palmer-ri-x1c9>
Date: Fri, 09 Feb 2024 08:41:18 -0800 (PST)
From: Palmer Dabbelt <palmer@...belt.com>
To: dennis@...nel.org
CC: alexghiti@...osinc.com, Paul Walmsley <paul.walmsley@...ive.com>,
  aou@...s.berkeley.edu, geert@...ux-m68k.org, linux-riscv@...ts.infradead.org,
  linux-kernel@...r.kernel.org
Subject:     Re: [PATCH] riscv: Fix wrong size passed to local_flush_tlb_range_asid()

On Wed, 31 Jan 2024 19:45:27 PST (-0800), dennis@...nel.org wrote:
> Hi Palmer,
>
> On Wed, Jan 31, 2024 at 12:34:40PM -0800, Palmer Dabbelt wrote:
>> On Mon, 29 Jan 2024 01:01:00 PST (-0800), dennis@...nel.org wrote:
>> > Hi Alexandre,
>> >
>> > On Tue, Jan 23, 2024 at 02:27:30PM +0100, Alexandre Ghiti wrote:
>> > > local_flush_tlb_range_asid() takes the size as argument, not the end of
>> > > the range to flush, so fix this by computing the size from the end and
>> > > the start of the range.
>> > >
>> > > Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()")
>> > > Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
>> > > ---
>> > >  arch/riscv/mm/tlbflush.c | 2 +-
>> > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > >
>> > > diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
>> > > index 8d12b26f5ac3..9619965f6501 100644
>> > > --- a/arch/riscv/mm/tlbflush.c
>> > > +++ b/arch/riscv/mm/tlbflush.c
>> > > @@ -68,7 +68,7 @@ static inline void local_flush_tlb_range_asid(unsigned long start,
>> > >
>> > >  void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
>> > >  {
>> > > -	local_flush_tlb_range_asid(start, end, PAGE_SIZE, FLUSH_TLB_NO_ASID);
>> > > +	local_flush_tlb_range_asid(start, end - start, PAGE_SIZE, FLUSH_TLB_NO_ASID);
>> > >  }
>> > >
>> > >  static void __ipi_flush_tlb_all(void *info)
>> > > --
>> > > 2.39.2
>> > >
>> >
>> > Sorry for the delay, I just pulled this into percpu#for-6.8-fixes. I'll
>> > send it to Linus this week.
>>
>> Do you mind if we do a shared tag or something?  It's going to conflict with
>> https://lore.kernel.org/all/20240117140333.2479667-1-vincent.chen@sifive.com/
>> .  No big deal as it's a pretty trivial conflict, but they'll both need
>> stable backports.
>
> This alone won't need a stable backport, I merged the bug as part of
> enabling the percpu page allocator in the recent 6.8 merge window.
>
> That being said, this is the only patch I'm carrying for v6.8. I'm happy
> to drop it and have you pick it up instead. Saves me a tag and a PR.
> Lmk if that works for you.

Sorry I missed this, but that seems like the easiest way to go here -- 
the other patch fixes the same bug (and another one), so I think we're 
safe with just that (which I'm sending to Linus as part of my rc4 fixes 
now-ish, as I'd need to anyway).  It's d9807d60c145 ("riscv: mm: execute 
local TLB flush after populating vmemmap"), in case anyone's looking 
later...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ