lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=ViDa64P4xM_DH3bFkkSO0wjDjOBmBz3hELCoJLcRbCNA@mail.gmail.com>
Date:   Tue, 19 May 2020 08:52:42 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Daniel Thompson <daniel.thompson@...aro.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the kgdb tree

Hi,

On Tue, May 19, 2020 at 7:58 AM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Tue, May 19, 2020 at 7:05 AM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the kgdb tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/tty/serial/kgdboc.c:418:13: error: expected declaration specifiers or '...' before string constant
> >   418 | early_param("ekgdboc", kgdboc_early_init);
> >       |             ^~~~~~~~~
> > drivers/tty/serial/kgdboc.c:418:24: error: expected declaration specifiers or '...' before 'kgdboc_early_init'
> >   418 | early_param("ekgdboc", kgdboc_early_init);
> >       |                        ^~~~~~~~~~~~~~~~~
> > drivers/tty/serial/kgdboc.c:546:13: error: expected declaration specifiers or '...' before string constant
> >   546 | early_param("kgdboc_earlycon", kgdboc_earlycon_init);
> >       |             ^~~~~~~~~~~~~~~~~
> > drivers/tty/serial/kgdboc.c:546:32: error: expected declaration specifiers or '...' before 'kgdboc_earlycon_init'
> >   546 | early_param("kgdboc_earlycon", kgdboc_earlycon_init);
> >       |                                ^~~~~~~~~~~~~~~~~~~~
> > drivers/tty/serial/kgdboc.c:505:19: warning: 'kgdboc_earlycon_init' defined but not used [-Wunused-function]
> >   505 | static int __init kgdboc_earlycon_init(char *opt)
> >       |                   ^~~~~~~~~~~~~~~~~~~~
> > drivers/tty/serial/kgdboc.c:411:19: warning: 'kgdboc_early_init' defined but not used [-Wunused-function]
> >   411 | static int __init kgdboc_early_init(char *opt)
> >       |                   ^~~~~~~~~~~~~~~~~
> >
> > Caused by commit
> >
> >   220995622da5 ("kgdboc: Add kgdboc_earlycon to support early kgdb using boot consoles")
> >
> > I have used the kgdb tree from next-20200518 for today.
>
> Ugh.  Actually, I think the commit to blame is:
>
> eae3e19ca930 ("kgdboc: Remove useless #ifdef
> CONFIG_KGDB_SERIAL_CONSOLE in kgdboc")
>
> The next commit just made it worse.  Apparently the #ifdef wasn't so
> useless after all.  It was just subtly keeping the code from compiling
> when kgdboc was used as a module.  That's because when it's a module
> we instead get this defined:
>
> #define CONFIG_KGDB_SERIAL_CONSOLE_MODULE 1
>
> Apparently I didn't re-test as a module after I made this change in
> one of the later spins.  :(
>
> I think I can whip up a quick patch that uses "IS_BUILTIN(option)".
> Basically this should go back to how the code was in one of the
> earlier patchsets where I tested this.

Fix posted at:

https://lore.kernel.org/r/20200519084345.1.I91670accc8a5ddabab227eb63bb4ad3e2e9d2b58@changeid

I have confirmed:

* x86_64 allmodconfig atop the kgdb tree compiles.

* Building and using kgdboc as a module works with this patch on my
local 5.4-based tree.  Loaded the module both with module parameters
and via echoing to sysfs.  Unloaded the module and confirmed it works.

* Building and using kgdboc builtin allows me to do kgdb_earlycon on
my local 5.4-based tree.


-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ