Skip to contentSkip to conversation

include/linux/compiler_types.h:699:45: error: call to '__compiletime_assert_784' declared with attribute error: BUILD_BUG_ON failed: sizeof_field(struct mptcp_ext, flags) != sizeof(u16)

PATCH kernel test robot 3 participants 5 messages May 31 – Jun 25 Networking MPTCP

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://github.com/multipath-tcp/mptcp_net-next.git export-net
head:   27a7d32aeb103a5c763966a494b141136c31cea0
commit: 206cf8c6e2bfce69eba0d463b3f6127d14f75abc [15/22] mptcp: fix uninit-value in mptcp_established_options
config: arm-collie_defconfig (https://download.01.org/0day-ci/archive/20260531/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260531/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from <command-line>:
In function 'mptcp_established_options_dss',
inlined from 'mptcp_established_options' at net/mptcp/options.c:881:11:

>> include/linux/compiler_types.h:699:45: error: call to '__compiletime_assert_784' declared with attribute error: BUILD_BUG_ON failed: sizeof_field(struct mptcp_ext, flags) != sizeof(u16)
     699 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:680:25: note: in definition of macro '__compiletime_assert'
     680 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
     699 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
      40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:51:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      51 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   net/mptcp/options.c:576:9: note: in expansion of macro 'BUILD_BUG_ON'
     576 |         BUILD_BUG_ON(sizeof_field(struct mptcp_ext, flags) != sizeof(u16));
         |         ^~~~~~~~~~~~

vim +/__compiletime_assert_784 +699 include/linux/compiler_types.h

eb5c2d4b45e3d2 Will Deacon 2020-07-21  685  
eb5c2d4b45e3d2 Will Deacon 2020-07-21  686  #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21  687  	__compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  688  
eb5c2d4b45e3d2 Will Deacon 2020-07-21  689  /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21  690   * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21  691   * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21  692   * @msg:       a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21  693   *
eb5c2d4b45e3d2 Will Deacon 2020-07-21  694   * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21  695   * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21  696   * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21  697   */
eb5c2d4b45e3d2 Will Deacon 2020-07-21  698  #define compiletime_assert(condition, msg) \

eb5c2d4b45e3d2 Will Deacon 2020-07-21 @699 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 700

:::::: The code at line 699 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h

:::::: TO: Will Deacon <[email protected]>
:::::: CC: Will Deacon <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

maintainer
#1 lore raw

Hi LKP team,

Quoted 7 lines · kernel test robot
tree:   https://github.com/multipath-tcp/mptcp_net-next.git export-net
head:   27a7d32aeb103a5c763966a494b141136c31cea0
commit: 206cf8c6e2bfce69eba0d463b3f6127d14f75abc [15/22] mptcp: fix uninit-value in mptcp_established_options
config: arm-collie_defconfig (https://download.01.org/0day-ci/archive/20260531/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260531/[email protected]/reproduce)
Quoted 6 lines

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Thank you for the report.

(...)

Quoted 3 lines
   net/mptcp/options.c:576:9: note: in expansion of macro 'BUILD_BUG_ON'
     576 |         BUILD_BUG_ON(sizeof_field(struct mptcp_ext, flags) != sizeof(u16));
         |         ^~~~~~~~~~~~

Mmh, I wonder what size this struct group has on ARM 32bit. I tried to reproduce the issue with the config file and the instructions, but I didn't manage to. So I don't know what size was detected there.

  $ COMPILER_INSTALL_PATH=${HOME}/0day COMPILER=gcc-15.2.0 \
    ~/lkp/kbuild/make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/mptcp/
  Compiler will be installed in ${HOME}/0day
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  make --keep-going CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y CROSS_COMPILE=${HOME}/0day/gcc-15.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi- --jobs=32 KCFLAGS= -Wno-error=return-type -Wreturn-type -funsigned-char -Wundef -falign-functions=64 W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/mptcp/
  (...)
    CC      net/mptcp/options.o
  (...)

Any idea why I cannot reproduce the issue?

It would be good to know the output of sizeof_field().

@Paolo: or should we use memset()?

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
maintainer
#2 lore raw

Hello,

Quoted 38 lines · Matthieu Baerts

Hi LKP team,

Quoted 7 lines · kernel test robot
tree:   https://github.com/multipath-tcp/mptcp_net-next.git export-net
head:   27a7d32aeb103a5c763966a494b141136c31cea0
commit: 206cf8c6e2bfce69eba0d463b3f6127d14f75abc [15/22] mptcp: fix uninit-value in mptcp_established_options
config: arm-collie_defconfig (https://download.01.org/0day-ci/archive/20260531/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260531/[email protected]/reproduce)
Quoted 6 lines

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Thank you for the report.

(...)

Quoted 3 lines
   net/mptcp/options.c:576:9: note: in expansion of macro 'BUILD_BUG_ON'
     576 |         BUILD_BUG_ON(sizeof_field(struct mptcp_ext, flags) != sizeof(u16));
         |         ^~~~~~~~~~~~

Mmh, I wonder what size this struct group has on ARM 32bit. I tried to reproduce the issue with the config file and the instructions, but I didn't manage to. So I don't know what size was detected there.

  $ COMPILER_INSTALL_PATH=${HOME}/0day COMPILER=gcc-15.2.0 \
    ~/lkp/kbuild/make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/mptcp/
  Compiler will be installed in ${HOME}/0day
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  make --keep-going CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y CROSS_COMPILE=${HOME}/0day/gcc-15.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi- --jobs=32 KCFLAGS= -Wno-error=return-type -Wreturn-type -funsigned-char -Wundef -falign-functions=64 W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/mptcp/
  (...)
    CC      net/mptcp/options.o
  (...)
Quoted 1 line

Any idea why I cannot reproduce the issue?

Earlier, I started a full build with LKP with all patches from the export-net tree, and it didn't find any issues:

Quoted 286 lines

elapsed time: 730m

configs tested: 285
configs skipped: 6

The following configs have been built successfully. More configs may be tested in the coming days.

tested configs:

alpha                             allnoconfig    gcc-15.2.0
alpha                            allyesconfig    gcc-15.2.0
alpha                               defconfig    gcc-15.2.0
arc                              allmodconfig    clang-16
arc                              allmodconfig    gcc-15.2.0
arc                               allnoconfig    gcc-15.2.0
arc                              allyesconfig    clang-23
arc                              allyesconfig    gcc-15.2.0
arc                      axs103_smp_defconfig    gcc-15.2.0
arc                                 defconfig    gcc-15.2.0
arc                   randconfig-001-20260601    clang-23
arc                   randconfig-001-20260601    gcc-8.5.0
arc                   randconfig-002-20260601    clang-23
arc                   randconfig-002-20260601    gcc-14.3.0
arc                    vdk_hs38_smp_defconfig    gcc-15.2.0
arm                               allnoconfig    clang-23
arm                               allnoconfig    gcc-15.2.0
arm                              allyesconfig    clang-16
arm                              allyesconfig    gcc-15.2.0
arm                                 defconfig    clang-23
arm                                 defconfig    gcc-15.2.0
arm                   randconfig-001-20260601    clang-23
arm                   randconfig-001-20260601    gcc-15.2.0
arm                   randconfig-002-20260601    clang-23
arm                   randconfig-002-20260601    gcc-11.5.0
arm                   randconfig-003-20260601    clang-23
arm                   randconfig-004-20260601    clang-23
arm                   randconfig-004-20260601    gcc-8.5.0
arm64                            allmodconfig    clang-19
arm64                            allmodconfig    clang-23
arm64                             allnoconfig    gcc-15.2.0
arm64                               defconfig    gcc-15.2.0
arm64                          randconfig-001    clang-23
arm64                 randconfig-001-20260601    clang-23
arm64                 randconfig-001-20260601    gcc-14.3.0
arm64                 randconfig-001-20260601    gcc-8.5.0
arm64                          randconfig-002    clang-23
arm64                 randconfig-002-20260601    clang-23
arm64                 randconfig-002-20260601    gcc-8.5.0
arm64                          randconfig-003    clang-23
arm64                 randconfig-003-20260601    clang-23
arm64                 randconfig-003-20260601    gcc-15.2.0
arm64                 randconfig-003-20260601    gcc-8.5.0
arm64                          randconfig-004    clang-23
arm64                 randconfig-004-20260601    clang-23
arm64                 randconfig-004-20260601    gcc-14.3.0
arm64                 randconfig-004-20260601    gcc-8.5.0
csky                             allmodconfig    gcc-15.2.0
csky                              allnoconfig    gcc-15.2.0
csky                                defconfig    gcc-15.2.0
csky                           randconfig-001    clang-23
csky                  randconfig-001-20260601    clang-23
csky                  randconfig-001-20260601    gcc-14.3.0
csky                  randconfig-001-20260601    gcc-8.5.0
csky                           randconfig-002    clang-23
csky                  randconfig-002-20260601    clang-23
csky                  randconfig-002-20260601    gcc-16.1.0
csky                  randconfig-002-20260601    gcc-8.5.0
hexagon                          allmodconfig    clang-17
hexagon                           allnoconfig    clang-23
hexagon                           allnoconfig    gcc-15.2.0
hexagon                             defconfig    clang-23
hexagon                             defconfig    gcc-15.2.0
hexagon               randconfig-001-20260601    clang-18
hexagon               randconfig-001-20260601    gcc-8.5.0
hexagon               randconfig-002-20260601    clang-23
hexagon               randconfig-002-20260601    gcc-8.5.0
i386                             allmodconfig    clang-20
i386                             allmodconfig    gcc-14
i386                              allnoconfig    gcc-14
i386                              allnoconfig    gcc-15.2.0
i386                             allyesconfig    clang-20
i386                             allyesconfig    gcc-14
i386                 buildonly-randconfig-001    gcc-12
i386        buildonly-randconfig-001-20260601    gcc-12
i386        buildonly-randconfig-001-20260601    gcc-14
i386                 buildonly-randconfig-002    gcc-12
i386        buildonly-randconfig-002-20260601    clang-20
i386        buildonly-randconfig-002-20260601    gcc-12
i386                 buildonly-randconfig-003    gcc-12
i386        buildonly-randconfig-003-20260601    gcc-12
i386        buildonly-randconfig-003-20260601    gcc-14
i386                 buildonly-randconfig-004    gcc-12
i386        buildonly-randconfig-004-20260601    clang-20
i386        buildonly-randconfig-004-20260601    gcc-12
i386                 buildonly-randconfig-005    gcc-12
i386        buildonly-randconfig-005-20260601    gcc-12
i386        buildonly-randconfig-005-20260601    gcc-14
i386                 buildonly-randconfig-006    gcc-12
i386        buildonly-randconfig-006-20260601    gcc-12
i386                                defconfig    clang-20
i386                                defconfig    gcc-15.2.0
i386                  randconfig-001-20260601    gcc-14
i386                  randconfig-002-20260601    gcc-14
i386                  randconfig-003-20260601    gcc-14
i386                  randconfig-004-20260601    gcc-14
i386                  randconfig-005-20260601    gcc-14
i386                  randconfig-006-20260601    gcc-14
i386                  randconfig-007-20260601    gcc-14
i386                  randconfig-012-20260601    clang-20
loongarch                        allmodconfig    clang-19
loongarch                        allmodconfig    clang-23
loongarch                         allnoconfig    clang-23
loongarch                         allnoconfig    gcc-15.2.0
loongarch                           defconfig    clang-19
loongarch             randconfig-001-20260601    clang-23
loongarch             randconfig-001-20260601    gcc-8.5.0
loongarch             randconfig-002-20260601    clang-18
loongarch             randconfig-002-20260601    gcc-8.5.0
m68k                             allmodconfig    gcc-15.2.0
m68k                              allnoconfig    gcc-15.2.0
m68k                             allyesconfig    clang-16
m68k                             allyesconfig    gcc-15.2.0
m68k                                defconfig    clang-19
microblaze                        allnoconfig    gcc-15.2.0
microblaze                       allyesconfig    gcc-15.2.0
microblaze                          defconfig    clang-19
mips                             allmodconfig    gcc-15.2.0
mips                              allnoconfig    gcc-15.2.0
mips                             allyesconfig    gcc-15.2.0
mips                      malta_kvm_defconfig    gcc-15.2.0
nios2                            allmodconfig    clang-23
nios2                            allmodconfig    gcc-11.5.0
nios2                             allnoconfig    clang-23
nios2                             allnoconfig    gcc-11.5.0
nios2                               defconfig    clang-19
nios2                 randconfig-001-20260601    gcc-8.5.0
nios2                 randconfig-002-20260601    gcc-8.5.0
openrisc                         allmodconfig    clang-23
openrisc                         allmodconfig    gcc-15.2.0
openrisc                          allnoconfig    clang-23
openrisc                          allnoconfig    gcc-15.2.0
openrisc                            defconfig    gcc-15.2.0
parisc                           allmodconfig    gcc-15.2.0
parisc                            allnoconfig    clang-23
parisc                            allnoconfig    gcc-15.2.0
parisc                           allyesconfig    clang-19
parisc                           allyesconfig    gcc-15.2.0
parisc                              defconfig    gcc-15.2.0
parisc                         randconfig-001    gcc-10.5.0
parisc                         randconfig-001    gcc-13.4.0
parisc                randconfig-001-20260601    gcc-10.5.0
parisc                         randconfig-002    gcc-10.5.0
parisc                         randconfig-002    gcc-8.5.0
parisc                randconfig-002-20260601    gcc-10.5.0
parisc                randconfig-002-20260601    gcc-8.5.0
parisc64                         alldefconfig    gcc-15.2.0
parisc64                            defconfig    clang-19
powerpc                          allmodconfig    gcc-15.2.0
powerpc                           allnoconfig    clang-23
powerpc                           allnoconfig    gcc-15.2.0
powerpc                        randconfig-001    gcc-10.5.0
powerpc                        randconfig-001    gcc-13.4.0
powerpc               randconfig-001-20260601    gcc-10.5.0
powerpc               randconfig-001-20260601    gcc-14.3.0
powerpc                        randconfig-002    gcc-10.5.0
powerpc               randconfig-002-20260601    clang-23
powerpc               randconfig-002-20260601    gcc-10.5.0
powerpc64                      randconfig-001    clang-17
powerpc64                      randconfig-001    gcc-10.5.0
powerpc64             randconfig-001-20260601    gcc-10.5.0
powerpc64             randconfig-001-20260601    gcc-12.5.0
powerpc64                      randconfig-002    clang-23
powerpc64                      randconfig-002    gcc-10.5.0
powerpc64             randconfig-002-20260601    gcc-10.5.0
powerpc64             randconfig-002-20260601    gcc-13.4.0
riscv                            allmodconfig    clang-23
riscv                             allnoconfig    clang-23
riscv                             allnoconfig    gcc-15.2.0
riscv                            allyesconfig    clang-16
riscv                               defconfig    clang-23
riscv                               defconfig    gcc-15.2.0
riscv                          randconfig-001    clang-23
riscv                 randconfig-001-20260601    clang-23
riscv                 randconfig-001-20260601    gcc-10.5.0
riscv                          randconfig-002    clang-23
riscv                 randconfig-002-20260601    clang-23
riscv                 randconfig-002-20260601    gcc-10.5.0
s390                             allmodconfig    clang-18
s390                             allmodconfig    clang-19
s390                              allnoconfig    clang-23
s390                             allyesconfig    gcc-15.2.0
s390                                defconfig    clang-23
s390                                defconfig    gcc-15.2.0
s390                           randconfig-001    clang-23
s390                  randconfig-001-20260601    clang-23
s390                           randconfig-002    clang-23
s390                  randconfig-002-20260601    clang-23
sh                               allmodconfig    gcc-15.2.0
sh                                allnoconfig    clang-23
sh                                allnoconfig    gcc-15.2.0
sh                               allyesconfig    clang-19
sh                               allyesconfig    gcc-15.2.0
sh                                  defconfig    gcc-14
sh                                  defconfig    gcc-15.2.0
sh                        dreamcast_defconfig    gcc-15.2.0
sh                             randconfig-001    clang-23
sh                    randconfig-001-20260601    clang-23
sh                    randconfig-001-20260601    gcc-16.1.0
sh                             randconfig-002    clang-23
sh                    randconfig-002-20260601    clang-23
sh                    randconfig-002-20260601    gcc-16.1.0
sh                             shx3_defconfig    gcc-15.2.0
sparc                             allnoconfig    clang-23
sparc                             allnoconfig    gcc-15.2.0
sparc                               defconfig    gcc-15.2.0
sparc                 randconfig-001-20260601    gcc-15.2.0
sparc                 randconfig-001-20260601    gcc-8.5.0
sparc                 randconfig-002-20260601    gcc-15.2.0
sparc                 randconfig-002-20260601    gcc-8.5.0
sparc64                          allmodconfig    clang-23
sparc64                             defconfig    clang-20
sparc64                             defconfig    gcc-14
sparc64               randconfig-001-20260601    clang-20
sparc64               randconfig-001-20260601    gcc-15.2.0
sparc64               randconfig-002-20260601    clang-23
sparc64               randconfig-002-20260601    gcc-15.2.0
um                               allmodconfig    clang-19
um                                allnoconfig    clang-23
um                               allyesconfig    gcc-14
um                               allyesconfig    gcc-15.2.0
um                                  defconfig    clang-23
um                                  defconfig    gcc-14
um                             i386_defconfig    gcc-14
um                    randconfig-001-20260601    gcc-14
um                    randconfig-001-20260601    gcc-15.2.0
um                    randconfig-002-20260601    gcc-14
um                    randconfig-002-20260601    gcc-15.2.0
um                           x86_64_defconfig    clang-23
um                           x86_64_defconfig    gcc-14
x86_64                           allmodconfig    clang-20
x86_64                            allnoconfig    clang-20
x86_64                            allnoconfig    clang-23
x86_64                           allyesconfig    clang-20
x86_64      buildonly-randconfig-001-20260601    clang-20
x86_64      buildonly-randconfig-002-20260601    clang-20
x86_64      buildonly-randconfig-003-20260601    clang-20
x86_64      buildonly-randconfig-004-20260601    clang-20
x86_64      buildonly-randconfig-004-20260601    gcc-12
x86_64      buildonly-randconfig-005-20260601    clang-20
x86_64      buildonly-randconfig-006-20260601    clang-20
x86_64      buildonly-randconfig-006-20260601    gcc-14
x86_64                              defconfig    gcc-14
x86_64                                  kexec    clang-20
x86_64                randconfig-001-20260601    clang-20
x86_64                randconfig-001-20260601    gcc-14
x86_64                randconfig-002-20260601    clang-20
x86_64                randconfig-002-20260601    gcc-14
x86_64                randconfig-003-20260601    clang-20
x86_64                randconfig-004-20260601    clang-20
x86_64                randconfig-005-20260601    clang-20
x86_64                randconfig-006-20260601    clang-20
x86_64                randconfig-011-20260601    clang-20
x86_64                randconfig-012-20260601    clang-20
x86_64                randconfig-012-20260601    gcc-14
x86_64                randconfig-013-20260601    clang-20
x86_64                randconfig-014-20260601    clang-20
x86_64                randconfig-014-20260601    gcc-14
x86_64                randconfig-015-20260601    clang-20
x86_64                randconfig-015-20260601    gcc-14
x86_64                randconfig-016-20260601    clang-20
x86_64                randconfig-016-20260601    gcc-14
x86_64                randconfig-071-20260601    clang-20
x86_64                randconfig-071-20260601    gcc-14
x86_64                randconfig-072-20260601    gcc-14
x86_64                randconfig-073-20260601    clang-20
x86_64                randconfig-073-20260601    gcc-14
x86_64                randconfig-074-20260601    gcc-14
x86_64                randconfig-075-20260601    gcc-14
x86_64                randconfig-076-20260601    gcc-12
x86_64                randconfig-076-20260601    gcc-14
x86_64                               rhel-9.4    clang-20
x86_64                           rhel-9.4-bpf    gcc-14
x86_64                          rhel-9.4-func    clang-20
x86_64                    rhel-9.4-kselftests    clang-20
x86_64                         rhel-9.4-kunit    gcc-14
x86_64                           rhel-9.4-ltp    gcc-14
Quoted 8 lines
x86_64                          rhel-9.4-rust    clang-20
xtensa                            allnoconfig    clang-23
xtensa                            allnoconfig    gcc-15.2.0
xtensa                           allyesconfig    clang-23
xtensa                           allyesconfig    gcc-15.2.0
xtensa                randconfig-001-20260601    gcc-15.2.0
xtensa                randconfig-001-20260601    gcc-8.5.0
xtensa                randconfig-002-20260601    gcc-15.2.0

Should I ignore this report then?

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
#3 lore raw
Quoted 3 lines

Mmh, I wonder what size this struct group has on ARM 32bit. I tried to reproduce the issue with the config file and the instructions, but I didn't manage to.

The size is 4 bytes there, and the reason is the ABI rather than the patch itself.

arm-collie_defconfig targets the StrongARM SA1100 (ARMv4):

CONFIG_ARCH_MULTI_V4=y
CONFIG_ARCH_SA1100=y # CONFIG_AEABI is not set

Because CONFIG_AEABI is not set, this config is built with the legacy ARM ABI (APCS-GNU / OABI). Its defining difference is -mstructure-size-boundary=32: every struct's size is rounded up to a multiple of 4 bytes (EABI uses 8).

struct_group(flags, ...) expands flags into a named sub-struct. Under EABI that sub-struct is 2 bytes (two u8 bitfield containers), but under OABI it is padded up to 4 bytes. Hence:

    sizeof_field(struct mptcp_ext, flags) == 4   !=   sizeof(u16) == 2

and the new BUILD_BUG_ON in net/mptcp/options.c fires. The report is therefore a genuine OABI portability issue, not a false positive.

The reason your local attempt passed is that the build reused an existing O=build_dir whose .config was not the OABI collie config, so the bitfield group packed to 2 bytes. To reproduce, regenerate the config from scratch so the OABI flags actually take effect:

COMPILER=gcc-15.2.0 ~/lkp/kbuild/make.cross ARCH=arm O=build_dir collie_defconfig COMPILER=gcc-15.2.0 ~/lkp/kbuild/make.cross W=1 ARCH=arm O=build_dir net/mptcp/options.o

Suggested fix: don't assume the flags group is exactly u16-sized. Clearing it with

    memset(&ext->flags, 0, sizeof_field(struct mptcp_ext, flags));

instead of a 16-bit access, and dropping/relaxing the != sizeof(u16) assertion, makes it correct on OABI too (where the group is legitimately 4 bytes).

Thanks,
Frank
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.

maintainer
#4 lore raw

Hi Frank,

Quoted 17 lines · Frank Ranner
Quoted 3 lines

Mmh, I wonder what size this struct group has on ARM 32bit. I tried to reproduce the issue with the config file and the instructions, but I didn't manage to.

The size is 4 bytes there, and the reason is the ABI rather than the patch itself.

arm-collie_defconfig targets the StrongARM SA1100 (ARMv4):

CONFIG_ARCH_MULTI_V4=y
CONFIG_ARCH_SA1100=y # CONFIG_AEABI is not set

Because CONFIG_AEABI is not set, this config is built with the legacy ARM ABI (APCS-GNU / OABI). Its defining difference is -mstructure-size-boundary=32: every struct's size is rounded up to a multiple of 4 bytes (EABI uses 8).

Quoted 8 lines

struct_group(flags, ...) expands flags into a named sub-struct. Under EABI that sub-struct is 2 bytes (two u8 bitfield containers), but under OABI it is padded up to 4 bytes. Hence:

    sizeof_field(struct mptcp_ext, flags) == 4   !=   sizeof(u16) == 2

and the new BUILD_BUG_ON in net/mptcp/options.c fires. The report is therefore a genuine OABI portability issue, not a false positive.

Thank you for the analysis, I didn't know about this kconfig and its effect.

Quoted 7 lines

The reason your local attempt passed is that the build reused an existing O=build_dir whose .config was not the OABI collie config, so the bitfield group packed to 2 bytes. To reproduce, regenerate the config from scratch so the OABI flags actually take effect:

COMPILER=gcc-15.2.0 ~/lkp/kbuild/make.cross ARCH=arm O=build_dir collie_defconfig COMPILER=gcc-15.2.0 ~/lkp/kbuild/make.cross W=1 ARCH=arm O=build_dir net/mptcp/options.o

Indeed, I confirm that.

Quoted 8 lines

Suggested fix: don't assume the flags group is exactly u16-sized. Clearing it with

    memset(&ext->flags, 0, sizeof_field(struct mptcp_ext, flags));

instead of a 16-bit access, and dropping/relaxing the != sizeof(u16) assertion, makes it correct on OABI too (where the group is legitimately 4 bytes).

The purpose of these new BUILD_BUG_ON(), etc. was to avoid a memset(). That's a shame we have to use it for this (exotic?) option, but I guess we would prefer that over a non-readable code using #ifdef there.

Just to avoid a deadlock: are you planning to send such patch, or do you prefer if someone else does it?

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.