linux_dsm_epyc7002/Documentation
Jason A. Donenfeld 625d344978 Revert "kernel/printk: add kmsg SEEK_CUR handling"
This reverts commit 8ece3b3eb5.

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 <bmeneg@redhat.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-21 20:47:20 -07:00
..
ABI Revert "kernel/printk: add kmsg SEEK_CUR handling" 2020-06-21 20:47:20 -07:00
accounting
admin-guide
arm
arm64 docs/arm64: Fix typo'd #define in sve.rst 2020-06-15 13:17:43 +01:00
block
bpf
cdrom
core-api
cpu-freq
crypto
dev-tools
devicetree
doc-guide
driver-api Documentation: media: convert to use i2c_new_client_device() 2020-06-19 09:20:25 +02:00
fault-injection
fb
features
filesystems This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
firmware_class
firmware-guide
fpga
gpu drm/amdgpu: fix documentation around busy_percentage 2020-06-17 17:42:43 -04:00
hid
hwmon
i2c Documentation/i2c: SMBus start signal is S not A 2020-06-19 09:21:48 +02:00
ia64
ide
iio
infiniband
input
isdn
kbuild
kernel-hacking
leds
livepatch
locking
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power
powerpc powerpc: Document details on H_SCM_HEALTH hcall 2020-06-15 18:22:43 -07:00
process
RCU
riscv
s390
scheduler
scsi
security
sh Documentation: remove SH-5 index entries 2020-06-16 17:39:43 -07:00
sound
sparc
sphinx
sphinx-static
spi
target
timers
trace
translations
usb
userspace-api Documentation: media: convert to use i2c_new_client_device() 2020-06-19 09:20:25 +02:00
virt
vm
w1
watchdog
x86
xtensa
.gitignore
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
Changes
CodingStyle
conf.py
COPYING-logo
crc32.txt
docutils.conf
dontdiff
index.rst
Kconfig
kprobes.txt
logo.gif
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt
nommu-mmap.txt
remoteproc.txt
rpmsg.txt
speculation.txt
static-keys.txt
SubmittingPatches
tee.txt
this_cpu_ops.txt
watch_queue.rst
xz.txt