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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241009035203.aqaxu22kckgmm4rr@treble>
Date: Tue, 8 Oct 2024 20:52:03 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: HONG Yifan <elsk@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, kernel-team@...roid.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 RESEND] objtool: Also include tools/include/uapi

On Tue, Oct 08, 2024 at 11:47:17PM +0000, HONG Yifan wrote:
> When building objtool against a sysroot that contains a stripped down
> version of the UAPI headers, the following error happens:
> 
>     In file included from arch/x86/decode.c:10:
>     In file included from .../tools/arch/x86/include/asm/insn.h:10:
>     In file included from <sysroot>/include/asm/byteorder.h:9:
>     In file included from <sysroot>/include/linux/byteorder/little_endian.h:15:
>     In file included from <sysroot>/include/linux/stddef.h:9:
>     In file included from .../tools/include/linux/compiler_types.h:36:
>     .../tools/include/linux/compiler-gcc.h:3:2: error: "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
>         3 | #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
>         |  ^
>     1 error generated.
> 
> As hinted by the error, this is because <sysroot>/include/linux/stddef.h
> (a stripped-down version of uapi/include/linux/stddef.h) includes
> linux/compiler_types.h directly. However, this gets resolved to
> tools/include/linux/compiler_types.h, which is not expected to be
> included directly.
> 
> To resolve this, I added tools/include/uapi to the include paths when
> building objtool. With this trick, linux/stddef.h is resolved to
> tools/include/uapi/linux/stddef.h, which doesn't include
> linux/compiler_types.h.
> 
> Signed-off-by: HONG Yifan <elsk@...gle.com>

Queued, thanks!

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ