public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized
@ 2021-07-13 15:10 Naresh Kamboju
  2021-07-13 15:17 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2021-07-13 15:10 UTC (permalink / raw)
  To: perf-users, open list, linux-stable
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Peter Zijlstra,
	Sasha Levin, Greg Kroah-Hartman, Leo Yan, Anders Roxell

LKFT have noticed these warnings / errors when we have updated gcc version from
gcc-9 to gcc-11 on stable-rc linux-5.4.y branch. I have provided the steps to
reproduce in this email below.

Following perf builds failed with gcc-11 with linux-5.4.y branch.
- build-arm-gcc-11-perf
- build-arm64-gcc-11-perf
- build-i386-gcc-11-perf
- build-x86-gcc-11-perf

Build error log:
--------------------
find: 'x86_64-linux-gnu-gcc/arch': No such file or directory
error: Found argument '-I' which wasn't expected, or isn't valid in this context
USAGE:
    sccache [FLAGS] [OPTIONS] [cmd]...
For more information try --help
error: Found argument '-I' which wasn't expected, or isn't valid in this context
USAGE:
    sccache [FLAGS] [OPTIONS] [cmd]...
For more information try --help

In function 'ready',
    inlined from 'sender' at bench/sched-messaging.c:87:2:
bench/sched-messaging.c:73:13: error: 'dummy' may be used
uninitialized [-Werror=maybe-uninitialized]
   73 |         if (write(ready_out, &dummy, 1) != 1)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from bench/sched-messaging.c:22:
bench/sched-messaging.c: In function 'sender':
/usr/x86_64-linux-gnu/include/unistd.h:366:16: note: by argument 2 of
type 'const void *' to 'write' declared here
  366 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;
      |                ^~~~~
bench/sched-messaging.c:69:14: note: 'dummy' declared here
   69 |         char dummy;
      |              ^~~~~
cc1: all warnings being treated as errors

ref:
https://builds.tuxbuild.com/1vEIWryaujwVtL4wmodXkz1djUa/
https://builds.tuxbuild.com/1vEIX7NTo5OpaN9nrs2UvO74oxB/

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Steps to reproduce:
---------------------------
tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
--kconfig defconfig --kconfig-add
https://builds.tuxbuild.com/1vEIWryaujwVtL4wmodXkz1djUa/config headers
kernel modules perf

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized
  2021-07-13 15:10 perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized Naresh Kamboju
@ 2021-07-13 15:17 ` Greg Kroah-Hartman
  2021-07-13 15:32   ` Anders Roxell
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-13 15:17 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: perf-users, open list, linux-stable, Arnaldo Carvalho de Melo,
	Ingo Molnar, Peter Zijlstra, Sasha Levin, Leo Yan, Anders Roxell

On Tue, Jul 13, 2021 at 08:40:28PM +0530, Naresh Kamboju wrote:
> LKFT have noticed these warnings / errors when we have updated gcc version from
> gcc-9 to gcc-11 on stable-rc linux-5.4.y branch. I have provided the steps to
> reproduce in this email below.
> 
> Following perf builds failed with gcc-11 with linux-5.4.y branch.
> - build-arm-gcc-11-perf
> - build-arm64-gcc-11-perf
> - build-i386-gcc-11-perf
> - build-x86-gcc-11-perf
> 
> Build error log:
> --------------------

<snip>

I imagine this is fixed in newer kernel versions, so if you could
provide the git ids of the patches needed to fix this up in 5.4, that
would be great!

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized
  2021-07-13 15:17 ` Greg Kroah-Hartman
@ 2021-07-13 15:32   ` Anders Roxell
  2021-07-15 11:05     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Roxell @ 2021-07-13 15:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Naresh Kamboju, perf-users, open list, linux-stable,
	Arnaldo Carvalho de Melo, Ingo Molnar, Peter Zijlstra,
	Sasha Levin, Leo Yan

On Tue, 13 Jul 2021 at 17:18, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jul 13, 2021 at 08:40:28PM +0530, Naresh Kamboju wrote:
> > LKFT have noticed these warnings / errors when we have updated gcc version from
> > gcc-9 to gcc-11 on stable-rc linux-5.4.y branch. I have provided the steps to
> > reproduce in this email below.
> >
> > Following perf builds failed with gcc-11 with linux-5.4.y branch.
> > - build-arm-gcc-11-perf
> > - build-arm64-gcc-11-perf
> > - build-i386-gcc-11-perf
> > - build-x86-gcc-11-perf
> >
> > Build error log:
> > --------------------
>
> <snip>
>
> I imagine this is fixed in newer kernel versions, so if you could
> provide the git ids of the patches needed to fix this up in 5.4, that
> would be great!

You were correct, I did a bisect [1] and found
d493720581a6 ("perf bench: Fix 2 memory sanitizer warnings").

commit d2c73501a767514b6c85c7feff9457a165d51057 upstream.

Cherry picked it and I was able to build it on arm64 and x86.

Cheers,
Anders
[1] http://ix.io/3sS6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized
  2021-07-13 15:32   ` Anders Roxell
@ 2021-07-15 11:05     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-15 11:05 UTC (permalink / raw)
  To: Anders Roxell
  Cc: Naresh Kamboju, perf-users, open list, linux-stable,
	Arnaldo Carvalho de Melo, Ingo Molnar, Peter Zijlstra,
	Sasha Levin, Leo Yan

On Tue, Jul 13, 2021 at 05:32:17PM +0200, Anders Roxell wrote:
> On Tue, 13 Jul 2021 at 17:18, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Jul 13, 2021 at 08:40:28PM +0530, Naresh Kamboju wrote:
> > > LKFT have noticed these warnings / errors when we have updated gcc version from
> > > gcc-9 to gcc-11 on stable-rc linux-5.4.y branch. I have provided the steps to
> > > reproduce in this email below.
> > >
> > > Following perf builds failed with gcc-11 with linux-5.4.y branch.
> > > - build-arm-gcc-11-perf
> > > - build-arm64-gcc-11-perf
> > > - build-i386-gcc-11-perf
> > > - build-x86-gcc-11-perf
> > >
> > > Build error log:
> > > --------------------
> >
> > <snip>
> >
> > I imagine this is fixed in newer kernel versions, so if you could
> > provide the git ids of the patches needed to fix this up in 5.4, that
> > would be great!
> 
> You were correct, I did a bisect [1] and found
> d493720581a6 ("perf bench: Fix 2 memory sanitizer warnings").
> 
> commit d2c73501a767514b6c85c7feff9457a165d51057 upstream.
> 
> Cherry picked it and I was able to build it on arm64 and x86.

Great, now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-15 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-13 15:10 perf: bench/sched-messaging.c:73:13: error: 'dummy' may be used uninitialized Naresh Kamboju
2021-07-13 15:17 ` Greg Kroah-Hartman
2021-07-13 15:32   ` Anders Roxell
2021-07-15 11:05     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox