From: Greg KH <greg@kroah.com>
To: Ignat Korchagin <ignat@cloudflare.com>
Cc: stable@vger.kernel.org, Ivan Babrou <ivan@cloudflare.com>,
Daniel Dao <dqminh@cloudflare.com>
Subject: Re: Building 4.14 LTS kernel with GCC 8
Date: Thu, 11 Oct 2018 12:17:43 +0200 [thread overview]
Message-ID: <20181011101743.GA27562@kroah.com> (raw)
In-Reply-To: <CALrw=nGdJ51R86=ifv4penfnk0JJNd9fhhH1XGRfosYhCNr_TQ@mail.gmail.com>
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
next prev parent reply other threads:[~2018-10-11 17:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-10-11 10:26 ` Ignat Korchagin
2018-10-16 16:28 ` Ignat Korchagin
2018-10-16 16:42 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011101743.GA27562@kroah.com \
--to=greg@kroah.com \
--cc=dqminh@cloudflare.com \
--cc=ignat@cloudflare.com \
--cc=ivan@cloudflare.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.