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: <yw1xwnvtcki0.fsf@mansr.com>
Date:   Sun, 31 Jan 2021 13:18:47 +0000
From:   Måns Rullgård <mans@...sr.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Jiri Slaby <jirislaby@...nel.org>, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: 8250: add option to disable registration of
 legacy ISA ports

Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:

> On Thu, Jan 28, 2021 at 05:22:44PM +0000, Mans Rullgard wrote:
>> On systems that do not have the traditional PC ISA serial ports, the
>> 8250 driver still creates non-functional device nodes.  This change
>> makes only ports that actually exist (PCI, DT, ...) get device nodes.
>> 
>> Signed-off-by: Mans Rullgard <mans@...sr.com>
>> ---
>>  drivers/tty/serial/8250/8250_core.c | 26 ++++++++++++++++++++------
>>  drivers/tty/serial/8250/Kconfig     |  5 +++++
>>  2 files changed, 25 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
>> index cae61d1ebec5..49695dd3677c 100644
>> --- a/drivers/tty/serial/8250/8250_core.c
>> +++ b/drivers/tty/serial/8250/8250_core.c
>> @@ -555,6 +555,7 @@ static void __init serial8250_isa_init_ports(void)
>>  	}
>>  }
>>  
>> +#ifdef CONFIG_SERIAL_8250_ISA
>
> This is just making a mess of the code. 

It was already a mess.

> To do this right, pull the isa code out into a separate file and put
> the #ifdef in a .h file, so we can properly maintain and support this
> code over time.  This change as-is is not going to make that any
> easier :(

I might put in that effort if there's a reasonable chance this change
will be accepted.  If it's going to be rejected regardless, I'd rather
not waste my time.

>> +config SERIAL_8250_ISA
>> +	bool "8250/16550 ISA device support" if EXPERT
>
> So, no one will set this?

I followed the pattern of the existing SERIAL_8250_PNP option.  Was that
a mistake?  How would you prefer it?

> What userspace visable change will be caused by this? 

There won't be /dev/ttyS devices for ports that don't exist.

> Will ports get renumbered?

Not if they had predictable numbers to begin with.

> What harm is this causing systems today without this change?

It means I have to somehow maintain a separate list of which ports are
real and which should be ignored, or else try to distinguish real errors
from those caused by trying to access the bogus ports.

-- 
Måns Rullgård

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ