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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023102115-stock-scrambled-f7d5@gregkh>
Date:   Sat, 21 Oct 2023 18:15:23 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Florian Eckert <fe@....tdt.de>
Cc:     Eckert.Florian@...glemail.com, jirislaby@...nel.org, pavel@....cz,
        lee@...nel.org, kabel@...nel.org, u.kleine-koenig@...gutronix.de,
        ansuelsmth@...il.com, m.brock@...mierlo.com,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-leds@...r.kernel.org
Subject: Re: [PATCH v4 2/3] tty: add new helper function tty_get_tiocm

On Thu, Oct 19, 2023 at 01:28:08PM +0200, Florian Eckert wrote:
> The struct 'tty_struct' has a callback to read the status flags of the tty
> if the tty driver provides them. So fare, the data is transferred directly
> to userspace with the function 'tty_tiocmget'. This function cannot be
> used to evaluate the status line of the tty interface in the ledtrig-tty
> trigger. To make this possible, a new function must be added that does
> not immediately pass the data on to userspace.
> 
> The new function 'tty_get_tiocm' only returns the status register.
> This information can then be processed further in the ledtrig-tty
> trigger.

Writing changelogs are hard.  You are including a lot of information in
here that really doesn't need to be, as you are focusing on your
specific use case, which is fine, but you are creating a generic
function.

This can be simpler, how about something like this:

	There is no in-kernel function to get the status register of a
	tty device like the TIOCMGET ioctl returns to userspace.  Create
	a new function, tty_get_tiocm(), to obtain the status register
	that other portions of the kernel can call if they need this
	information, and move the existing internal tty_tiocmget()
	function to use this interface.

Sound good?

The code portion looks fine to me, thanks for doing this.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ