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: <efd56f3e-bc8c-5da5-559d-e0bc6b21fa5b@csgroup.eu>
Date:   Thu, 1 Sep 2022 05:41:33 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Nathan Chancellor <nathan@...nel.org>,
        Michael Ellerman <mpe@...erman.id.au>
CC:     Nicholas Piggin <npiggin@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Arnd Bergmann <arnd@...db.de>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "patches@...ts.linux.dev" <patches@...ts.linux.dev>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] powerpc/math_emu/efp: Include module.h



Le 31/08/2022 à 17:20, Nathan Chancellor a écrit :
> When building with a recent version of clang, there are a couple of
> errors around the call to module_init():
> 
>    arch/powerpc/math-emu/math_efp.c:927:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
>    module_init(spe_mathemu_init);
>    ^
>    int
>    arch/powerpc/math-emu/math_efp.c:927:13: error: a parameter list without types is only allowed in a function definition
>    module_init(spe_mathemu_init);
>                ^
>    2 errors generated.
> 
> module_init() is a macro, which is not getting expanded because module.h
> is not included in this file. Add the include so that the macro can
> expand properly, clearing up the build failure.
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
> 
> No Fixes tag because it seems likely that this is a transient include
> issue (the code builds with GCC). The robot blamed commit e8c07082a810
> ("Kbuild: move to -std=gnu11") but I think that just exposed these
> errors, not caused them.

Well spoted.

Seems like a GCC bug. The code builds fine but silently ignores the 
issue and the following section is missing:

   8 .initcall6.init 00000004  00000000  00000000  00008b30  2**2
                   CONTENTS, ALLOC, LOAD, RELOC, DATA

It means spe_mathemu_init() is never called.

I think it would be worth a GCC bug report.

And by the way:

Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
Fixes: ac6f120369ff ("powerpc/85xx: Workaroudn e500 CPU erratum A005")


> 
>   arch/powerpc/math-emu/math_efp.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c
> index 39b84e7452e1..aa3bb8da1cb9 100644
> --- a/arch/powerpc/math-emu/math_efp.c
> +++ b/arch/powerpc/math-emu/math_efp.c
> @@ -17,6 +17,7 @@
>   
>   #include <linux/types.h>
>   #include <linux/prctl.h>
> +#include <linux/module.h>
>   
>   #include <linux/uaccess.h>
>   #include <asm/reg.h>
> 
> base-commit: dcf8e5633e2e69ad60b730ab5905608b756a032f

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ