892 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
4d36ba13d3 Linux 3.10.52 2014-08-07 14:42:40 -07:00
Greg Kroah-Hartman
10a622493d Linux 3.10.51 2014-07-31 14:55:39 -07:00
Linus Torvalds
e1d8240bdd Fix gcc-4.9.0 miscompilation of load_balance() in scheduler
commit 2062afb4f8 upstream.

Michel Dänzer and a couple of other people reported inexplicable random
oopses in the scheduler, and the cause turns out to be gcc mis-compiling
the load_balance() function when debugging is enabled.  The gcc bug
apparently goes back to gcc-4.5, but slight optimization changes means
that it now showed up as a problem in 4.9.0 and 4.9.1.

The instruction scheduling problem causes gcc to schedule a spill
operation to before the stack frame has been created, which in turn can
corrupt the spilled value if an interrupt comes in.  There may be other
effects of this bug too, but that's the code generation problem seen in
Michel's case.

This is fixed in current gcc HEAD, but the workaround as suggested by
Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
when compiling the kernel, which disables the gcc code that causes the
problem.  This can result in slightly worse debug information for
variable accesses, but that is infinitely preferable to actual code
generation problems.

Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
non-debug builds to verify that the debug build would be identical: we
can do

    export GCC_COMPARE_DEBUG=1

to make gcc internally verify that the result of the build is
independent of the "-g" flag (it will make the compiler build everything
twice, toggling the debug flag, and compare the results).

Without the "-fno-var-tracking-assignments" option, the build would fail
(even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
compare failure.

See also gcc bugzilla:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801

Reported-by: Michel Dänzer <michel@daenzer.net>
Suggested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-31 12:53:51 -07:00
Greg Kroah-Hartman
92488f4c9f Linux 3.10.50 2014-07-28 08:00:59 -07:00
Greg Kroah-Hartman
d02dae430d Linux 3.10.49 2014-07-17 15:58:15 -07:00
Greg Kroah-Hartman
d93efdcd51 Linux 3.10.48 2014-07-09 11:14:10 -07:00
Greg Kroah-Hartman
75dca41375 Linux 3.10.47 2014-07-06 18:55:56 -07:00
Greg Kroah-Hartman
5e9a2a3622 Linux 3.10.46 2014-06-30 20:09:54 -07:00
Greg Kroah-Hartman
7ab9233c18 Linux 3.10.45 2014-06-26 15:13:14 -04:00
Greg Kroah-Hartman
73eabc6d79 Linux 3.10.44 2014-06-16 13:43:06 -07:00
Greg Kroah-Hartman
853771148c Linux 3.10.43 2014-06-11 12:12:04 -07:00
Greg Kroah-Hartman
c2f7eb8029 Linux 3.10.42 2014-06-07 13:48:31 -07:00
Greg Kroah-Hartman
72c0f41938 Linux 3.10.41 2014-05-31 12:41:04 -07:00
Greg Kroah-Hartman
be67db1090 Linux 3.10.40 2014-05-13 14:00:04 +02:00
Greg Kroah-Hartman
5d897eedc5 Linux 3.10.39 2014-05-06 07:56:24 -07:00
Greg Kroah-Hartman
bdec432297 Linux 3.10.38 2014-04-26 17:16:33 -07:00
Greg Kroah-Hartman
f512eefd5c Linux 3.10.37 2014-04-14 06:42:31 -07:00
Greg Kroah-Hartman
8f0c10ea2e Linux 3.10.36 2014-04-03 12:01:22 -07:00
Greg Kroah-Hartman
a2e124daef Linux 3.10.35 2014-03-31 09:58:38 -07:00
Greg Kroah-Hartman
10f8245e0d Linux 3.10.34 2014-03-23 21:42:03 -07:00
Greg Kroah-Hartman
6969595f01 Linux 3.10.33 2014-03-06 21:58:45 -08:00
Greg Kroah-Hartman
61dde96f97 Linux 3.10.32 2014-02-22 12:41:54 -08:00
Greg Kroah-Hartman
a43e02cf87 Linux 3.10.31 2014-02-20 11:06:19 -08:00
Greg Kroah-Hartman
29b5f72099 Linux 3.10.30 2014-02-13 13:48:15 -08:00
Greg Kroah-Hartman
1569265782 Linux 3.10.29 2014-02-06 11:08:34 -08:00
Greg Kroah-Hartman
020abbc911 Linux 3.10.28 2014-01-25 08:27:55 -08:00
Greg Kroah-Hartman
1071ea6e68 Linux 3.10.27 2014-01-15 15:29:14 -08:00
Greg Kroah-Hartman
8b4ed85b84 Linux 3.10.26 2014-01-09 12:25:15 -08:00
Greg Kroah-Hartman
095f493c4d Linux 3.10.25 2013-12-20 07:45:26 -08:00
Greg Kroah-Hartman
05bcf8f867 Linux 3.10.24 2013-12-11 22:36:44 -08:00
Greg Kroah-Hartman
184c20bbc9 Linux 3.10.23 2013-12-08 08:17:21 -08:00
Greg Kroah-Hartman
538069756c Linux 3.10.22 2013-12-04 11:03:31 -08:00
Greg Kroah-Hartman
43d8b1ef82 Linux 3.10.21 2013-11-29 11:12:03 -08:00
Greg Kroah-Hartman
a4c01ca3b7 Linux 3.10.20 2013-11-20 12:28:01 -08:00
Greg Kroah-Hartman
3729ed7c6a Linux 3.10.19 2013-11-13 12:05:59 +09:00
Greg Kroah-Hartman
4e77f7f126 Linux 3.10.18 2013-11-04 04:31:29 -08:00
Greg Kroah-Hartman
14e9c7db46 Linux 3.10.17 2013-10-18 10:44:19 -07:00
Greg Kroah-Hartman
7fc878164d Linux 3.10.16 2013-10-13 16:08:56 -07:00
Greg Kroah-Hartman
cac65253a9 Linux 3.10.15 2013-10-05 07:13:21 -07:00
Greg Kroah-Hartman
8c15abc94c Linux 3.10.14 2013-10-01 09:18:05 -07:00
Greg Kroah-Hartman
cff43fc878 Linux 3.10.13 2013-09-26 17:18:49 -07:00
Greg Kroah-Hartman
410dbb7461 Linux 3.10.12 2013-09-14 06:55:12 -07:00
Greg Kroah-Hartman
85cdabba08 Linux 3.10.11 2013-09-07 22:10:14 -07:00
Greg Kroah-Hartman
8bf3379a74 Linux 3.10.10 2013-08-29 09:47:51 -07:00
Greg Kroah-Hartman
0a4b6d4ff2 Linux 3.10.9 2013-08-20 15:40:47 -07:00
Greg Kroah-Hartman
6f54059423 Linux 3.10.8 2013-08-20 08:43:19 -07:00
Greg Kroah-Hartman
519be4566e Linux 3.10.7 2013-08-14 22:59:42 -07:00
Greg Kroah-Hartman
22e994efa7 Linux 3.10.6 2013-08-11 18:49:02 -07:00
Greg Kroah-Hartman
dc51cd2570 Linux 3.10.5 2013-08-04 16:51:49 +08:00
Greg Kroah-Hartman
6f7bb6bafb Linux 3.10.4 2013-07-28 16:30:49 -07:00