Buildresult: linus/64r1_defconfig/mips-gcc8 built on Mar 15 2023, 16:15
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Mar 15 2023, 16:15
Duration:
0:02:47.415554
Builder:
blade4b
Revision:
sched_getaffinity: don't assume 'cpumask_size()' is fully initialized (
6015b1aca1a233379625385feb01dd014aca60b5)
Target:
linus/64r1_defconfig/mips-gcc8
Branch:
linus
Compiler:
mips-gcc8
(mips-linux-gcc (GCC) 8.5.0 / GNU ld (GNU Binutils) 2.36.1)
Config:
64r1_defconfig
(
download
)
Log:
Download original
Possible warnings (2)
./.config.64r1_defconfig:96:warning: override: CPU_BIG_ENDIAN changes choice state .config:95:warning: override: CPU_BIG_ENDIAN changes choice state
Full Log
# git rev-parse -q --verify 6015b1aca1a233379625385feb01dd014aca60b5^{commit} 6015b1aca1a233379625385feb01dd014aca60b5 already have revision, skipping fetch # git checkout -q -f -B kisskb 6015b1aca1a233379625385feb01dd014aca60b5 # git clean -qxdf # < git log -1 # commit 6015b1aca1a233379625385feb01dd014aca60b5 # Author: Linus Torvalds <torvalds@linux-foundation.org> # Date: Tue Mar 14 19:32:38 2023 -0700 # # sched_getaffinity: don't assume 'cpumask_size()' is fully initialized # # The getaffinity() system call uses 'cpumask_size()' to decide how big # the CPU mask is - so far so good. It is indeed the allocation size of a # cpumask. # # But the code also assumes that the whole allocation is initialized # without actually doing so itself. That's wrong, because we might have # fixed-size allocations (making copying and clearing more efficient), but # not all of it is then necessarily used if 'nr_cpu_ids' is smaller. # # Having checked other users of 'cpumask_size()', they all seem to be ok, # either using it purely for the allocation size, or explicitly zeroing # the cpumask before using the size in bytes to copy it. # # See for example the ublk_ctrl_get_queue_affinity() function that uses # the proper 'zalloc_cpumask_var()' to make sure that the whole mask is # cleared, whether the storage is on the stack or if it was an external # allocation. # # Fix this by just zeroing the allocation before using it. Do the same # for the compat version of sched_getaffinity(), which had the same logic. # # Also, for consistency, make sched_getaffinity() use 'cpumask_bits()' to # access the bits. For a cpumask_var_t, it ends up being a pointer to the # same data either way, but it's just a good idea to treat it like you # would a 'cpumask_t'. The compat case already did that. # # Reported-by: Ryan Roberts <ryan.roberts@arm.com> # Link: https://lore.kernel.org/lkml/7d026744-6bd6-6827-0471-b5e8eae0be3f@arm.com/ # Cc: Yury Norov <yury.norov@gmail.com> # Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 6015b1aca1a233379625385feb01dd014aca60b5 # < make -s -j 24 ARCH=mips O=/kisskb/build/linus_64r1_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- 64r1_defconfig ./.config.64r1_defconfig:96:warning: override: CPU_BIG_ENDIAN changes choice state .config:95:warning: override: CPU_BIG_ENDIAN changes choice state # < make -s -j 24 ARCH=mips O=/kisskb/build/linus_64r1_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 24 ARCH=mips O=/kisskb/build/linus_64r1_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 24 ARCH=mips O=/kisskb/build/linus_64r1_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- Completed OK # rm -rf /kisskb/build/linus_64r1_defconfig_mips-gcc8 # Build took: 0:02:47.415554
© Michael Ellerman 2006-2018.