[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202308141409.76B8A274BF@keescook>
Date: Mon, 14 Aug 2023 14:09:29 -0700
From: Kees Cook <keescook@...omium.org>
To: Sami Tolvanen <samitolvanen@...gle.com>
Cc: Nathan Chancellor <nathan@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Guo Ren <guoren@...nel.org>,
Deepak Gupta <debug@...osinc.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Fangrui Song <maskray@...gle.com>,
linux-riscv@...ts.infradead.org, llvm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] riscv: SCS support
On Mon, Aug 14, 2023 at 01:18:30PM -0700, Sami Tolvanen wrote:
> On Mon, Aug 14, 2023 at 11:57 AM Sami Tolvanen <samitolvanen@...gle.com> wrote:
> > Looks like __builtin_frame_address behaves differently on RISC-V.
> > After staring at the disassembly a bit, using
> > __builtin_frame_address(0) - 1 instead of + 1 seems to yield correct
> > results.
>
> Elliott was kind enough to point out to me off-list that this behavior
> has been documented here:
>
> https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#frame-pointer-convention
>
> I'll include a patch to fix the test on RISC-V in the next version.
Perfect! Thanks for figuring out the offset. :)
--
Kees Cook
Powered by blists - more mailing lists