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]
Date:   Thu, 14 Nov 2019 13:39:20 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Lianbo Jiang <lijiang@...hat.com>
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org, bhe@...hat.com, dyoung@...hat.com,
        jgross@...e.com, dhowells@...hat.com, Thomas.Lendacky@....com,
        ebiederm@...ssion.com, vgoyal@...hat.com, d.hatayama@...itsu.com,
        horms@...ge.net.au, kexec@...ts.infradead.org
Subject: Re: [PATCH 3/3 v9] kexec: Fix i386 build warnings that missed
 declaration of struct kimage

On Fri, Nov 08, 2019 at 05:00:27PM +0800, Lianbo Jiang wrote:
> Kbuild test robot reported some build warnings as follow:
> 
> arch/x86/include/asm/crash.h:5:32: warning: 'struct kimage' declared
> inside parameter list will not be visible outside of this definition
> or declaration
>     int crash_load_segments(struct kimage *image);
>                                    ^~~~~~
>     int crash_copy_backup_region(struct kimage *image);
>                                         ^~~~~~
>     int crash_setup_memmap_entries(struct kimage *image,
>                                           ^~~~~~
> The 'struct kimage' is defined in the header file include/linux/kexec.h,
> before using it, need to include its header file or make a declaration.
> Otherwise the above warnings may be triggered.
> 
> Add a declaration of struct kimage to the file arch/x86/include/asm/
> crash.h, that will solve these compile warnings.
> 
> Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")

This is, of course, wrong. Your *first* patch is introducing those
warnings and I'm wondering how did you not see them during building?

In file included from arch/x86/realmode/init.c:11:
./arch/x86/include/asm/crash.h:5:32: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    5 | int crash_load_segments(struct kimage *image);
      |                                ^~~~~~
./arch/x86/include/asm/crash.h:6:37: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    6 | int crash_copy_backup_region(struct kimage *image);
      |                                     ^~~~~~
./arch/x86/include/asm/crash.h:7:39: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    7 | int crash_setup_memmap_entries(struct kimage *image,
      |


And that happens because you've included asm/crash.h in
arch/x86/realmode/init.c and it of course complains because it hasn't
seen that struct yet.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ