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: <87h6hvmv6h.fsf@jogness.linutronix.de>
Date: Mon, 26 Feb 2024 10:34:06 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Sreenath Vijayan <sreenath.vijayan@...y.com>, Petr Mladek
 <pmladek@...e.com>
Cc: corbet@....net, gregkh@...uxfoundation.org, jirislaby@...nel.org,
 rdunlap@...radead.org, rostedt@...dmis.org, senozhatsky@...omium.org,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-serial@...r.kernel.org, taichi.shimoyashiki@...y.com,
 daniel.palmer@...y.com, anandakumar.balasubramaniam@...y.com,
 sreenath.vijayan@...y.com
Subject: Re: [PATCH v4 2/2] tty/sysrq: Dump printk ring buffer messages via
 sysrq

On 2024-02-14, Sreenath Vijayan <sreenath.vijayan@...y.com> wrote:
> //in printk.c
> void console_replay_all(void)
> {
>        if (console_trylock()) {
>                __console_rewind_all();
>                console_unlock();
>        }
> }
>
> //in sysrq.c
> static void sysrq_handle_dmesg_dump(u8 key)
> {
>        int orig_log_level = console_loglevel;
>        console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
>        console_replay_all();
>        console_loglevel = orig_log_level;
> }

Note that there is already a sysrq 0-9 to change the loglevel. That may
be more appropriate.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ