# git rev-parse -q --verify a7aaa2f26bfd932a654706b19859e7adf802bee2^{commit} a7aaa2f26bfd932a654706b19859e7adf802bee2 already have revision, skipping fetch # git checkout -q -f -B kisskb a7aaa2f26bfd932a654706b19859e7adf802bee2 # git clean -qxdf # < git log -1 # commit a7aaa2f26bfd932a654706b19859e7adf802bee2 # Author: Sandipan Das # Date: Tue Aug 4 23:01:37 2020 +0530 # # selftests/powerpc: Fix pkey syscall redefinitions # # On distros using older glibc versions, the pkey tests encounter build # failures due to redefinition of the pkey syscall numbers. # # For compatibility, commit 743f3544fffb added a wrapper for the # gettid() syscall and included syscall.h if the version of glibc used # is older than 2.30. This leads to different definitions of SYS_pkey_* # as the ones in the pkey test header set numeric constants where as the # ones from syscall.h reuse __NR_pkey_*. The compiler complains about # redefinitions since they are different. # # This replaces SYS_pkey_* definitions with __NR_pkey_* such that the # definitions in both syscall.h and pkeys.h are alike. This way, if # syscall.h has to be included for compatibility reasons, builds will # still succeed. # # Fixes: 743f3544fffb ("selftests/powerpc: Add wrapper for gettid") # Reported-by: Sachin Sant # Suggested-by: David Laight # Suggested-by: Michael Ellerman # Signed-off-by: Sandipan Das # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/a4956d838bf59b0a71a2553c5ca81131ea8b49b9.1596561758.git.sandipan@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 a7aaa2f26bfd932a654706b19859e7adf802bee2 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig KCONFIG_SEED=0x253635FE # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig CONFIG_TRIM_UNUSED_KSYMS=n # Added to kconfig CONFIG_UBSAN=n # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:5870:warning: override: reassigning to symbol PPC_DISABLE_WERROR .config:5872:warning: override: reassigning to symbol PREVENT_FIRMWARE_BUILD .config:5877:warning: override: reassigning to symbol UBSAN # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/build_bug.h:5, from /kisskb/src/include/linux/bitfield.h:10, from /kisskb/src/drivers/phy/intel/phy-intel-combo.c:8: /kisskb/src/drivers/phy/intel/phy-intel-combo.c: In function 'combo_phy_w32_off_mask': /kisskb/src/include/linux/compiler.h:392:38: error: call to '__compiletime_assert_192' declared with attribute error: FIELD_PREP: mask is not constant 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler.h:373:4: note: in definition of macro '__compiletime_assert' 373 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert' 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/bitfield.h:46:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' 46 | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \ | ^~~~~~~~~~~~~~~~ /kisskb/src/include/linux/bitfield.h:94:3: note: in expansion of macro '__BF_FIELD_CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/phy/intel/phy-intel-combo.c:137:13: note: in expansion of macro 'FIELD_PREP' 137 | reg_val |= FIELD_PREP(mask, val); | ^~~~~~~~~~ /kisskb/src/include/linux/compiler.h:392:38: error: call to '__compiletime_assert_196' declared with attribute error: BUILD_BUG_ON failed: (((mask) + (1ULL << (__builtin_ffsll(mask) - 1))) & (((mask) + (1ULL << (__builtin_ffsll(mask) - 1))) - 1)) != 0 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ /kisskb/src/include/linux/compiler.h:373:4: note: in definition of macro '__compiletime_assert' 373 | prefix ## suffix(); \ | ^~~~~~ /kisskb/src/include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert' 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~~~~~~~~~~~~~ /kisskb/src/include/linux/build_bug.h:21:2: note: in expansion of macro 'BUILD_BUG_ON' 21 | BUILD_BUG_ON(((n) & ((n) - 1)) != 0) | ^~~~~~~~~~~~ /kisskb/src/include/linux/bitfield.h:54:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2' 54 | __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/linux/bitfield.h:94:3: note: in expansion of macro '__BF_FIELD_CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ | ^~~~~~~~~~~~~~~~ /kisskb/src/drivers/phy/intel/phy-intel-combo.c:137:13: note: in expansion of macro 'FIELD_PREP' 137 | reg_val |= FIELD_PREP(mask, val); | ^~~~~~~~~~ make[4]: *** [/kisskb/src/scripts/Makefile.build:280: drivers/phy/intel/phy-intel-combo.o] Error 1 make[3]: *** [/kisskb/src/scripts/Makefile.build:497: drivers/phy/intel] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/scripts/Makefile.build:497: drivers/phy] Error 2 make[2]: *** Waiting for unfinished jobs.... /kisskb/src/drivers/video/fbdev/controlfb.c:68: warning: "pgprot_cached_wthru" redefined 68 | #define pgprot_cached_wthru(prot) (prot) | In file included from /kisskb/src/arch/powerpc/include/asm/pgtable.h:20, from /kisskb/src/include/linux/pgtable.h:6, from /kisskb/src/include/linux/mm.h:32, from /kisskb/src/drivers/video/fbdev/controlfb.c:37: /kisskb/src/arch/powerpc/include/asm/nohash/pgtable.h:248: note: this is the location of the previous definition 248 | #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \ | make[1]: *** [/kisskb/src/Makefile:1756: drivers] Error 2 make[1]: *** Waiting for unfinished jobs.... /kisskb/src/fs/afs/dir.c: In function 'afs_dir_set_page_dirty': /kisskb/src/fs/afs/dir.c:50:1: warning: no return statement in function returning non-void [-Wreturn-type] 50 | } | ^ make: *** [Makefile:185: __sub-make] Error 2 Command 'make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 # Build took: 0:03:00.058299