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: <Z0C3mDCngAf7ErM2@gmail.com>
Date: Fri, 22 Nov 2024 17:55:52 +0100
From: Ingo Molnar <mingo@...nel.org>
To: "Borislav Petkov (AMD)" <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, x86-ml <x86@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] x86/boot: Get rid of linux/init.h include


* Borislav Petkov (AMD) <bp@...en8.de> wrote:

> 
> this is what I think we should do (just a first patch) to decouple the
> decompressor from kernel proper headers namespace so that there's no
> collisions and ugly ifdeffery when those kernel proper headers get shared.
> 
> And if we want to share things, we will use asm/shared/ to put such shared
> definitions there.
> 
> Thoughts?

Sounds good.


> --- a/arch/x86/boot/compressed/head_32.S
> +++ b/arch/x86/boot/compressed/head_32.S
> @@ -24,7 +24,6 @@
>   */
>  	.text
>  
> -#include <linux/init.h>
>  #include <linux/linkage.h>
>  #include <asm/segment.h>
>  #include <asm/page_types.h>
> @@ -32,6 +31,10 @@
>  #include <asm/asm-offsets.h>
>  #include <asm/bootparam.h>
>  
> +#ifdef KERNEL_PROPER_HEADER
> +#error Do not include kernel proper namespace headers
> +#endif

The canonical solution in such cases is to use the existing header 
guard, ie:

 #ifdef _LINUX_INIT_H
 # error Do not include kernel proper namespace headers
 #endif

Then we can skip defining KERNEL_PROPER_HEADER as well, and this change 
will be purely to x86 code.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ