Re: [PATCH 05/20] x86/uaccess/xen: Suppress SMAP warnings

From: Josh Poimboeuf
Date: Mon Mar 11 2019 - 13:59:38 EST


On Sun, Mar 10, 2019 at 02:19:29PM +0100, Peter Zijlstra wrote:
> On Fri, Mar 08, 2019 at 01:03:34PM -0600, Josh Poimboeuf wrote:
> > On Fri, Mar 08, 2019 at 01:00:38PM -0600, Josh Poimboeuf wrote:
> > > On Thu, Mar 07, 2019 at 12:45:16PM +0100, Peter Zijlstra wrote:
>
> > > > XXX: arguably we should rename ANNOTATE_NOSPEC_ALTERNATIVE to
> > > > ANNOTATE_IGNORE_ALTERNATIVE.
>
> > Also this you could get rid of the comment if there were an
> > ANNOTATE_AC_SAFE macro which does a similar thing.
>
> How about we just rename the one annotation we have? I figured it was a
> waste of LoC to do yet another annotation that does the very same thing.

I think ANNOTATE_IGNORE_ALTERNATIVE would hurt readability too. How
about just

#define ANNOTATE_UACCESS_SAFE ANNOTATE_NOSPEC_ALTERNATIVE

or, make both ANNOTATE_UACCESS_SAFE and ANNOTATE_NOSPEC_ALTERNATIVE
defined to the same OBJTOOL_IGNORE_ALTERNATIVE macro.

--
Josh