Skip to contentSkip to conversation

linux-next: build failure after merge of the akpm-current tree

PATCH New Stephen Rothwell 2 participants 4 messages Jun 29, 2018 – Jul 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc allyesconfig) failed like this:

In file included from include/linux/kernel.h:10:0,

                 from include/linux/list.h:9,
                 from include/linux/preempt.h:11,
                 from include/linux/spinlock.h:51,
                 from include/linux/seqlock.h:36,
                 from include/linux/time.h:6,
                 from fs/proc/inode.c:9:
fs/proc/inode.c: In function 'proc_init_kmemcache':
include/linux/compiler.h:339:38: error: call to '__compiletime_assert_110' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct proc_dir_entry) >= SIZEOF_PDE
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
include/linux/compiler.h:319:4: note: in definition of macro '__compiletime_assert'
    prefix ## suffix();    \
    ^~~~~~

include/linux/compiler.h:339:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'

 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~

include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^~~~~~~~~~~~~~~~
fs/proc/inode.c:110:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct proc_dir_entry) >= SIZEOF_PDE); ^~~~~~~~~~~~

Caused by commit

527ae8759f10 ("proc: fixup PDE allocation bloat")

I have reverted that commit for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 9 lines · Stephen Rothwell

fs/proc/inode.c:110:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct proc_dir_entry) >= SIZEOF_PDE); ^~~~~~~~~~~~

Caused by commit

527ae8759f10 ("proc: fixup PDE allocation bloat")

I have reverted that commit for today.

Can't reproduce it with commit 7aa4b0a46be8badd053c958481f0e89e634ae4df (the one before revert) both on 32-bit and 64-bit.

Can you post fs/proc/inode.i ?

#2 lore raw

Hi Alexey,

Quoted 8 lines · On Sat, 30 Jun 2018 00:25:22 +0300 Alexey Dobriyan <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell

fs/proc/inode.c:110:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct proc_dir_entry) >= SIZEOF_PDE); ^~~~~~~~~~~~

Caused by commit

Quoted 8 lines
Quoted 3 lines

527ae8759f10 ("proc: fixup PDE allocation bloat")

I have reverted that commit for today.

Can't reproduce it with commit 7aa4b0a46be8badd053c958481f0e89e634ae4df (the one before revert) both on 32-bit and 64-bit.

Can you post fs/proc/inode.i ?

Attached (xz compresesed).

This is built with gcc 7.3.1 (built from source) hosted on PowerPC LE and targeted at PowerPC BE (a powerpc allyesconfig build). I did not have any trouble with any of my other PowerPC targeted builds.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw

PATCH 1/1 proc: fix BUILD_BUG_ON breakage on powerpc64

Quoted 18 lines · Stephen Rothwell

Hi Alexey,

Quoted 15 lines · On Sat, 30 Jun 2018 00:25:22 +0300 Alexey Dobriyan <[email protected]> wrote:
Quoted 9 lines · Stephen Rothwell

fs/proc/inode.c:110:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(struct proc_dir_entry) >= SIZEOF_PDE); ^~~~~~~~~~~~

Caused by commit

527ae8759f10 ("proc: fixup PDE allocation bloat")

I have reverted that commit for today.

Can't reproduce it with commit 7aa4b0a46be8badd053c958481f0e89e634ae4df (the one before revert) both on 32-bit and 64-bit.

Quoted 7 lines
Quoted 1 line

Can you post fs/proc/inode.i ?

Attached (xz compresesed).

This is built with gcc 7.3.1 (built from source) hosted on PowerPC LE and targeted at PowerPC BE (a powerpc allyesconfig build). I did not have any trouble with any of my other PowerPC targeted builds.

I'm not sure what's going on. Taking preprocessed file and compiling it with ppc64 cross compiler gives sizeof(struct proc_dir_entry) = 232.

Anyway here is obvious fixlet:

[PATCH -mm] proc: fix BUILD_BUG_ON breakage on powerpc64-allyesconfig

---

 fs/proc/internal.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
fs/proc/internal.h +6 -6
@@ -65,12 +65,12 @@ struct proc_dir_entry {
 	char inline_name[];
 } __randomize_layout;
 
-#ifdef CONFIG_64BIT
-#define SIZEOF_PDE	(sizeof(spinlock_t) <= 4 ? 192 : 256)
-#else
-#define SIZEOF_PDE	(sizeof(spinlock_t) <= 4 ? 128 : 192)
-#endif
-
+#define SIZEOF_PDE	(				\
+	sizeof(struct proc_dir_entry) < 128 ? 128 :	\
+	sizeof(struct proc_dir_entry) < 192 ? 192 :	\
+	sizeof(struct proc_dir_entry) < 256 ? 256 :	\
+	sizeof(struct proc_dir_entry) < 512 ? 512 :	\
+	0)
 #define SIZEOF_PDE_INLINE_NAME (SIZEOF_PDE - sizeof(struct proc_dir_entry))
 
 extern struct kmem_cache *proc_dir_entry_cache;