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: <82c49602-8c6e-51c2-6f73-28fb9b458db8@kernel.org>
Date:   Wed, 19 Jul 2023 07:26:41 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Tony Lindgren <tony@...mide.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...el.com>,
        Dhruva Gole <d-gole@...com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        John Ogness <john.ogness@...utronix.de>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-omap@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: core: Fix serial core port id to not use
 port->line

On 19. 07. 23, 7:12, Tony Lindgren wrote:
> The serial core port id should be serial core controller specific port
> instance, which is not always the port->line index.
> 
> For example, 8250 driver maps a number of legacy ports, and when a
> hardware specific device driver takes over, we typically have one
> driver instance for each port. Let's instead add port->port_id to
> keep track serial ports mapped to each serial core controller instance.
> 
> Currently this is only a cosmetic issue for the serial core port device
> names. The issue can be noticed looking at /sys/bus/serial-base/devices
> for example though. Let's fix the issue to avoid port addressing issues
> later on.

...
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -460,6 +460,7 @@ struct uart_port {
>   	int			(*iso7816_config)(struct uart_port *,
>   						  struct serial_iso7816 *iso7816);
>   	int			ctrl_id;		/* optional serial core controller id */
> +	int			port_id;		/* optional serial core port id */

Can the id be negative? If not, please use uint.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ