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: <alpine.DEB.2.21.2411251628320.44939@angie.orcam.me.uk>
Date: Mon, 25 Nov 2024 16:54:11 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Arnd Bergmann <arnd@...nel.org>
cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
    Guenter Roeck <linux@...ck-us.net>, 
    Niklas Schnelle <schnelle@...ux.ibm.com>, 
    Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
    Jiri Slaby <jirislaby@...nel.org>, 
    Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, 
    linux-serial@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>, 
    linux-kernel@...r.kernel.org, Yang Yingliang <yangyingliang@...wei.com>
Subject: Re: [PATCH 1/1] tty: serial: handle HAS_IOPORT dependencies

On Mon, 25 Nov 2024, Arnd Bergmann wrote:

> > But the configuration can give less than old_serial_port contains.
> > See dozens of the explicit settings in the defconfigs.
> 
> I don't see any of the upstream defconfigs doing this
> though, the only ones setting CONFIG_SERIAL_8250_RUNTIME_UARTS
> are those that have an empty old_serial_port[]. 
> 
> Note that SERIAL_PORT_DFNS is only defined on x86, alpha
> and m68k (for q40), which are the main PC-like platforms.

 May I suggest to call `serial8250_isa_init_ports':

	if (IS_ENABLED(CONFIG_ISA) || IS_ENABLED(CONFIG_ALPHA) ||
	    IS_ENABLED(CONFIG_M68K) || IS_ENABLED(CONFIG_X86))

then (or have an equivalent `select' in the relevant Kconfig files)?

 The whole point of this legacy setup is to poke at ISA serial ports that 
have been wired by jumpers or similar means (sometimes just hardwired) to 
their designated ISA port I/O locations.  Sometimes it means LPC rather 
than real ISA, but LPC stuff should mostly be covered by platform bindings 
rather than just blind poking, which may only be needed for platforms that 
have some kind of a generic config and no DT or other way (such as ACPI or 
ISA PNP) to discover actual ports.

> I see that all three have identical definitions of
> SERIAL_PORT_DFNS, so I think these should just be moved
> next to the __serial8250_isa_init_ports definition, with
> the entire thing moved into a separate ISA driver or
> an #ifdef around it. This is of course not the problem
> at hand, but it would help separate the x86/isa and
> non-x86 platform device cases further.

 This SERIAL_PORT_DFNS definition is just original ISA stuff, so it does 
apply universally across CONFIG_ISA platforms.  Original ISA option cards 
have had no way to discover other than by blind-poking (or giving port I/O 
locations by hand via a kernel parameter).

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ