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
| ||
|
Message-ID: <f09c546e-4f0c-81a0-8acf-24f4e5d29229@linux.intel.com> Date: Fri, 20 Sep 2024 18:58:21 +0300 (EEST) From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> To: Jiri Slaby <jslaby@...e.cz>, LiangCheng Wang <zaq14760@...il.com> cc: shawnguo@...nel.org, s.hauer@...gutronix.de, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, kernel@...gutronix.de, festevam@...il.com, u.kleine-koenig@...gutronix.de, cniedermaier@...electronics.com, l.sanfilippo@...bus.com, linux@...musvillemoes.dk, stefan.eichenberger@...adex.com, tglx@...utronix.de, rickaran@...s.com, LKML <linux-kernel@...r.kernel.org>, linux-serial <linux-serial@...r.kernel.org>, imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org Subject: Re: [PATCH 1/1] drivers: tty: imx: fix flags of rs485 not work properly On Fri, 6 Sep 2024, Jiri Slaby wrote: > It seems gmail refuses to send this to zaq14760@...il.com (the author). > > On 06. 09. 24, 4:19, LiangCheng Wang wrote: > > The rs485.flags are lost in functions such as imx_uart_stop_tx(), > > causing the function of RS485 to be invalid when using the > > serial port as the RS485 port. Use a variable to store the state to > > avoid this issue. > > AFAICT, this feels rather wrong. Any rs485 experts around? It is wrong. The patch makes no sense at all and prevents reconfiguring/setting rs485 from userspace. > At minimum, how are the flags "lost" and why this does not matter to other > drivers? Perhaps some userspace program is altering rs485 settings, definitely nothing in imx_uart_stop_tx() writes to it. I'm skeptical it would be a problem in the kernel, especially given the patch that is supposed to "avoid the issue" (whatever the issue is). > > --- a/drivers/tty/serial/imx.c > > +++ b/drivers/tty/serial/imx.c > > @@ -209,7 +209,7 @@ struct imx_port { > > const struct imx_uart_data *devdata; > > struct mctrl_gpios *gpios; > > - > > + int flags; > > Definitely not int for flags. Driver is not supposed to duplicate the rs485 flags at all. -- i.
Powered by blists - more mailing lists