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: <ZCaDVAH7oszQRMIZ@kuha.fi.intel.com>
Date:   Fri, 31 Mar 2023 09:53:08 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     RD Babiera <rdbabiera@...gle.com>
Cc:     gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v1] usb: typec: altmodes/displayport: Fix configure
 initial pin assignment

On Wed, Mar 29, 2023 at 09:51:59PM +0000, RD Babiera wrote:
> While determining the initial pin assignment to be sent in the configure
> message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to
> send both Pin Assignment C and E when both are supported by the DFP_U and
> UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates,
> VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never
> selects Pin Assignment E when Pin Assignment C is offered.
> 
> Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only
> Pin Assignment C if it is available.
> 
> Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
> Cc: stable@...r.kernel.org
> Signed-off-by: RD Babiera <rdbabiera@...gle.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/altmodes/displayport.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index 662cd043b50e..8f3e884222ad 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -112,8 +112,12 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)
>  		if (dp->data.status & DP_STATUS_PREFER_MULTI_FUNC &&
>  		    pin_assign & DP_PIN_ASSIGN_MULTI_FUNC_MASK)
>  			pin_assign &= DP_PIN_ASSIGN_MULTI_FUNC_MASK;
> -		else if (pin_assign & DP_PIN_ASSIGN_DP_ONLY_MASK)
> +		else if (pin_assign & DP_PIN_ASSIGN_DP_ONLY_MASK) {
>  			pin_assign &= DP_PIN_ASSIGN_DP_ONLY_MASK;
> +			/* Default to pin assign C if available */
> +			if (pin_assign & BIT(DP_PIN_ASSIGN_C))
> +				pin_assign = BIT(DP_PIN_ASSIGN_C);
> +		}
>  
>  		if (!pin_assign)
>  			return -EINVAL;
> 
> base-commit: 97318d6427f62b723c89f4150f8f48126ef74961
> -- 
> 2.40.0.348.gf938b09366-goog

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ