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: <aOY9-B1V3SNvcjrF@kuha.fi.intel.com>
Date: Wed, 8 Oct 2025 13:33:28 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: RD Babiera <rdbabiera@...gle.com>
Cc: gregkh@...uxfoundation.org, badhri@...gle.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter
 mode if port is the UFP

On Tue, Sep 23, 2025 at 06:16:08PM +0000, RD Babiera wrote:
> Nothing currently stops the DisplayPort Alt Mode driver from sending
> Enter Mode if the port is the Data Device. Utilize
> typec_altmode_get_data_role to prevent mode entry.
> 
> Signed-off-by: RD Babiera <rdbabiera@...gle.com>

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

> ---
>  drivers/usb/typec/altmodes/displayport.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index 1dcb77faf85d..8d111ad3b71b 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -758,7 +758,9 @@ int dp_altmode_probe(struct typec_altmode *alt)
>  	struct fwnode_handle *fwnode;
>  	struct dp_altmode *dp;
>  
> -	/* FIXME: Port can only be DFP_U. */
> +	/* Port can only be DFP_U. */
> +	if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
> +		return -EPROTO;
>  
>  	/* Make sure we have compatible pin configurations */
>  	if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
> -- 
> 2.51.0.534.gc79095c0ca-goog

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ