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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200206192007.l7fv4ljxhhmvdmvx@work>
Date:   Thu, 6 Feb 2020 20:20:07 +0100
From:   Lukas Czerner <lczerner@...hat.com>
To:     Eric Sandeen <sandeen@...deen.net>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] tst_libext2fs: Avoid multiple definition of global
 variables

On Thu, Feb 06, 2020 at 11:52:17AM -0600, Eric Sandeen wrote:
> On 1/30/20 7:21 AM, Lukas Czerner wrote:
> > gcc version 10 changed the default from -fcommon to -fno-common and as a
> > result e2fsprogs unit tests fail because tst_libext2fs.c end up with a
> > build error.
> > 
> > This is because it defines two global variables debug_prog_name and
> > extra_cmds that are already defined in debugfs/debugfs.c. With -fcommon
> > linker was able to resolve those into the same object, however with
> > -fno-common it's no longer able to do it and we end up with
> > multiple definition errors.
> > 
> > Fix the problem by creating an extern declaration of said variables in
> > debugfs.h and just setting them in tst_libext2fs.c without additional
> > declaration.
> > 
> > Signed-off-by: Lukas Czerner <lczerner@...hat.com>
> 
> This looks fine to me.
> 
> Reviewed-by: Eric Sandeen <sandeen@...hat.com>
> 
> Is there any need to fix the one in lib/ext2fs/extent.c ?  It's only there
> under #ifdef DEBUG though.

Yeah, but if we ever want to use DEBUG macro it would fail with
-fno-common. Uff, I guess I have to fix this one as well.

Thanks Eric,
-Lukas

> 
> Thanks,
> -Eric
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ