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: <CAJF2gTThgCp8-KzghR0cFqDWXxZ2byLtLVF91GdRvBid7U+_aA@mail.gmail.com>
Date:   Fri, 28 Jul 2023 20:01:07 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Sami Tolvanen <samitolvanen@...gle.com>
Cc:     Deepak Gupta <debug@...osinc.com>, palmer@...belt.com,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
        Jisheng Zhang <jszhang@...nel.org>
Subject: Re: [PATCH v2] riscv: VMAP_STACK overflow detection thread-safe

On Tue, Jul 25, 2023 at 12:34 AM Sami Tolvanen <samitolvanen@...gle.com> wrote:
>
> On Thu, Jul 20, 2023 at 8:06 AM Guo Ren <guoren@...nel.org> wrote:
> >
> > On Thu, Jul 20, 2023 at 8:19 AM Sami Tolvanen <samitolvanen@...gle.com> wrote:
> > >
> > > Are you planning on resending this patch? I see it didn't gain much
> > > traction last time, but this looks like a much cleaner solution for
> > > selecting the overflow stack than having a `shadow_stack` and calling
> > > to C to compute the per-CPU offset. The asm_per_cpu macro also would
> > > come in handy when implementing CONFIG_SHADOW_CALL_STACK, which we'd
> > > like to have on RISC-V too.
> > I remember we ended up with an atomic lock mechanism instead of percpu
> > offset, so what's the benefit of percpu style in overflow_stack path?
>
> The benefit is not needing a separate temporary stack and locks just
Oh, you convinced me it could save another 1KB of memory.

Acked-by: Guo Ren <guoren@...nel.org>

> to compute the per-CPU offset. With CONFIG_SHADOW_CALL_STACK, we would
> also need a "shadow" shadow call stack in this case before calling to
> C code, at which point computing the offsets directly in assembly is
> just significantly cleaner and without concurrency issues.
>
> Sami



-- 
Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ