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: <ZW9KkUDnhD5d_nhu@smile.fi.intel.com>
Date:   Tue, 5 Dec 2023 18:06:41 +0200
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Tony Lindgren <tony@...mide.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        "David S . Miller" <davem@...emloft.net>,
        Dhruva Gole <d-gole@...com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH v4 3/4] serial: core: Handle serial console options

On Tue, Dec 05, 2023 at 09:32:35AM +0200, Tony Lindgren wrote:
> In order to start moving the serial console quirks out of console_setup(),
> let's add parsing for the quirks to the serial core layer. We can use
> add_preferred_console_match() to handle the quirks.
> 
> At this point we can't drop the quirks from console_setup() because it
> would confuse add_preferred_console(). And try_enable_default_console()
> would get called before try_enable_preferred_console().
> 
> Note that eventually we may want to set up driver specific console quirk
> handling for the serial port device drivers to use. But we need to figure
> out which driver(s) need to call the quirk. So for now, we just handle the
> sparc quirk directly.

...

> +static int serial_base_add_sparc_console(struct uart_driver *drv,
> +					 struct uart_port *port)
> +{
> +	const char *name = NULL;
> +	int ret;
> +
> +	switch (port->line) {
> +	case 0:
> +		name = "ttya";
> +		break;
> +	case 1:
> +		name = "ttyb";
> +		break;
> +	default:
> +		return 0;
> +	}

> +	ret = add_preferred_console_match(name, drv->dev_name, port->line);
> +	if (ret && ret != -ENOENT)
> +		return ret;
> +
> +	return 0;

	return serial_base_add_one_prefcon(...);

?

> +}

...

> +	if (!strncmp(drv->dev_name, "ttyS", 4)) {

str_has_prefix()

> +	}

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ