Re: [PATCH 5/6] objtool: Add UACCESS validation

From: Peter Zijlstra
Date: Thu Feb 28 2019 - 05:52:43 EST


On Thu, Feb 28, 2019 at 11:05:10AM +0100, Dmitry Vyukov wrote:
> On Thu, Feb 28, 2019 at 10:59 AM Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:

> > I guess this warning originated for user-space where programmer does
> > not define them and does not generally know about them and signature
> > is not a public contract for user. And then for kernel it just stayed
> > the same because not doing this warning would require somebody to
> > proactively think about this potential difference and add an
> > additional code to skip this check and even then it wasn't obvious why
> > one will want to do this with these functions. So that's where we are
> > now.
>
> Maybe asm directive will help to trick the compiler?

So I went back and forth on the annotation; and we're back to the same
we use for STACK_FRAME_NON_STANDARD() because that forces GCC to
actually generate the symbol.

Without that GCC IPA will go and wreck things by either making the
entire symbol go away or generating partial functions.

I'm currently doing a hard-coded list of names in objtool for this :/
But I'm having trouble with that alias crud.