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]
Date:   Wed, 15 Jan 2020 13:42:10 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Dmitry Safonov <dima@...sta.com>
Cc:     linux-kernel@...r.kernel.org,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Jiri Slaby <jslaby@...e.com>,
        Vasiliy Khoruzhick <vasilykh@...sta.com>,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH-next 3/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE

On Tue, Jan 14, 2020 at 07:10:47PM +0000, Dmitry Safonov wrote:
> On 1/10/20 10:32 PM, Dmitry Safonov wrote:
> > On 1/10/20 4:46 PM, Greg Kroah-Hartman wrote:
> > [..]
> >>> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> >>> index 6ac9dfed3423..f70eba032d0b 100644
> >>> --- a/drivers/tty/serial/serial_core.c
> >>> +++ b/drivers/tty/serial/serial_core.c
> >>> @@ -3081,6 +3081,38 @@ void uart_insert_char(struct uart_port *port, unsigned int status,
> >>>  }
> >>>  EXPORT_SYMBOL_GPL(uart_insert_char);
> >>>  
> >>> +const char sysrq_toggle_seq[] = CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE;
> >>> +
> >>> +static void uart_sysrq_on(struct work_struct *w)
> >>> +{
> >>> +	sysrq_toggle_support(1);
> >>> +	pr_info("SysRq is enabled by magic sequience on serial\n");
> >>
> >> Do we want to say what serial port it is enabled on?
> > 
> > Makes sense, will add.
> 
> Ah, I've managed to forget to mention that I didn't add the port name
> into the message in v2. I experimented a bit - it's getting a bit
> complicated how-to protect (char *name) for just this message.
> Like, SysRq can be theoretically enabled on two serials at the same
> moment - so some locking is needed to make the printed name sane.
> 
> As sysrq_toggle_support() is a global-enable knob for sysrq (also can be
> switched in /proc/sys/kernel/sysrq) I'm not sure if it's worth to
> complicate code to print through which serial console SysRq has been
> enabled.
> 
> I can still do it in v3 if you insist.

No worries, if it's too hard to get to, that's fine.  If it was
available, it would have been nice to have.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ