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, 25 May 2017 00:11:32 +0100
From:   Ian Abbott <abbotti@....co.uk>
To:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Cc:     Arnd Bergmann <arnd@...db.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Nazarewicz <mina86@...a86.com>,
        Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
        Borislav Petkov <bp@...e.de>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Johannes Berg <johannes.berg@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH v2] bug: fix problem including <linux/bug.h> from
 linux/kernel.h

On 2017-05-24 17:06, Ian Abbott wrote:
> If "include/linux/kernel.h" includes <linux/bug.h>, a circular
> dependency is introduced when "include/asm-generic/bug.h" includes
> <linux/kernel.h>.  This results in build breakage when something
> includes <asm/bug.h> before <linux/kernel.h> for architectures that
> select `CONFIG_GENERIC_BUG` because `struct bug_entry` is not fully
> declared (not declared at all in fact) before its members are accessed
> by `is_warning_bug()`.
>
> To avoid this problem, remove the inclusion of <linux/kernel.h> from
> "include/asm-generic/bug.h", but include <linux/types.h> from
> "include/linux/bug.h" because it needs the `bool` type.
>
> A consequence of this change is that since most bug-related,
> function-link macros (`BUG()`, `WARN()` etc.) make use of facilities
> provided by <linux/kernel.h>, something else needs to include that
> before those macros are called.
>
> Signed-off-by: Ian Abbott <abbotti@....co.uk>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Michal Nazarewicz <mina86@...a86.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> ---
> v2: Fix typo in patch subject line.
> ---
>  include/asm-generic/bug.h | 1 -
>  include/linux/bug.h       | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)

This patch and its previous version can be dropped now, since the patch 
that caused the breakage that this patch fixes up 
(<https://lkml.org/lkml/2017/5/23/641>) has been dropped (for now). 
I'll avoid the breakage in the way suggested by Rasmus in 
<https://lkml.org/lkml/2017/5/24/553>.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ