# git rev-parse -q --verify 21b136cc63d2a9ddd60d4699552b69c214b32964^{commit} # git fetch -q -n -f git://fs.ozlabs.ibm.com/kernel/linus master # git rev-parse -q --verify 21b136cc63d2a9ddd60d4699552b69c214b32964^{commit} 21b136cc63d2a9ddd60d4699552b69c214b32964 # git checkout -q -f -B kisskb 21b136cc63d2a9ddd60d4699552b69c214b32964 # git clean -qxdf # < git log -1 # commit 21b136cc63d2a9ddd60d4699552b69c214b32964 # Author: Linus Torvalds # Date: Tue Jul 30 15:44:16 2024 -0700 # # minmax: fix up min3() and max3() too # # David Laight pointed out that we should deal with the min3() and max3() # mess too, which still does excessive expansion. # # And our current macros are actually rather broken. # # In particular, the macros did this: # # #define min3(x, y, z) min((typeof(x))min(x, y), z) # #define max3(x, y, z) max((typeof(x))max(x, y), z) # # and that not only is a nested expansion of possibly very complex # arguments with all that involves, the typing with that "typeof()" cast # is completely wrong. # # For example, imagine what happens in max3() if 'x' happens to be a # 'unsigned char', but 'y' and 'z' are 'unsigned long'. The types are # compatible, and there's no warning - but the result is just random # garbage. # # No, I don't think we've ever hit that issue in practice, but since we # now have sane infrastructure for doing this right, let's just use it. # It fixes any excessive expansion, and also avoids these kinds of broken # type issues. # # Requested-by: David Laight # Acked-by: Arnd Bergmann # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-ld --version # < git log --format=%s --max-count=1 21b136cc63d2a9ddd60d4699552b69c214b32964 # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux- allnoconfig # < make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux- help # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux- olddefconfig # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux- :1519:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sparc/vdso/vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] 254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) | ^~~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes] 282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] 307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes] 343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /kisskb/src/arch/sparc/vdso/vdso32/vclock_gettime.c:22: /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] 254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) | ^~~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes] 282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] 307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes] 343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: warning: arch/sparc/vdso/vdso32/vdso-note.o: missing .note.GNU-stack section implies executable stack /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /kisskb/src/kernel/fork.c: In function '__do_sys_clone3': /kisskb/src/kernel/fork.c:3072:2: warning: #warning clone3() entry point is missing, please fix [-Wcpp] 3072 | #warning clone3() entry point is missing, please fix | ^~~~~~~ Completed OK # rm -rf /kisskb/build/linus_allnoconfig_sparc64-gcc13 # Build took: 0:00:34.884647