* Building 4.14 LTS kernel with GCC 8 @ 2018-10-09 13:07 Ignat Korchagin 2018-10-11 7:29 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Ignat Korchagin @ 2018-10-09 13:07 UTC (permalink / raw) To: stable; +Cc: Ivan Babrou, Daniel Dao Hello, We were trying to build 4.14 kernel with GCC 8, but perf failed to compile. The upstream tree seems to have necessary commits to support GCC 8, but they were not ported to 4.14 branch. With backporting the following commits we were able to restore perf compilation and compile a working 4.14 kernel with GCC 8.2: 6810158d526e483868e519befff407b91e76b3db: perf annotate: Use asprintf when formatting objdump command b7a313d84e853049062011d78cb04b6decd12f5c: perf tools: Fix python extension build for gcc 8 77f18153c080855e1c3fb520ca31a4e61530121d: perf tools: Fix snprint warnings for gcc 8 06c3f2aa9fc68e7f3fe3d83e7569d2a2801d9f99: perf utils: Move is_directory() to path.h Propose to apply the above commits to 4.14 to be able to compile it with GCC 8 (mostly to properly support CONFIG_RETPOLINE) Commit 6810158d526e483868e519befff407b91e76b3db might need adjustment to cleanly apply on 4.14 branch. Regards, Ignat ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-09 13:07 Building 4.14 LTS kernel with GCC 8 Ignat Korchagin @ 2018-10-11 7:29 ` Greg KH 2018-10-11 10:12 ` Ignat Korchagin 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2018-10-11 7:29 UTC (permalink / raw) To: Ignat Korchagin; +Cc: stable, Ivan Babrou, Daniel Dao On Tue, Oct 09, 2018 at 02:07:15PM +0100, Ignat Korchagin wrote: > Hello, > > We were trying to build 4.14 kernel with GCC 8, but perf failed to > compile. The upstream tree seems to have necessary commits to support > GCC 8, but they were not ported to 4.14 branch. With backporting the > following commits we were able to restore perf compilation and compile > a working 4.14 kernel with GCC 8.2: > > 6810158d526e483868e519befff407b91e76b3db: perf annotate: Use asprintf > when formatting objdump command > b7a313d84e853049062011d78cb04b6decd12f5c: perf tools: Fix python > extension build for gcc 8 > 77f18153c080855e1c3fb520ca31a4e61530121d: perf tools: Fix snprint > warnings for gcc 8 > 06c3f2aa9fc68e7f3fe3d83e7569d2a2801d9f99: perf utils: Move > is_directory() to path.h Why is this last commit needed? I've applied the other 3 now. thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-11 7:29 ` Greg KH @ 2018-10-11 10:12 ` Ignat Korchagin 2018-10-11 10:17 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Ignat Korchagin @ 2018-10-11 10:12 UTC (permalink / raw) To: greg; +Cc: stable, Ivan Babrou, Daniel Dao On Thu, Oct 11, 2018 at 8:29 AM Greg KH <greg@kroah.com> wrote: > Why is this last commit needed? Without it I get the following compile error (Debian 9 with self-compiled GCC 8): builtin-script.c: In function 'get_script_path': builtin-script.c:2139:20: error: '%s' directive writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-overflow=] sprintf(path, "%s/%s", base_path, dent->d_name); ^~ In file included from /usr/include/stdio.h:938, from util/event.h:6, from util/debug.h:9, from builtin-script.c:6: /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 2 and 4352 bytes into a destination of size 4096 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ builtin-script.c:2139:20: error: '%s' directive writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-overflow=] sprintf(path, "%s/%s", base_path, dent->d_name); ^~ In file included from /usr/include/stdio.h:938, from util/event.h:6, from util/debug.h:9, from builtin-script.c:6: /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 2 and 4352 bytes into a destination of size 4096 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ builtin-script.c: In function 'find_scripts': builtin-script.c:2139:20: error: '%s' directive writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-overflow=] sprintf(path, "%s/%s", base_path, dent->d_name); ^~ In file included from /usr/include/stdio.h:938, from util/event.h:6, from util/debug.h:9, from builtin-script.c:6: /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 2 and 4352 bytes into a destination of size 4096 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ builtin-script.c:2139:20: error: '%s' directive writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-overflow=] sprintf(path, "%s/%s", base_path, dent->d_name); ^~ In file included from /usr/include/stdio.h:938, from util/event.h:6, from util/debug.h:9, from builtin-script.c:6: /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 2 and 4352 bytes into a destination of size 4096 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Regards, Ignat ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-11 10:12 ` Ignat Korchagin @ 2018-10-11 10:17 ` Greg KH 2018-10-11 10:26 ` Ignat Korchagin 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2018-10-11 10:17 UTC (permalink / raw) To: Ignat Korchagin; +Cc: stable, Ivan Babrou, Daniel Dao On Thu, Oct 11, 2018 at 11:12:38AM +0100, Ignat Korchagin wrote: > On Thu, Oct 11, 2018 at 8:29 AM Greg KH <greg@kroah.com> wrote: > > > Why is this last commit needed? > > Without it I get the following compile error (Debian 9 with > self-compiled GCC 8): > > builtin-script.c: In function 'get_script_path': > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > bytes into a region of size between 0 and 4095 > [-Werror=format-overflow=] > sprintf(path, "%s/%s", base_path, dent->d_name); > ^~ > In file included from /usr/include/stdio.h:938, > from util/event.h:6, > from util/debug.h:9, > from builtin-script.c:6: > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > destination of size 4096 > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __bos (__s), __fmt, __va_arg_pack ()); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > bytes into a region of size between 0 and 4095 > [-Werror=format-overflow=] > sprintf(path, "%s/%s", base_path, dent->d_name); > ^~ > In file included from /usr/include/stdio.h:938, > from util/event.h:6, > from util/debug.h:9, > from builtin-script.c:6: > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > destination of size 4096 > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __bos (__s), __fmt, __va_arg_pack ()); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > builtin-script.c: In function 'find_scripts': > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > bytes into a region of size between 0 and 4095 > [-Werror=format-overflow=] > sprintf(path, "%s/%s", base_path, dent->d_name); > ^~ > In file included from /usr/include/stdio.h:938, > from util/event.h:6, > from util/debug.h:9, > from builtin-script.c:6: > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > destination of size 4096 > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __bos (__s), __fmt, __va_arg_pack ()); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > bytes into a region of size between 0 and 4095 > [-Werror=format-overflow=] > sprintf(path, "%s/%s", base_path, dent->d_name); > ^~ > In file included from /usr/include/stdio.h:938, > from util/event.h:6, > from util/debug.h:9, > from builtin-script.c:6: > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > destination of size 4096 > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __bos (__s), __fmt, __va_arg_pack ()); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors That's odd, given that the moved code is the same... Oh well, I'll go queue it up, thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-11 10:17 ` Greg KH @ 2018-10-11 10:26 ` Ignat Korchagin 2018-10-16 16:28 ` Ignat Korchagin 0 siblings, 1 reply; 7+ messages in thread From: Ignat Korchagin @ 2018-10-11 10:26 UTC (permalink / raw) To: greg; +Cc: stable, Ivan Babrou, Daniel Dao > That's odd, given that the moved code is the same... Yes, I agree. But I didn't debug why exactly it happens, because there is an upstream patch already, which "fixes" it somehow. Thanks, Ignat On Thu, Oct 11, 2018 at 11:17 AM Greg KH <greg@kroah.com> wrote: > > On Thu, Oct 11, 2018 at 11:12:38AM +0100, Ignat Korchagin wrote: > > On Thu, Oct 11, 2018 at 8:29 AM Greg KH <greg@kroah.com> wrote: > > > > > Why is this last commit needed? > > > > Without it I get the following compile error (Debian 9 with > > self-compiled GCC 8): > > > > builtin-script.c: In function 'get_script_path': > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > bytes into a region of size between 0 and 4095 > > [-Werror=format-overflow=] > > sprintf(path, "%s/%s", base_path, dent->d_name); > > ^~ > > In file included from /usr/include/stdio.h:938, > > from util/event.h:6, > > from util/debug.h:9, > > from builtin-script.c:6: > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > destination of size 4096 > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > __bos (__s), __fmt, __va_arg_pack ()); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > bytes into a region of size between 0 and 4095 > > [-Werror=format-overflow=] > > sprintf(path, "%s/%s", base_path, dent->d_name); > > ^~ > > In file included from /usr/include/stdio.h:938, > > from util/event.h:6, > > from util/debug.h:9, > > from builtin-script.c:6: > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > destination of size 4096 > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > __bos (__s), __fmt, __va_arg_pack ()); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > builtin-script.c: In function 'find_scripts': > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > bytes into a region of size between 0 and 4095 > > [-Werror=format-overflow=] > > sprintf(path, "%s/%s", base_path, dent->d_name); > > ^~ > > In file included from /usr/include/stdio.h:938, > > from util/event.h:6, > > from util/debug.h:9, > > from builtin-script.c:6: > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > destination of size 4096 > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > __bos (__s), __fmt, __va_arg_pack ()); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > bytes into a region of size between 0 and 4095 > > [-Werror=format-overflow=] > > sprintf(path, "%s/%s", base_path, dent->d_name); > > ^~ > > In file included from /usr/include/stdio.h:938, > > from util/event.h:6, > > from util/debug.h:9, > > from builtin-script.c:6: > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > destination of size 4096 > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > __bos (__s), __fmt, __va_arg_pack ()); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > cc1: all warnings being treated as errors > > That's odd, given that the moved code is the same... > > Oh well, I'll go queue it up, thanks, > > greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-11 10:26 ` Ignat Korchagin @ 2018-10-16 16:28 ` Ignat Korchagin 2018-10-16 16:42 ` Greg Kroah-Hartman 0 siblings, 1 reply; 7+ messages in thread From: Ignat Korchagin @ 2018-10-16 16:28 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: stable, Ivan Babrou, Daniel Dao Hi Greg, It seems 4.14.76 perf compile is still broken for GCC 8 and we can't find "77f18153c080855e1c3fb520ca31a4e61530121d: perf tools: Fix snprint warnings for gcc 8" in the changelog. Was it missed by any chance? Thanks, Ignat On Thu, Oct 11, 2018 at 11:26 AM Ignat Korchagin <ignat@cloudflare.com> wrote: > > > That's odd, given that the moved code is the same... > > Yes, I agree. But I didn't debug why exactly it happens, because there > is an upstream patch already, which "fixes" it somehow. > > Thanks, > Ignat > On Thu, Oct 11, 2018 at 11:17 AM Greg KH <greg@kroah.com> wrote: > > > > On Thu, Oct 11, 2018 at 11:12:38AM +0100, Ignat Korchagin wrote: > > > On Thu, Oct 11, 2018 at 8:29 AM Greg KH <greg@kroah.com> wrote: > > > > > > > Why is this last commit needed? > > > > > > Without it I get the following compile error (Debian 9 with > > > self-compiled GCC 8): > > > > > > builtin-script.c: In function 'get_script_path': > > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > > bytes into a region of size between 0 and 4095 > > > [-Werror=format-overflow=] > > > sprintf(path, "%s/%s", base_path, dent->d_name); > > > ^~ > > > In file included from /usr/include/stdio.h:938, > > > from util/event.h:6, > > > from util/debug.h:9, > > > from builtin-script.c:6: > > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > > destination of size 4096 > > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > __bos (__s), __fmt, __va_arg_pack ()); > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > > bytes into a region of size between 0 and 4095 > > > [-Werror=format-overflow=] > > > sprintf(path, "%s/%s", base_path, dent->d_name); > > > ^~ > > > In file included from /usr/include/stdio.h:938, > > > from util/event.h:6, > > > from util/debug.h:9, > > > from builtin-script.c:6: > > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > > destination of size 4096 > > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > __bos (__s), __fmt, __va_arg_pack ()); > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > builtin-script.c: In function 'find_scripts': > > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > > bytes into a region of size between 0 and 4095 > > > [-Werror=format-overflow=] > > > sprintf(path, "%s/%s", base_path, dent->d_name); > > > ^~ > > > In file included from /usr/include/stdio.h:938, > > > from util/event.h:6, > > > from util/debug.h:9, > > > from builtin-script.c:6: > > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > > destination of size 4096 > > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > __bos (__s), __fmt, __va_arg_pack ()); > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > builtin-script.c:2139:20: error: '%s' directive writing up to 255 > > > bytes into a region of size between 0 and 4095 > > > [-Werror=format-overflow=] > > > sprintf(path, "%s/%s", base_path, dent->d_name); > > > ^~ > > > In file included from /usr/include/stdio.h:938, > > > from util/event.h:6, > > > from util/debug.h:9, > > > from builtin-script.c:6: > > > /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: > > > '__builtin___sprintf_chk' output between 2 and 4352 bytes into a > > > destination of size 4096 > > > return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > __bos (__s), __fmt, __va_arg_pack ()); > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > cc1: all warnings being treated as errors > > > > That's odd, given that the moved code is the same... > > > > Oh well, I'll go queue it up, thanks, > > > > greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building 4.14 LTS kernel with GCC 8 2018-10-16 16:28 ` Ignat Korchagin @ 2018-10-16 16:42 ` Greg Kroah-Hartman 0 siblings, 0 replies; 7+ messages in thread From: Greg Kroah-Hartman @ 2018-10-16 16:42 UTC (permalink / raw) To: Ignat Korchagin; +Cc: stable, Ivan Babrou, Daniel Dao On Tue, Oct 16, 2018 at 05:28:39PM +0100, Ignat Korchagin wrote: > Hi Greg, > > It seems 4.14.76 perf compile is still broken for GCC 8 and we can't > find "77f18153c080855e1c3fb520ca31a4e61530121d: perf tools: Fix > snprint > warnings for gcc 8" in the changelog. > > Was it missed by any chance? I think it was totally missed, sorry about that. Now queued up. greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-10-17 0:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-10-09 13:07 Building 4.14 LTS kernel with GCC 8 Ignat Korchagin 2018-10-11 7:29 ` Greg KH 2018-10-11 10:12 ` Ignat Korchagin 2018-10-11 10:17 ` Greg KH 2018-10-11 10:26 ` Ignat Korchagin 2018-10-16 16:28 ` Ignat Korchagin 2018-10-16 16:42 ` Greg Kroah-Hartman
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.