lkml.org 
[lkml]   [2020]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 16/19] objtool: Implement noinstr validation
On Wed, Mar 18, 2020 at 10:03:09AM +0100, Peter Zijlstra wrote:
> On Tue, Mar 17, 2020 at 04:00:08PM -0500, Josh Poimboeuf wrote:
> > On Tue, Mar 17, 2020 at 06:02:50PM +0100, Peter Zijlstra wrote:

> > > @@ -46,5 +49,9 @@ int cmd_check(int argc, const char **arg
> > >
> > > objname = argv[0];
> > >
> > > + s = strstr(objname, "vmlinux.o");
> > > + if (s && !s[9])
> > > + vmlinux = true;
> > > +
> >
> > I think this would be slightly cleaner:
> >
> > if (!strcmp(basename(objname), "vmlinux.o"))
> > vmlinux = true;
>
> Ah, indeed. I totally forgot userspace coding it seems..

Of course that doesn't compile... someone went overboard with const.

For some obscure reason, the stupid thing even thinks that:

note: expected ‘const char **’ but argument is of type ‘char **’

is a warning and then -Werror's on it. That's bloody insane.


\
 
 \ /
  Last update: 2020-03-18 11:06    [W:0.070 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site