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]
Date:   Wed, 22 Nov 2023 14:34:42 +0100
From:   Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To:     Frieder Schrempf <frieder.schrempf@...tron.de>,
        Eberhard Stoll <eberhard.stoll@....de>, sherry.sun@....com
Cc:     festevam@...il.com, gregkh@...uxfoundation.org,
        jirislaby@...nel.org, kernel@...gutronix.de,
        linux-arm-kernel@...ts.infradead.org, linux-imx@....com,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
        s.hauer@...gutronix.de, shawnguo@...nel.org,
        eberhard.stoll@...tron.de
Subject: Re: [PATCH] serial: imx: also enable Transmit Complete interrupt in
 rs232 mode

On 22/11/2023 14.01, Frieder Schrempf wrote:
> On 22.11.23 09:03, Rasmus Villemoes wrote:
>> On 21/11/2023 21.49, Eberhard Stoll wrote:

>>> But IMHO there is one next issue with this situation: When the port
>>> operates with WAIT_AFTER_RTS and WAIT_AFTER_SEND then some timers
>>> for callback functions might be active. I did not discover where they
>>> are stopped for the case when the serial port is closed. Maybe stopping
>>> is not required ...
>>
>> Indeed, that's an extra complication. Adding two hrtimer_try_to_cancel()
>> in shutdown would probably not hurt, along with setting tx_state OFF.
>>
>> I wonder if at least mode switching should simply be disallowed (-EBUSY)
>> if tx_state is anything but OFF.
> 
> Is there a valid use-case for switching the mode while the device is
> transmitting? Is this something we need to support for whatever reason?
> It sounds rather an obscure thing to do.

No, I don't think there is, and that's not at all what I'm trying to do.
I was just thinking out loud that maybe we should explicitly disallow it
[further, in fact, if possible, it should be disallowed in the serial
core]. But of course that requires that ->tx_state can actually be
relied upon, which is what my patch attempts to do for the rs232 case -
though it might not be an entirely complete fix, as described by
Eberhard, since we can get to ->shutdown and thus disable the TC
interrupt before it has a chance to fire.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ