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]
Date:   Sat, 10 Oct 2020 08:46:46 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     ChiYuan Huang <u0084500@...il.com>
Cc:     Jun Li <jun.li@....com>, Jun Li <lijun.kernel@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Linux USB List <linux-usb@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        cy_huang <cy_huang@...htek.com>
Subject: Re: [PATCH] usb: typec: tcpm: Fix if vbus before cc,
 hard_reset_count not reset issue

On Sat, Oct 10, 2020 at 12:06:13AM +0800, ChiYuan Huang wrote:
[ ... ]
> 
> Like I mentioned before, whatever the condition is, hard_reset_count
> must be reset to zero during tcpm_detach.
> 
> But refer to Guenter's mail,  he prefer to narrow down the condition
> to reset this counter.
> 
> I think the original thought is important why to put this line there.
> 
> Hi, Guenter:
>    From the discussion, we really need to know why you put the reset
> line below port attached is false and also make some judgement.
> I think there may be ome condition that we don't considered.
> 
As I am sure I have mentioned before, it was to handle misbehaving
partners, to enforce that the system goes into error recovery state
and (hopefully) recover the partner enough to be able to reconnect.
This is the same reason why resetting the counter is commented out
in SRC_SEND_CAPABILITIES and reset in SRC_READY instead. The typical
sequence was that the state machine would process from SRC_UNATTACHED
to some point and then stall / time out, but never be in disconnected
state.

Always resetting the hard reset counter in tcpm_detach() would disable
error recovery in that situation, and affected partners would never
recover. Effectively it would disable error recovery in any state machine
cycle which involves an unattached state, which makes me really question
if it is indeed mandated by the specification to reset the hard reset
counter at that point.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ