[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2202170841240.29121@pobox.suse.cz>
Date: Thu, 17 Feb 2022 08:45:44 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: Alexander Lobakin <alexandr.lobakin@...el.com>,
linux-hardening@...r.kernel.org, x86@...nel.org,
Borislav Petkov <bp@...en8.de>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Kristen Carlson Accardi <kristen@...ux.intel.com>,
Kees Cook <keescook@...omium.org>,
Miklos Szeredi <miklos@...redi.hu>,
Ard Biesheuvel <ardb@...nel.org>,
Tony Luck <tony.luck@...el.com>,
Bruce Schlobohm <bruce.schlobohm@...el.com>,
Jessica Yu <jeyu@...nel.org>,
kernel test robot <lkp@...el.com>,
Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
Jonathan Corbet <corbet@....net>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Christoph Hellwig <hch@....de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnd Bergmann <arnd@...db.de>,
Nathan Chancellor <nathan@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Marios Pomonis <pomonis@...gle.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
"H.J. Lu" <hjl.tools@...il.com>, Nicolas Pitre <nico@...xnic.net>,
linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-arch@...r.kernel.org, live-patching@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH v10 02/15] livepatch: avoid position-based search if `-z
unique-symbol` is available
On Wed, 16 Feb 2022, Josh Poimboeuf wrote:
> On Wed, Feb 16, 2022 at 04:06:24PM +0100, Miroslav Benes wrote:
> > > > + /*
> > > > + * If the LD's `-z unique-symbol` flag is available and enabled,
> > > > + * sympos checks are not relevant.
> > > > + */
> > > > + if (IS_ENABLED(CONFIG_LD_HAS_Z_UNIQUE_SYMBOL))
> > > > + sympos = 0;
> > > > +
> > >
> > > Similarly, I don't see a need for this. If the patch is legit then
> > > sympos should already be zero. If not, an error gets reported and the
> > > patch fails to load.
> >
> > My concern was that if the patch is not legit (that is, sympos is > 0 for
> > some reason), the error would be really cryptic and would not help the
> > user at all. So zeroing sympos seems to be a good idea to me. There is no
> > harm and the change is very small and compact.
>
> But wouldn't a cryptic error be better than no error at all? A bad
> sympos might be indicative of some larger issue, like the wrong symbol
> getting patched.
Maybe you are right. I do not feel confident enough to decide it. So
either way would be fine, I guess.
Miroslav
Powered by blists - more mailing lists