[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211014190654.gn2jd43vw35gzdvs@treble>
Date: Thu, 14 Oct 2021 12:06:54 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Kees Cook <keescook@...omium.org>, Borislav Petkov <bp@...en8.de>,
Sami Tolvanen <samitolvanen@...gle.com>, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Sedat Dilek <sedat.dilek@...il.com>,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH v5 09/15] x86: Use an opaque type for functions not
callable from C
On Thu, Oct 14, 2021 at 02:52:11PM -0400, Steven Rostedt wrote:
> On Thu, 14 Oct 2021 11:47:01 -0700
> Kees Cook <keescook@...omium.org> wrote:
>
> > On Thu, Oct 14, 2021 at 07:31:26PM +0200, Borislav Petkov wrote:
> > > On Thu, Oct 14, 2021 at 09:07:57AM -0700, Kees Cook wrote:
> > > Looking at the changelog, DECLARE_ASM_FUNC_SYMBOL, makes a lot more
> > > sense to me even if it doesn't specify the aspect that it is not called
> > > by C but who cares - it is generic enough.
> >
> > Around we go. :) Josh[1] and Steven[2] explicitly disagreed with
> > that name, leading to the current name[3]. Do you want it to be
> > DECLARE_ASM_FUNC_SYMBOL() over those objections?
>
> Just note, that I was fine with the original name, but was against the
> version Josh suggested ;-)
Naming is important, especially for something as confusing as this. We
need to be able to read it in a few months and have some idea of what's
going on.
"DECLARE_ASM_FUNC_SYMBOL" is nonsensical. As a reader of the code I
wonder why are some asm functions using it and not others? And how do I
know if I need it for my new function?
"extern const u8 int3_magic[]" is even worse. Why are some asm
functions randomly declared as arrays, and others not? Where can I go
to find out more without digging through the commit log?
--
Josh
Powered by blists - more mailing lists