* [PATCH 0/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
@ 2017-05-24 13:21 Ian Abbott
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
0 siblings, 1 reply; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 13:21 UTC (permalink / raw)
To: linux-kernel, linux-arch
Cc: Arnd Bergmann, Andrew Morton, Michal Nazarewicz, Hidehiro Kawai,
Borislav Petkov, Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
PATCH 1 is a follow-up patch to my previous patch "[PATCH v4 2/2]
kernel.h: handle pointers to arrays better in container_of()":
<https://lkml.org/lkml/2017/5/23/641>. The previous patch introduced a
build failure:
<https://lists.01.org/pipermail/kbuild-all/2017-May/034127.html>. The
build failure was due to a circular dependency introduced by the
previous patch and occurs when <asm-generic/bug.h> is included before
<linux/kernel.h> for architectures that select `CONFIG_GENERIC_BUG`.
PATCH 1 fixes this circular dependency. Ideally, it should be applied
before my previous patch to avoid breakage during git bisect builds, but
can be applied after if that is not a concern.
1) bug: fix problem including <linux.bug.h> from linux/kernel.h
include/asm-generic/bug.h | 1 -
include/linux/bug.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:21 [PATCH 0/1] bug: fix problem including <linux.bug.h> from linux/kernel.h Ian Abbott
@ 2017-05-24 13:21 ` Ian Abbott
2017-05-24 13:21 ` Ian Abbott
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 13:21 UTC (permalink / raw)
To: linux-kernel, linux-arch
Cc: Arnd Bergmann, Andrew Morton, Michal Nazarewicz, Hidehiro Kawai,
Borislav Petkov, Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
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@mev.co.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
include/asm-generic/bug.h | 1 -
include/linux/bug.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 87191357d303..074a66de47f6 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -12,7 +12,6 @@
#endif
#ifndef __ASSEMBLY__
-#include <linux/kernel.h>
#ifdef CONFIG_BUG
diff --git a/include/linux/bug.h b/include/linux/bug.h
index 687b557fc5eb..68692b775343 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -3,6 +3,7 @@
#include <asm/bug.h>
#include <linux/compiler.h>
+#include <linux/types.h>
enum bug_trap_type {
BUG_TRAP_TYPE_NONE = 0,
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
@ 2017-05-24 13:21 ` Ian Abbott
2017-05-24 13:37 ` Rasmus Villemoes
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 13:21 UTC (permalink / raw)
To: linux-kernel, linux-arch
Cc: Arnd Bergmann, Andrew Morton, Michal Nazarewicz, Hidehiro Kawai,
Borislav Petkov, Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
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@mev.co.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
include/asm-generic/bug.h | 1 -
include/linux/bug.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 87191357d303..074a66de47f6 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -12,7 +12,6 @@
#endif
#ifndef __ASSEMBLY__
-#include <linux/kernel.h>
#ifdef CONFIG_BUG
diff --git a/include/linux/bug.h b/include/linux/bug.h
index 687b557fc5eb..68692b775343 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -3,6 +3,7 @@
#include <asm/bug.h>
#include <linux/compiler.h>
+#include <linux/types.h>
enum bug_trap_type {
BUG_TRAP_TYPE_NONE = 0,
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
2017-05-24 13:21 ` Ian Abbott
@ 2017-05-24 13:37 ` Rasmus Villemoes
2017-05-24 15:55 ` Ian Abbott
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Rasmus Villemoes @ 2017-05-24 13:37 UTC (permalink / raw)
To: Ian Abbott
Cc: linux-kernel, linux-arch, Arnd Bergmann, Andrew Morton,
Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov, Johannes Berg,
Peter Zijlstra, Alexander Potapenko
On 24 May 2017 at 15:21, Ian Abbott <abbotti@mev.co.uk> wrote:
> If "include/linux/kernel.h" includes <linux/bug.h>, a circular
> dependency is introduced
Then don't. Can't we just create linux/build_bug.h and have that
contain the BUILD_BUG related macros - they're really completely
unrelated to all the asm-cruft bug.h needs to know about. build_bug.h
can then include compiler.h and not much else to figure out how it may
implement its macros. Then kernel.h can include build_bug.h, and we
don't force each and every translation unit to include bug.h and
everything that then pulls in. We just got rid of a lot of header
bloat, let's try to keep it that way.
Rasmus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:37 ` Rasmus Villemoes
@ 2017-05-24 15:55 ` Ian Abbott
0 siblings, 0 replies; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 15:55 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: linux-kernel, linux-arch, Arnd Bergmann, Andrew Morton,
Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov, Johannes Berg,
Peter Zijlstra, Alexander Potapenko
On 24/05/17 14:37, Rasmus Villemoes wrote:
> On 24 May 2017 at 15:21, Ian Abbott <abbotti@mev.co.uk> wrote:
>> If "include/linux/kernel.h" includes <linux/bug.h>, a circular
>> dependency is introduced
>
> Then don't. Can't we just create linux/build_bug.h and have that
> contain the BUILD_BUG related macros - they're really completely
> unrelated to all the asm-cruft bug.h needs to know about. build_bug.h
> can then include compiler.h and not much else to figure out how it may
> implement its macros. Then kernel.h can include build_bug.h, and we
> don't force each and every translation unit to include bug.h and
> everything that then pulls in. We just got rid of a lot of header
> bloat, let's try to keep it that way.
Thanks, I'll take a look at that. In the meantime, I noticed the title
line of this patch contains a nasty typo, so I'll send a v2 patch to fix
that.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
2017-05-24 13:21 ` Ian Abbott
2017-05-24 13:37 ` Rasmus Villemoes
@ 2017-05-24 16:06 ` Ian Abbott
2017-05-24 23:11 ` Ian Abbott
` (2 more replies)
2017-05-25 2:25 ` [PATCH 1/1] bug: fix problem including <linux.bug.h> " kbuild test robot
2017-05-25 2:47 ` kbuild test robot
4 siblings, 3 replies; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 16:06 UTC (permalink / raw)
To: linux-kernel, linux-arch
Cc: Arnd Bergmann, Andrew Morton, Michal Nazarewicz, Hidehiro Kawai,
Borislav Petkov, Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
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@mev.co.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Peter Zijlstra <peterz@infradead.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(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 87191357d303..074a66de47f6 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -12,7 +12,6 @@
#endif
#ifndef __ASSEMBLY__
-#include <linux/kernel.h>
#ifdef CONFIG_BUG
diff --git a/include/linux/bug.h b/include/linux/bug.h
index 687b557fc5eb..68692b775343 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -3,6 +3,7 @@
#include <asm/bug.h>
#include <linux/compiler.h>
+#include <linux/types.h>
enum bug_trap_type {
BUG_TRAP_TYPE_NONE = 0,
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
@ 2017-05-24 23:11 ` Ian Abbott
2017-05-24 23:26 ` kbuild test robot
2017-05-24 23:53 ` kbuild test robot
2 siblings, 0 replies; 15+ messages in thread
From: Ian Abbott @ 2017-05-24 23:11 UTC (permalink / raw)
To: linux-kernel, linux-arch
Cc: Arnd Bergmann, Andrew Morton, Michal Nazarewicz, Hidehiro Kawai,
Borislav Petkov, Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
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@mev.co.uk>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Nazarewicz <mina86@mina86.com>
> Cc: Peter Zijlstra <peterz@infradead.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@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
2017-05-24 23:11 ` Ian Abbott
@ 2017-05-24 23:26 ` kbuild test robot
2017-05-24 23:26 ` kbuild test robot
2017-05-24 23:53 ` kbuild test robot
2 siblings, 1 reply; 15+ messages in thread
From: kbuild test robot @ 2017-05-24 23:26 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
[-- Attachment #1: Type: text/plain, Size: 5469 bytes --]
Hi Ian,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-063508
config: x86_64-nfsroot (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from arch/x86/purgatory/purgatory.c:13:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
arch/x86/purgatory/purgatory.c: In function 'verify_sha256_digest':
>> arch/x86/purgatory/purgatory.c:48:32: warning: implicit declaration of function 'ARRAY_SIZE' [-Wimplicit-function-declaration]
end = purgatory_sha_regions + ARRAY_SIZE(purgatory_sha_regions);
^~~~~~~~~~
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
vim +/ARRAY_SIZE +48 arch/x86/purgatory/purgatory.c
8fc5b4d41 Vivek Goyal 2014-08-08 7 * Vivek Goyal <vgoyal@redhat.com>
8fc5b4d41 Vivek Goyal 2014-08-08 8 *
8fc5b4d41 Vivek Goyal 2014-08-08 9 * This source code is licensed under the GNU General Public License,
8fc5b4d41 Vivek Goyal 2014-08-08 10 * Version 2. See the file COPYING for more details.
8fc5b4d41 Vivek Goyal 2014-08-08 11 */
8fc5b4d41 Vivek Goyal 2014-08-08 12
40c50c1fe Thomas Gleixner 2017-03-10 @13 #include <linux/bug.h>
40c50c1fe Thomas Gleixner 2017-03-10 14 #include <asm/purgatory.h>
40c50c1fe Thomas Gleixner 2017-03-10 15
8fc5b4d41 Vivek Goyal 2014-08-08 16 #include "sha256.h"
8fc5b4d41 Vivek Goyal 2014-08-08 17 #include "../boot/string.h"
8fc5b4d41 Vivek Goyal 2014-08-08 18
40c50c1fe Thomas Gleixner 2017-03-10 19 unsigned long purgatory_backup_dest __section(.kexec-purgatory);
40c50c1fe Thomas Gleixner 2017-03-10 20 unsigned long purgatory_backup_src __section(.kexec-purgatory);
40c50c1fe Thomas Gleixner 2017-03-10 21 unsigned long purgatory_backup_sz __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 22
40c50c1fe Thomas Gleixner 2017-03-10 23 u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 24
40c50c1fe Thomas Gleixner 2017-03-10 25 struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 26
8fc5b4d41 Vivek Goyal 2014-08-08 27 /*
8fc5b4d41 Vivek Goyal 2014-08-08 28 * On x86, second kernel requries first 640K of memory to boot. Copy
8fc5b4d41 Vivek Goyal 2014-08-08 29 * first 640K to a backup region in reserved memory range so that second
8fc5b4d41 Vivek Goyal 2014-08-08 30 * kernel can use first 640K.
8fc5b4d41 Vivek Goyal 2014-08-08 31 */
8fc5b4d41 Vivek Goyal 2014-08-08 32 static int copy_backup_region(void)
8fc5b4d41 Vivek Goyal 2014-08-08 33 {
40c50c1fe Thomas Gleixner 2017-03-10 34 if (purgatory_backup_dest) {
40c50c1fe Thomas Gleixner 2017-03-10 35 memcpy((void *)purgatory_backup_dest,
40c50c1fe Thomas Gleixner 2017-03-10 36 (void *)purgatory_backup_src, purgatory_backup_sz);
40c50c1fe Thomas Gleixner 2017-03-10 37 }
8fc5b4d41 Vivek Goyal 2014-08-08 38 return 0;
8fc5b4d41 Vivek Goyal 2014-08-08 39 }
8fc5b4d41 Vivek Goyal 2014-08-08 40
72042a8c7 Tobin C. Harding 2017-02-20 41 static int verify_sha256_digest(void)
8fc5b4d41 Vivek Goyal 2014-08-08 42 {
40c50c1fe Thomas Gleixner 2017-03-10 43 struct kexec_sha_region *ptr, *end;
8fc5b4d41 Vivek Goyal 2014-08-08 44 u8 digest[SHA256_DIGEST_SIZE];
8fc5b4d41 Vivek Goyal 2014-08-08 45 struct sha256_state sctx;
8fc5b4d41 Vivek Goyal 2014-08-08 46
8fc5b4d41 Vivek Goyal 2014-08-08 47 sha256_init(&sctx);
40c50c1fe Thomas Gleixner 2017-03-10 @48 end = purgatory_sha_regions + ARRAY_SIZE(purgatory_sha_regions);
40c50c1fe Thomas Gleixner 2017-03-10 49
40c50c1fe Thomas Gleixner 2017-03-10 50 for (ptr = purgatory_sha_regions; ptr < end; ptr++)
8fc5b4d41 Vivek Goyal 2014-08-08 51 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len);
:::::: The code at line 48 was first introduced by commit
:::::: 40c50c1fecdf012a3bf055ec813f0ef2eda2749c kexec, x86/purgatory: Unbreak it and clean it up
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27398 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 23:26 ` kbuild test robot
@ 2017-05-24 23:26 ` kbuild test robot
0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2017-05-24 23:26 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
[-- Attachment #1: Type: text/plain, Size: 5469 bytes --]
Hi Ian,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-063508
config: x86_64-nfsroot (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from arch/x86/purgatory/purgatory.c:13:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
arch/x86/purgatory/purgatory.c: In function 'verify_sha256_digest':
>> arch/x86/purgatory/purgatory.c:48:32: warning: implicit declaration of function 'ARRAY_SIZE' [-Wimplicit-function-declaration]
end = purgatory_sha_regions + ARRAY_SIZE(purgatory_sha_regions);
^~~~~~~~~~
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
vim +/ARRAY_SIZE +48 arch/x86/purgatory/purgatory.c
8fc5b4d41 Vivek Goyal 2014-08-08 7 * Vivek Goyal <vgoyal@redhat.com>
8fc5b4d41 Vivek Goyal 2014-08-08 8 *
8fc5b4d41 Vivek Goyal 2014-08-08 9 * This source code is licensed under the GNU General Public License,
8fc5b4d41 Vivek Goyal 2014-08-08 10 * Version 2. See the file COPYING for more details.
8fc5b4d41 Vivek Goyal 2014-08-08 11 */
8fc5b4d41 Vivek Goyal 2014-08-08 12
40c50c1fe Thomas Gleixner 2017-03-10 @13 #include <linux/bug.h>
40c50c1fe Thomas Gleixner 2017-03-10 14 #include <asm/purgatory.h>
40c50c1fe Thomas Gleixner 2017-03-10 15
8fc5b4d41 Vivek Goyal 2014-08-08 16 #include "sha256.h"
8fc5b4d41 Vivek Goyal 2014-08-08 17 #include "../boot/string.h"
8fc5b4d41 Vivek Goyal 2014-08-08 18
40c50c1fe Thomas Gleixner 2017-03-10 19 unsigned long purgatory_backup_dest __section(.kexec-purgatory);
40c50c1fe Thomas Gleixner 2017-03-10 20 unsigned long purgatory_backup_src __section(.kexec-purgatory);
40c50c1fe Thomas Gleixner 2017-03-10 21 unsigned long purgatory_backup_sz __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 22
40c50c1fe Thomas Gleixner 2017-03-10 23 u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 24
40c50c1fe Thomas Gleixner 2017-03-10 25 struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(.kexec-purgatory);
8fc5b4d41 Vivek Goyal 2014-08-08 26
8fc5b4d41 Vivek Goyal 2014-08-08 27 /*
8fc5b4d41 Vivek Goyal 2014-08-08 28 * On x86, second kernel requries first 640K of memory to boot. Copy
8fc5b4d41 Vivek Goyal 2014-08-08 29 * first 640K to a backup region in reserved memory range so that second
8fc5b4d41 Vivek Goyal 2014-08-08 30 * kernel can use first 640K.
8fc5b4d41 Vivek Goyal 2014-08-08 31 */
8fc5b4d41 Vivek Goyal 2014-08-08 32 static int copy_backup_region(void)
8fc5b4d41 Vivek Goyal 2014-08-08 33 {
40c50c1fe Thomas Gleixner 2017-03-10 34 if (purgatory_backup_dest) {
40c50c1fe Thomas Gleixner 2017-03-10 35 memcpy((void *)purgatory_backup_dest,
40c50c1fe Thomas Gleixner 2017-03-10 36 (void *)purgatory_backup_src, purgatory_backup_sz);
40c50c1fe Thomas Gleixner 2017-03-10 37 }
8fc5b4d41 Vivek Goyal 2014-08-08 38 return 0;
8fc5b4d41 Vivek Goyal 2014-08-08 39 }
8fc5b4d41 Vivek Goyal 2014-08-08 40
72042a8c7 Tobin C. Harding 2017-02-20 41 static int verify_sha256_digest(void)
8fc5b4d41 Vivek Goyal 2014-08-08 42 {
40c50c1fe Thomas Gleixner 2017-03-10 43 struct kexec_sha_region *ptr, *end;
8fc5b4d41 Vivek Goyal 2014-08-08 44 u8 digest[SHA256_DIGEST_SIZE];
8fc5b4d41 Vivek Goyal 2014-08-08 45 struct sha256_state sctx;
8fc5b4d41 Vivek Goyal 2014-08-08 46
8fc5b4d41 Vivek Goyal 2014-08-08 47 sha256_init(&sctx);
40c50c1fe Thomas Gleixner 2017-03-10 @48 end = purgatory_sha_regions + ARRAY_SIZE(purgatory_sha_regions);
40c50c1fe Thomas Gleixner 2017-03-10 49
40c50c1fe Thomas Gleixner 2017-03-10 50 for (ptr = purgatory_sha_regions; ptr < end; ptr++)
8fc5b4d41 Vivek Goyal 2014-08-08 51 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len);
:::::: The code at line 48 was first introduced by commit
:::::: 40c50c1fecdf012a3bf055ec813f0ef2eda2749c kexec, x86/purgatory: Unbreak it and clean it up
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27398 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
2017-05-24 23:11 ` Ian Abbott
2017-05-24 23:26 ` kbuild test robot
@ 2017-05-24 23:53 ` kbuild test robot
2017-05-24 23:53 ` kbuild test robot
2 siblings, 1 reply; 15+ messages in thread
From: kbuild test robot @ 2017-05-24 23:53 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
[-- Attachment #1: Type: text/plain, Size: 11413 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-063508
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/jump_label.h:184,
from arch/x86/include/asm/string_64.h:5,
from arch/x86/include/asm/string.h:4,
from include/linux/string.h:18,
from include/uapi/linux/uuid.h:21,
from include/linux/uuid.h:19,
from include/linux/mod_devicetable.h:12,
from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
include/linux/jump_label.h: In function 'static_key_slow_inc':
>> include/asm-generic/bug.h:92:36: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bug.h:4:0,
from include/linux/jump_label.h:184,
from arch/x86/include/asm/string_64.h:5,
from arch/x86/include/asm/string.h:4,
from include/linux/string.h:18,
from include/uapi/linux/uuid.h:21,
from include/linux/uuid.h:19,
from include/linux/mod_devicetable.h:12,
from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^~~~~~
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:91:32: note: each undeclared identifier is reported only once for each function it appears in
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^~~~~~
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h: In function 'static_key_slow_dec':
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
vim +/printk +92 include/asm-generic/bug.h
^1da177e4 Linus Torvalds 2005-04-16 54
^1da177e4 Linus Torvalds 2005-04-16 55 #ifndef HAVE_ARCH_BUG_ON
2a41de48b Alexey Dobriyan 2007-07-17 56 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^1da177e4 Linus Torvalds 2005-04-16 57 #endif
^1da177e4 Linus Torvalds 2005-04-16 58
19d436268 Peter Zijlstra 2017-02-25 59 #ifdef __WARN_FLAGS
19d436268 Peter Zijlstra 2017-02-25 @60 #define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra 2017-02-25 @61 #define __WARN_ONCE_TAINT(taint) __WARN_FLAGS(BUGFLAG_ONCE|BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra 2017-02-25 62
19d436268 Peter Zijlstra 2017-02-25 63 #define WARN_ON_ONCE(condition) ({ \
19d436268 Peter Zijlstra 2017-02-25 64 int __ret_warn_on = !!(condition); \
19d436268 Peter Zijlstra 2017-02-25 65 if (unlikely(__ret_warn_on)) \
19d436268 Peter Zijlstra 2017-02-25 @66 __WARN_ONCE_TAINT(TAINT_WARN); \
19d436268 Peter Zijlstra 2017-02-25 67 unlikely(__ret_warn_on); \
19d436268 Peter Zijlstra 2017-02-25 68 })
19d436268 Peter Zijlstra 2017-02-25 69 #endif
19d436268 Peter Zijlstra 2017-02-25 70
af9379c71 David Brownell 2009-01-06 71 /*
af9379c71 David Brownell 2009-01-06 72 * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
af9379c71 David Brownell 2009-01-06 73 * significant issues that need prompt attention if they should ever
af9379c71 David Brownell 2009-01-06 74 * appear at runtime. Use the versions with printk format strings
af9379c71 David Brownell 2009-01-06 75 * to provide better diagnostics.
af9379c71 David Brownell 2009-01-06 76 */
b2be05273 Ben Hutchings 2010-04-03 77 #ifndef __WARN_TAINT
b9075fa96 Joe Perches 2011-10-31 78 extern __printf(3, 4)
b9075fa96 Joe Perches 2011-10-31 79 void warn_slowpath_fmt(const char *file, const int line,
b9075fa96 Joe Perches 2011-10-31 80 const char *fmt, ...);
b9075fa96 Joe Perches 2011-10-31 81 extern __printf(4, 5)
b9075fa96 Joe Perches 2011-10-31 82 void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
b9075fa96 Joe Perches 2011-10-31 83 const char *fmt, ...);
57adc4d2d Andi Kleen 2009-05-06 84 extern void warn_slowpath_null(const char *file, const int line);
79b4cc5ee Arjan van de Ven 2008-01-30 85 #define WANT_WARN_ON_SLOWPATH
57adc4d2d Andi Kleen 2009-05-06 86 #define __WARN() warn_slowpath_null(__FILE__, __LINE__)
57adc4d2d Andi Kleen 2009-05-06 87 #define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
b2be05273 Ben Hutchings 2010-04-03 88 #define __WARN_printf_taint(taint, arg...) \
b2be05273 Ben Hutchings 2010-04-03 89 warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg)
a8f18b909 Arjan van de Ven 2008-07-25 90 #else
b2be05273 Ben Hutchings 2010-04-03 @91 #define __WARN() __WARN_TAINT(TAINT_WARN)
f6f286f33 Arjan van de Ven 2008-10-20 @92 #define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
b2be05273 Ben Hutchings 2010-04-03 93 #define __WARN_printf_taint(taint, arg...) \
b2be05273 Ben Hutchings 2010-04-03 94 do { printk(arg); __WARN_TAINT(taint); } while (0)
3a6a62f96 Olof Johansson 2008-01-30 95 #endif
3a6a62f96 Olof Johansson 2008-01-30 96
2553b67a1 Josh Poimboeuf 2016-03-17 97 /* used internally by panic.c */
2553b67a1 Josh Poimboeuf 2016-03-17 98 struct warn_args;
2553b67a1 Josh Poimboeuf 2016-03-17 99
2553b67a1 Josh Poimboeuf 2016-03-17 100 void __warn(const char *file, int line, void *caller, unsigned taint,
2553b67a1 Josh Poimboeuf 2016-03-17 @101 struct pt_regs *regs, struct warn_args *args);
2553b67a1 Josh Poimboeuf 2016-03-17 102
3a6a62f96 Olof Johansson 2008-01-30 103 #ifndef WARN_ON
3a6a62f96 Olof Johansson 2008-01-30 104 #define WARN_ON(condition) ({ \
:::::: The code at line 92 was first introduced by commit
:::::: f6f286f33e843862c559bfea9281318c4cdec6b0 fix WARN() for PPC
:::::: TO: Arjan van de Ven <arjan@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29880 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] bug: fix problem including <linux/bug.h> from linux/kernel.h
2017-05-24 23:53 ` kbuild test robot
@ 2017-05-24 23:53 ` kbuild test robot
0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2017-05-24 23:53 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
[-- Attachment #1: Type: text/plain, Size: 11413 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-063508
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/jump_label.h:184,
from arch/x86/include/asm/string_64.h:5,
from arch/x86/include/asm/string.h:4,
from include/linux/string.h:18,
from include/uapi/linux/uuid.h:21,
from include/linux/uuid.h:19,
from include/linux/mod_devicetable.h:12,
from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
include/linux/jump_label.h: In function 'static_key_slow_inc':
>> include/asm-generic/bug.h:92:36: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bug.h:4:0,
from include/linux/jump_label.h:184,
from arch/x86/include/asm/string_64.h:5,
from arch/x86/include/asm/string.h:4,
from include/linux/string.h:18,
from include/uapi/linux/uuid.h:21,
from include/linux/uuid.h:19,
from include/linux/mod_devicetable.h:12,
from scripts/mod/devicetable-offsets.c:2:
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^~~~~~
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:91:32: note: each undeclared identifier is reported only once for each function it appears in
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
>> include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^~~~~~~~~~~~
>> include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^~~~~~
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^~~~~~~~~~~~~
>> include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^~~~
>> include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h: In function 'static_key_slow_dec':
>> include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^~~~~
>> include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~
>> include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
>> include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
vim +/printk +92 include/asm-generic/bug.h
^1da177e4 Linus Torvalds 2005-04-16 54
^1da177e4 Linus Torvalds 2005-04-16 55 #ifndef HAVE_ARCH_BUG_ON
2a41de48b Alexey Dobriyan 2007-07-17 56 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^1da177e4 Linus Torvalds 2005-04-16 57 #endif
^1da177e4 Linus Torvalds 2005-04-16 58
19d436268 Peter Zijlstra 2017-02-25 59 #ifdef __WARN_FLAGS
19d436268 Peter Zijlstra 2017-02-25 @60 #define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra 2017-02-25 @61 #define __WARN_ONCE_TAINT(taint) __WARN_FLAGS(BUGFLAG_ONCE|BUGFLAG_TAINT(taint))
19d436268 Peter Zijlstra 2017-02-25 62
19d436268 Peter Zijlstra 2017-02-25 63 #define WARN_ON_ONCE(condition) ({ \
19d436268 Peter Zijlstra 2017-02-25 64 int __ret_warn_on = !!(condition); \
19d436268 Peter Zijlstra 2017-02-25 65 if (unlikely(__ret_warn_on)) \
19d436268 Peter Zijlstra 2017-02-25 @66 __WARN_ONCE_TAINT(TAINT_WARN); \
19d436268 Peter Zijlstra 2017-02-25 67 unlikely(__ret_warn_on); \
19d436268 Peter Zijlstra 2017-02-25 68 })
19d436268 Peter Zijlstra 2017-02-25 69 #endif
19d436268 Peter Zijlstra 2017-02-25 70
af9379c71 David Brownell 2009-01-06 71 /*
af9379c71 David Brownell 2009-01-06 72 * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
af9379c71 David Brownell 2009-01-06 73 * significant issues that need prompt attention if they should ever
af9379c71 David Brownell 2009-01-06 74 * appear at runtime. Use the versions with printk format strings
af9379c71 David Brownell 2009-01-06 75 * to provide better diagnostics.
af9379c71 David Brownell 2009-01-06 76 */
b2be05273 Ben Hutchings 2010-04-03 77 #ifndef __WARN_TAINT
b9075fa96 Joe Perches 2011-10-31 78 extern __printf(3, 4)
b9075fa96 Joe Perches 2011-10-31 79 void warn_slowpath_fmt(const char *file, const int line,
b9075fa96 Joe Perches 2011-10-31 80 const char *fmt, ...);
b9075fa96 Joe Perches 2011-10-31 81 extern __printf(4, 5)
b9075fa96 Joe Perches 2011-10-31 82 void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
b9075fa96 Joe Perches 2011-10-31 83 const char *fmt, ...);
57adc4d2d Andi Kleen 2009-05-06 84 extern void warn_slowpath_null(const char *file, const int line);
79b4cc5ee Arjan van de Ven 2008-01-30 85 #define WANT_WARN_ON_SLOWPATH
57adc4d2d Andi Kleen 2009-05-06 86 #define __WARN() warn_slowpath_null(__FILE__, __LINE__)
57adc4d2d Andi Kleen 2009-05-06 87 #define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
b2be05273 Ben Hutchings 2010-04-03 88 #define __WARN_printf_taint(taint, arg...) \
b2be05273 Ben Hutchings 2010-04-03 89 warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg)
a8f18b909 Arjan van de Ven 2008-07-25 90 #else
b2be05273 Ben Hutchings 2010-04-03 @91 #define __WARN() __WARN_TAINT(TAINT_WARN)
f6f286f33 Arjan van de Ven 2008-10-20 @92 #define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
b2be05273 Ben Hutchings 2010-04-03 93 #define __WARN_printf_taint(taint, arg...) \
b2be05273 Ben Hutchings 2010-04-03 94 do { printk(arg); __WARN_TAINT(taint); } while (0)
3a6a62f96 Olof Johansson 2008-01-30 95 #endif
3a6a62f96 Olof Johansson 2008-01-30 96
2553b67a1 Josh Poimboeuf 2016-03-17 97 /* used internally by panic.c */
2553b67a1 Josh Poimboeuf 2016-03-17 98 struct warn_args;
2553b67a1 Josh Poimboeuf 2016-03-17 99
2553b67a1 Josh Poimboeuf 2016-03-17 100 void __warn(const char *file, int line, void *caller, unsigned taint,
2553b67a1 Josh Poimboeuf 2016-03-17 @101 struct pt_regs *regs, struct warn_args *args);
2553b67a1 Josh Poimboeuf 2016-03-17 102
3a6a62f96 Olof Johansson 2008-01-30 103 #ifndef WARN_ON
3a6a62f96 Olof Johansson 2008-01-30 104 #define WARN_ON(condition) ({ \
:::::: The code at line 92 was first introduced by commit
:::::: f6f286f33e843862c559bfea9281318c4cdec6b0 fix WARN() for PPC
:::::: TO: Arjan van de Ven <arjan@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29880 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
` (2 preceding siblings ...)
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
@ 2017-05-25 2:25 ` kbuild test robot
2017-05-25 2:25 ` kbuild test robot
2017-05-25 2:47 ` kbuild test robot
4 siblings, 1 reply; 15+ messages in thread
From: kbuild test robot @ 2017-05-25 2:25 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
[-- Attachment #1: Type: text/plain, Size: 8414 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-081427
config: i386-randconfig-c0-05250844 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/jump_label.h:184,
from arch/x86//kernel/jump_label.c:7:
include/asm-generic/bug.h:101:35: warning: 'struct pt_regs' declared inside parameter list
struct pt_regs *regs, struct warn_args *args);
^
include/asm-generic/bug.h:101:35: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/jump_label.h:79,
from arch/x86//kernel/jump_label.c:7:
include/linux/jump_label.h: In function 'static_key_slow_inc':
>> include/linux/compiler.h:127:18: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
static struct ftrace_likely_data \
^
include/linux/compiler.h:150:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/asm-generic/bug.h:115:6: note: in expansion of macro 'unlikely'
if (unlikely(__ret_warn_on)) \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
In file included from include/linux/bug.h:4:0,
from include/linux/jump_label.h:184,
from arch/x86//kernel/jump_label.c:7:
include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/asm-generic/bug.h:91:32: note: each undeclared identifier is reported only once for each function it appears in
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/linux/jump_label.h: In function 'static_key_slow_dec':
include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:218:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/linux/jump_label.h: In function 'static_key_enable':
vim +/printk +127 include/linux/compiler.h
1f0d69a9 Steven Rostedt 2008-11-12 121
1f0d69a9 Steven Rostedt 2008-11-12 122 #define likely_notrace(x) __builtin_expect(!!(x), 1)
1f0d69a9 Steven Rostedt 2008-11-12 123 #define unlikely_notrace(x) __builtin_expect(!!(x), 0)
1f0d69a9 Steven Rostedt 2008-11-12 124
d45ae1f7 Steven Rostedt (VMware 2017-01-17 125) #define __branch_check__(x, expect, is_constant) ({ \
1f0d69a9 Steven Rostedt 2008-11-12 126 int ______r; \
134e6a03 Steven Rostedt (VMware 2017-01-19 @127) static struct ftrace_likely_data \
1f0d69a9 Steven Rostedt 2008-11-12 128 __attribute__((__aligned__(4))) \
45b79749 Steven Rostedt 2008-11-21 129 __attribute__((section("_ftrace_annotated_branch"))) \
1f0d69a9 Steven Rostedt 2008-11-12 130 ______f = { \
:::::: The code at line 127 was first introduced by commit
:::::: 134e6a034cb004ed5acd3048792de70ced1c6cf5 tracing: Show number of constants profiled in likely profiler
:::::: TO: Steven Rostedt (VMware) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-25 2:25 ` [PATCH 1/1] bug: fix problem including <linux.bug.h> " kbuild test robot
@ 2017-05-25 2:25 ` kbuild test robot
0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2017-05-25 2:25 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
[-- Attachment #1: Type: text/plain, Size: 8414 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-081427
config: i386-randconfig-c0-05250844 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:81:0,
from include/linux/bug.h:4,
from include/linux/jump_label.h:184,
from arch/x86//kernel/jump_label.c:7:
include/asm-generic/bug.h:101:35: warning: 'struct pt_regs' declared inside parameter list
struct pt_regs *regs, struct warn_args *args);
^
include/asm-generic/bug.h:101:35: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/jump_label.h:79,
from arch/x86//kernel/jump_label.c:7:
include/linux/jump_label.h: In function 'static_key_slow_inc':
>> include/linux/compiler.h:127:18: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
static struct ftrace_likely_data \
^
include/linux/compiler.h:150:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/asm-generic/bug.h:115:6: note: in expansion of macro 'unlikely'
if (unlikely(__ret_warn_on)) \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
In file included from include/linux/bug.h:4:0,
from include/linux/jump_label.h:184,
from arch/x86//kernel/jump_label.c:7:
include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/asm-generic/bug.h:91:32: note: each undeclared identifier is reported only once for each function it appears in
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:212:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/linux/jump_label.h: In function 'static_key_slow_dec':
include/asm-generic/bug.h:91:32: error: 'TAINT_WARN' undeclared (first use in this function)
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
arch/x86/include/asm/bug.h:46:10: note: in definition of macro '_BUG_FLAGS'
"i" (flags), \
^
include/asm-generic/bug.h:60:30: note: in expansion of macro '__WARN_FLAGS'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:60:43: note: in expansion of macro 'BUGFLAG_TAINT'
#define __WARN_TAINT(taint) __WARN_FLAGS(BUGFLAG_TAINT(taint))
^
include/asm-generic/bug.h:91:19: note: in expansion of macro '__WARN_TAINT'
#define __WARN() __WARN_TAINT(TAINT_WARN)
^
include/asm-generic/bug.h:92:49: note: in expansion of macro '__WARN'
#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
^
include/asm-generic/bug.h:116:3: note: in expansion of macro '__WARN_printf'
__WARN_printf(format); \
^
include/linux/jump_label.h:84:32: note: in expansion of macro 'WARN'
#define STATIC_KEY_CHECK_USE() WARN(!static_key_initialized, \
^
include/linux/jump_label.h:218:2: note: in expansion of macro 'STATIC_KEY_CHECK_USE'
STATIC_KEY_CHECK_USE();
^
include/linux/jump_label.h: In function 'static_key_enable':
vim +/printk +127 include/linux/compiler.h
1f0d69a9 Steven Rostedt 2008-11-12 121
1f0d69a9 Steven Rostedt 2008-11-12 122 #define likely_notrace(x) __builtin_expect(!!(x), 1)
1f0d69a9 Steven Rostedt 2008-11-12 123 #define unlikely_notrace(x) __builtin_expect(!!(x), 0)
1f0d69a9 Steven Rostedt 2008-11-12 124
d45ae1f7 Steven Rostedt (VMware 2017-01-17 125) #define __branch_check__(x, expect, is_constant) ({ \
1f0d69a9 Steven Rostedt 2008-11-12 126 int ______r; \
134e6a03 Steven Rostedt (VMware 2017-01-19 @127) static struct ftrace_likely_data \
1f0d69a9 Steven Rostedt 2008-11-12 128 __attribute__((__aligned__(4))) \
45b79749 Steven Rostedt 2008-11-21 129 __attribute__((section("_ftrace_annotated_branch"))) \
1f0d69a9 Steven Rostedt 2008-11-12 130 ______f = { \
:::::: The code at line 127 was first introduced by commit
:::::: 134e6a034cb004ed5acd3048792de70ced1c6cf5 tracing: Show number of constants profiled in likely profiler
:::::: TO: Steven Rostedt (VMware) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
` (3 preceding siblings ...)
2017-05-25 2:25 ` [PATCH 1/1] bug: fix problem including <linux.bug.h> " kbuild test robot
@ 2017-05-25 2:47 ` kbuild test robot
2017-05-25 2:47 ` kbuild test robot
4 siblings, 1 reply; 15+ messages in thread
From: kbuild test robot @ 2017-05-25 2:47 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko, Ian Abbott
[-- Attachment #1: Type: text/plain, Size: 6499 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-081427
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from arch/powerpc/include/asm/mmu.h:125,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h: In function 'mmu_has_feature':
>> arch/powerpc/include/asm/mmu.h:174:3: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
printk("Warning! mmu_has_feature() used prior to jump label init!\n");
^~~~~~
>> arch/powerpc/include/asm/mmu.h:175:3: error: implicit declaration of function 'dump_stack' [-Werror=implicit-function-declaration]
dump_stack();
^~~~~~~~~~
In file included from include/linux/kernel.h:13:0,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:16,
from arch/powerpc/include/asm/book3s/64/mmu.h:29,
from arch/powerpc/include/asm/mmu.h:304,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
include/linux/printk.h: At top level:
include/linux/printk.h:172:5: error: conflicting types for 'printk'
int printk(const char *fmt, ...);
^~~~~~
include/linux/printk.h:172:1: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
int printk(const char *fmt, ...);
^~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h:174:3: note: previous implicit declaration of 'printk' was here
printk("Warning! mmu_has_feature() used prior to jump label init!\n");
^~~~~~
In file included from include/linux/kernel.h:13:0,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:16,
from arch/powerpc/include/asm/book3s/64/mmu.h:29,
from arch/powerpc/include/asm/mmu.h:304,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
>> include/linux/printk.h:282:24: warning: conflicting types for 'dump_stack'
extern asmlinkage void dump_stack(void) __cold;
^~~~~~~~~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h:175:3: note: previous implicit declaration of 'dump_stack' was here
dump_stack();
^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/printk +174 arch/powerpc/include/asm/mmu.h
b5fa0f7f8 Michael Ellerman 2017-01-24 168 #ifndef __clang__ /* clang can't cope with this */
c12e6f24d Kevin Hao 2016-07-23 169 BUILD_BUG_ON(!__builtin_constant_p(feature));
b5fa0f7f8 Michael Ellerman 2017-01-24 170 #endif
c12e6f24d Kevin Hao 2016-07-23 171
c812c7d8f Aneesh Kumar K.V 2016-07-23 172 #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
c812c7d8f Aneesh Kumar K.V 2016-07-23 173 if (!static_key_initialized) {
c812c7d8f Aneesh Kumar K.V 2016-07-23 @174 printk("Warning! mmu_has_feature() used prior to jump label init!\n");
c812c7d8f Aneesh Kumar K.V 2016-07-23 @175 dump_stack();
c812c7d8f Aneesh Kumar K.V 2016-07-23 176 return early_mmu_has_feature(feature);
c812c7d8f Aneesh Kumar K.V 2016-07-23 177 }
c812c7d8f Aneesh Kumar K.V 2016-07-23 178 #endif
:::::: The code at line 174 was first introduced by commit
:::::: c812c7d8f1470ac9c8aa6d7e29b56e5845ee05fc powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init
:::::: TO: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53757 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] bug: fix problem including <linux.bug.h> from linux/kernel.h
2017-05-25 2:47 ` kbuild test robot
@ 2017-05-25 2:47 ` kbuild test robot
0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2017-05-25 2:47 UTC (permalink / raw)
To: Ian Abbott
Cc: kbuild-all, linux-kernel, linux-arch, Arnd Bergmann,
Andrew Morton, Michal Nazarewicz, Hidehiro Kawai, Borislav Petkov,
Rasmus Villemoes, Johannes Berg, Peter Zijlstra,
Alexander Potapenko
[-- Attachment #1: Type: text/plain, Size: 6499 bytes --]
Hi Ian,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug-h-from-linux-kernel-h/20170525-081427
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from arch/powerpc/include/asm/mmu.h:125,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
include/asm-generic/bug.h:101:13: warning: 'struct pt_regs' declared inside parameter list will not be visible outside of this definition or declaration
struct pt_regs *regs, struct warn_args *args);
^~~~~~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h: In function 'mmu_has_feature':
>> arch/powerpc/include/asm/mmu.h:174:3: error: implicit declaration of function 'printk' [-Werror=implicit-function-declaration]
printk("Warning! mmu_has_feature() used prior to jump label init!\n");
^~~~~~
>> arch/powerpc/include/asm/mmu.h:175:3: error: implicit declaration of function 'dump_stack' [-Werror=implicit-function-declaration]
dump_stack();
^~~~~~~~~~
In file included from include/linux/kernel.h:13:0,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:16,
from arch/powerpc/include/asm/book3s/64/mmu.h:29,
from arch/powerpc/include/asm/mmu.h:304,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
include/linux/printk.h: At top level:
include/linux/printk.h:172:5: error: conflicting types for 'printk'
int printk(const char *fmt, ...);
^~~~~~
include/linux/printk.h:172:1: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
int printk(const char *fmt, ...);
^~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h:174:3: note: previous implicit declaration of 'printk' was here
printk("Warning! mmu_has_feature() used prior to jump label init!\n");
^~~~~~
In file included from include/linux/kernel.h:13:0,
from arch/powerpc/include/asm/page.h:15,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:16,
from arch/powerpc/include/asm/book3s/64/mmu.h:29,
from arch/powerpc/include/asm/mmu.h:304,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
>> include/linux/printk.h:282:24: warning: conflicting types for 'dump_stack'
extern asmlinkage void dump_stack(void) __cold;
^~~~~~~~~~
In file included from arch/powerpc/include/asm/lppaca.h:36:0,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
arch/powerpc/include/asm/mmu.h:175:3: note: previous implicit declaration of 'dump_stack' was here
dump_stack();
^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/printk +174 arch/powerpc/include/asm/mmu.h
b5fa0f7f8 Michael Ellerman 2017-01-24 168 #ifndef __clang__ /* clang can't cope with this */
c12e6f24d Kevin Hao 2016-07-23 169 BUILD_BUG_ON(!__builtin_constant_p(feature));
b5fa0f7f8 Michael Ellerman 2017-01-24 170 #endif
c12e6f24d Kevin Hao 2016-07-23 171
c812c7d8f Aneesh Kumar K.V 2016-07-23 172 #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
c812c7d8f Aneesh Kumar K.V 2016-07-23 173 if (!static_key_initialized) {
c812c7d8f Aneesh Kumar K.V 2016-07-23 @174 printk("Warning! mmu_has_feature() used prior to jump label init!\n");
c812c7d8f Aneesh Kumar K.V 2016-07-23 @175 dump_stack();
c812c7d8f Aneesh Kumar K.V 2016-07-23 176 return early_mmu_has_feature(feature);
c812c7d8f Aneesh Kumar K.V 2016-07-23 177 }
c812c7d8f Aneesh Kumar K.V 2016-07-23 178 #endif
:::::: The code at line 174 was first introduced by commit
:::::: c812c7d8f1470ac9c8aa6d7e29b56e5845ee05fc powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init
:::::: TO: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53757 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-05-25 2:47 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 13:21 [PATCH 0/1] bug: fix problem including <linux.bug.h> from linux/kernel.h Ian Abbott
2017-05-24 13:21 ` [PATCH 1/1] " Ian Abbott
2017-05-24 13:21 ` Ian Abbott
2017-05-24 13:37 ` Rasmus Villemoes
2017-05-24 15:55 ` Ian Abbott
2017-05-24 16:06 ` [PATCH v2] bug: fix problem including <linux/bug.h> " Ian Abbott
2017-05-24 23:11 ` Ian Abbott
2017-05-24 23:26 ` kbuild test robot
2017-05-24 23:26 ` kbuild test robot
2017-05-24 23:53 ` kbuild test robot
2017-05-24 23:53 ` kbuild test robot
2017-05-25 2:25 ` [PATCH 1/1] bug: fix problem including <linux.bug.h> " kbuild test robot
2017-05-25 2:25 ` kbuild test robot
2017-05-25 2:47 ` kbuild test robot
2017-05-25 2:47 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).