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: <42b1911e-c69b-4f5a-96f2-ab6d4353ea5c@app.fastmail.com>
Date: Mon, 25 Nov 2024 18:54:55 +0100
From: "Arnd Bergmann" <arnd@...nel.org>
To: "Maciej W. Rozycki" <macro@...am.me.uk>
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, Nov 25, 2024, at 17:54, Maciej W. Rozycki wrote:
> 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)?

Right, I think that makes sense, but I'm a little worried
about renumbering or incorrectly configuring the uarts on
a non-x86 system that might have ISA slots and also register
a 8250 console.

E.g. on the RM200, two serial ports get registered on
MMIO addresses:

arch/mips/sni/rm200.c:static struct serial8250_platform_data rm200_data[] = {
arch/mips/sni/rm200.c-  MEMPORT(0x160003f8, RM200_I8259A_IRQ_BASE + 4),
arch/mips/sni/rm200.c-  MEMPORT(0x160002f8, RM200_I8259A_IRQ_BASE + 3),
arch/mips/sni/rm200.c-  { },
arch/mips/sni/rm200.c-};

so these would become ports ttyS4 and ttyS5 if the first four
ports get reserved for ISA cards, or disappear when using the
default CONFIG_SERIAL_8250_NR_UARTS=4.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ