lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHmME9o84kCsK=J-c59gP9RhhzApkwMeh9Y95UeRG8Cs-2ED=g@mail.gmail.com>
Date:   Sat, 11 Jul 2020 16:28:29 -0600
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Petr Mladek <pmladek@...e.com>, LKML <linux-kernel@...r.kernel.org>
Cc:     Bruno Meneguele <bmeneg@...hat.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        David Laight <David.Laight@...lab.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] Revert "kernel/printk: add kmsg SEEK_CUR handling"

On Sun, Jun 21, 2020 at 9:02 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
> 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.

FYI, bash finally bumped its read buffer up to 4k, which actually
makes reading /dev/kmsg less awful than previously thought:
http://git.savannah.gnu.org/cgit/bash.git/commit/?id=6edcd70089d71ee8c17bf3298527054b3223be9f
This is probably too mundane to warrant an email, but in case somebody
finds this thread in the future, voila.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ