[PATCH v2 09/11] static_call: Make NULL static calls consistent

Josh Poimboeuf jpoimboe at kernel.org
Wed Mar 22 11:35:29 PDT 2023


On Wed, Mar 22, 2023 at 03:59:18PM +0100, Peter Zijlstra wrote:
> On Tue, Mar 21, 2023 at 09:00:15PM -0700, Josh Poimboeuf wrote:
> > +void __static_call_nop(void)
> > +{
> > +}
> > +EXPORT_SYMBOL_GPL(__static_call_nop);
> 
> Kees, is this a ROP target? The above is basically ENDBR;RET, push
> something on the stack, jump there and you're in business or so.

I could add __noendbr, except for the !HAVE_STATIC_CALL + !CFI_CLANG
case which actually needs to indirect call it.

-- 
Josh



More information about the linux-arm-kernel mailing list