[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240927231527.em2a4cjbnpos6c4u@treble>
Date: Fri, 27 Sep 2024 16:15:27 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, alyssa.milburn@...el.com,
scott.d.constable@...el.com, joao@...rdrivepizza.com,
andrew.cooper3@...rix.com, jose.marchesi@...cle.com,
hjl.tools@...il.com, ndesaulniers@...gle.com,
samitolvanen@...gle.com, nathan@...nel.org, ojeda@...nel.org,
kees@...nel.org, alexei.starovoitov@...il.com
Subject: Re: [PATCH 01/14] x86/cfi: Wreck things...
On Fri, Sep 27, 2024 at 09:48:57PM +0200, Peter Zijlstra wrote:
> vmlinux.o: warning: objtool: .export_symbol+0x3c9f0: data relocation to !ENDBR: entry_untrain_ret+0x0
>
> Which states that while these functions are exported and (directly)
> callable, they cannot be called indirectly. There are two solutions:
IIRC, exported symbols are by far the most common "need" for ENDBR. But
presumably the vast majority of them aren't being indirect called.
> - exclude the .export_symbol section from validation; effectively
> saying that having linkable but not indirectly callable exports are
> fine by default, or
This is confusingly inconsistent IMO.
> - make all of those use SYM_TYPED_FUNC_START to restore the
> traditional (and expected, but less secure?) behaviour.
Why not just make SYM_FUNC_START imply "typed"? That's consistent with
what the compiler does anyway right?
Even better, require exported+indirect-called symbols to use
EXPORT_SYMBOL_TYPED, otherwise they get sealed. I suppose we'd need to
add some module-to-vmlinux ENDBR validation to make sure modules don't
get broken by this.
--
Josh
Powered by blists - more mailing lists