All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Mayer <mmayer@broadcom.com>
To: buildroot@busybox.net
Subject: [Buildroot] Kconfig warnings with GCC9
Date: Sat, 11 Jan 2020 09:59:16 -0800	[thread overview]
Message-ID: <CAGt4E5s9k2ypwQ5MXBpQA=Wf_W8SMN4u_DvXJtDeJeR0-9H0Eg@mail.gmail.com> (raw)
In-Reply-To: <87a76ujsuv.fsf@dell.be.48ers.dk>

On Sat, 11 Jan 2020 at 00:32, Peter Korsgaard <peter@korsgaard.com> wrote:
>  > On Fri, 10 Jan 2020 at 12:56, Thomas Petazzoni
>  > <thomas.petazzoni@bootlin.com> wrote:
>  >>
>  >> Hello,
>  >>
>  >> On Fri, 10 Jan 2020 11:17:47 -0800
>  >> Markus Mayer <mmayer@broadcom.com> wrote:
>  >>
>  >> > Hi all,
>  >> >
>  >> > Using GCC9 (Ubuntu 19.10), I am getting some compiler warnings
>  >> > (potential buffer overruns) in the Kconfig code. Is this a known
>  >> > issue?
>  >>
>  >> You can try to update the kconfig code in Buildroot with the kconfig
>  >> code available from the latest kernel, and see if it fixes the
>  >> warnings. We're currently using the kconfig code from 4.17-rc2 it seems.
>
>  > I'll give it a shot.
>
> Before doing that, try running make menuconfig with a recent Linux
> kernel to check if those warnings are no longer triggered.

That's kernel 5.4. Kconfig itself complains about a few Kconfig values
for my stock kernel (maybe because that's 5.3?), but the compiler is
fine. So we should be good.

$ make menuconfig
  HOSTCC  scripts/basic/fixdep
  UPD     scripts/kconfig/mconf-cfg
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig
#
# using defaults found in /boot/config-5.3.0-26-generic
#
/boot/config-5.3.0-26-generic:8195:warning: symbol value 'm' invalid for ASHMEM
/boot/config-5.3.0-26-generic:8460:warning: symbol value 'm' invalid
for REMOTEPROC
/boot/config-5.3.0-26-generic:9141:warning: symbol value 'm' invalid
for ANDROID_BINDER_IPC
/boot/config-5.3.0-26-generic:9142:warning: symbol value 'm' invalid
for ANDROID_BINDERFS

Also, comparing the config sources, there are changes like these,
which remove the code that produces the warnings.

$ diff -u br-current/support/kconfig/confdata.c linux/scripts/kconfig/confdata.c
[...]
-       sprintf(buf, "%s.tmpconfig", dir);
-       out = fopen(buf, "w");
+       out = fopen(".tmpconfig", "w");
        if (!out)
                return 1;

-       sprintf(buf, "%s.tmpconfig_tristate", dir);
-       tristate = fopen(buf, "w");
+       tristate = fopen(".tmpconfig_tristate", "w");
        if (!tristate) {
                fclose(out);
                return 1;
        }

-       sprintf(buf, "%s.tmpconfig.h", dir);
-       out_h = fopen(buf, "w");
+       out_h = fopen(".tmpconfig.h", "w");
        if (!out_h) {
                fclose(out);
                fclose(tristate);
[...]

Regards,
-Markus

  reply	other threads:[~2020-01-11 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 19:17 [Buildroot] Kconfig warnings with GCC9 Markus Mayer
2020-01-10 20:56 ` Thomas Petazzoni
2020-01-10 22:35   ` Markus Mayer
2020-01-11  8:32     ` Peter Korsgaard
2020-01-11 17:59       ` Markus Mayer [this message]
     [not found]         ` <CAGt4E5vMQgJKAKfFgr7oUmMJjyDufB72L7VVUgS-UGg8g6c+_A@mail.gmail.com>
2020-02-06 20:22           ` Thomas Petazzoni

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='CAGt4E5s9k2ypwQ5MXBpQA=Wf_W8SMN4u_DvXJtDeJeR0-9H0Eg@mail.gmail.com' \
    --to=mmayer@broadcom.com \
    --cc=buildroot@busybox.net \
    /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.