# git rev-parse -q --verify 625d3449788f85569096780592549d0340e9c0c7^{commit} 625d3449788f85569096780592549d0340e9c0c7 already have revision, skipping fetch # git checkout -q -f -B kisskb 625d3449788f85569096780592549d0340e9c0c7 # git clean -qxdf # < git log -1 # commit 625d3449788f85569096780592549d0340e9c0c7 # Author: Jason A. Donenfeld # Date: Sun Jun 21 21:02:22 2020 -0600 # # Revert "kernel/printk: add kmsg SEEK_CUR handling" # # This reverts commit 8ece3b3eb576a78d2e67ad4c3a80a39fa6708809. # # This commit broke userspace. Bash uses ESPIPE to determine whether or # not the file should be read using "unbuffered I/O", which means reading # 1 byte at a time instead of 128 bytes at a time. I used to use bash to # read through kmsg in a really quite nasty way: # # while read -t 0.1 -r line 2>/dev/null || [[ $? -ne 142 ]]; do # echo "SARU $line" # done < /dev/kmsg # # This will show all lines that can fit into the 128 byte buffer, and skip # lines that don't. That's pretty awful, but at least it worked. # # With this change, bash now tries to do 1-byte reads, which means it # skips all the lines, which is worse than before. # # Now, I don't really care very much about this, and I'm already look for # a workaround. But I did just spend an hour trying to figure out why my # scripts were broken. Either way, it makes no difference to me personally # whether this is reverted, but it might be something to consider. If you # declare that "trying to read /dev/kmsg with bash is terminally stupid # anyway," I might be inclined to agree with you. But do note that bash # uses lseek(fd, 0, SEEK_CUR)==>ESPIPE to determine whether or not it's # reading from a pipe. # # Cc: Bruno Meneguele # Cc: Sergey Senozhatsky # Cc: Steven Rostedt # Cc: David Laight # Cc: Sergey Senozhatsky # Cc: Petr Mladek # Signed-off-by: Jason A. Donenfeld # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 625d3449788f85569096780592549d0340e9c0c7 # < make -s -j 48 ARCH=m68k O=/kisskb/build/linus_m5272c3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- m5272c3_defconfig # < make -s -j 48 ARCH=m68k O=/kisskb/build/linus_m5272c3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 48 ARCH=m68k O=/kisskb/build/linus_m5272c3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 48 ARCH=m68k O=/kisskb/build/linus_m5272c3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- /kisskb/src/drivers/net/ethernet/freescale/fec_main.c: In function 'fec_restart': /kisskb/src/drivers/net/ethernet/freescale/fec_main.c:949:6: warning: unused variable 'val' [-Wunused-variable] u32 val; ^~~ /kisskb/src/drivers/net/ethernet/freescale/fec_main.c: In function 'fec_get_mac': /kisskb/src/drivers/net/ethernet/freescale/fec_main.c:1692:28: warning: unused variable 'pdata' [-Wunused-variable] struct fec_platform_data *pdata = dev_get_platdata(&fep->pdev->dev); ^~~~~ In file included from /kisskb/src/arch/m68k/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/spinlock.h:460, from /kisskb/src/include/linux/seqlock.h:36, from /kisskb/src/include/linux/time.h:6, from /kisskb/src/include/linux/stat.h:19, from /kisskb/src/include/linux/module.h:13, from /kisskb/src/net/core/filter.c:20: /kisskb/src/net/core/filter.c: In function 'bpf_clear_redirect_map': /kisskb/src/arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long)(n), sizeof(*(ptr)))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/asm-generic/cmpxchg.h:106:28: note: in expansion of macro 'cmpxchg_local' #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) ^~~~~~~~~~~~~ /kisskb/src/net/core/filter.c:3569:4: note: in expansion of macro 'cmpxchg' cmpxchg(&ri->map, map, NULL); ^~~~~~~ Completed OK # rm -rf /kisskb/build/linus_m5272c3_defconfig_m68k-gcc8 # Build took: 0:00:29.192346