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] [day] [month] [year] [list]
Message-ID: <a41ae447-565a-4db3-96ff-30aef6455a7c@gmx.de>
Date: Fri, 5 Jan 2024 13:42:41 +0100
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 Lino Sanfilippo <l.sanfilippo@...bus.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Jiri Slaby <jirislaby@...nel.org>, u.kleine-koenig@...gutronix.de,
 shawnguo@...nel.org, s.hauer@...gutronix.de, mcoquelin.stm32@...il.com,
 alexandre.torgue@...s.st.com, cniedermaier@...electronics.com,
 hugo@...ovil.com, m.brock@...mierlo.com, LKML
 <linux-kernel@...r.kernel.org>, linux-serial <linux-serial@...r.kernel.org>,
 Lukas Wunner <lukas@...ner.de>, p.rosenberger@...bus.com,
 stable@...r.kernel.org
Subject: Re: [PATCH v7 6/7] serial: omap: do not override settings for RS485
 support

On 03.01.24 at 12:36, Ilpo Järvinen wrote:
> On Wed, 3 Jan 2024, Lino Sanfilippo wrote:
>
>> The drivers RS485 support is deactivated if there is no RTS GPIO available.
>> This is done by nullifying the ports rs485_supported struct. After that
>> however the settings in serial_omap_rs485_supported are assigned to the
>> same structure unconditionally, which results in an unintended reactivation
>> of RS485 support.
>>
>> Fix this by moving the assignment to the beginning of
>> serial_omap_probe_rs485() and thus before uart_get_rs485_mode() gets
>> called.
>
> This doesn't seem to accurately reflect what the problem is (which you
> correctly described in the paragraph above this). The problem doesn't seem
> to have anything to do with the placement of uart_get_rs485_mode() call
> but the if (IS_ERR(up->rts_gpiod)) block that clears rs485_supported?
>

Right, this should be "...Fix this by moving the assignment to the beginning of
serial_omap_probe_rs485() and thus before the check for the RTS GPIO."
I will correct this.


> A future work item that came to my mind while reviewing this: I suppose
> uart_disable_rs485_support() could be added into core which memsets
> rs485_supported and rs485 to zero so this driver could just call it.
>

Yes, and the ar933x driver could use that as well.


Regards,
Lino

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ