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: <20250625064006.GE2824380@black.fi.intel.com>
Date: Wed, 25 Jun 2025 09:40:06 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: zhangjianrong <zhangjianrong5@...wei.com>
Cc: andreas.noever@...il.com, michael.jamet@...el.com,
	YehezkelShB@...il.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, guhengsheng@...ilicon.com,
	caiyadong@...wei.com, xuetao09@...wei.com, lixinghang1@...wei.com
Subject: Re: [PATCH] thunderbolt: Process xdomain response packets
 synchronously

On Wed, Jun 25, 2025 at 02:25:05PM +0800, zhangjianrong wrote:
> Xdomain response packets don't belong to async event. It seems
> no harm now but better to be fixed.

It seems odd but the protocol actually uses RESP packets also with requests
(probably a typo in the original specs but this is what Apple also
implemented so we need to support it). So we need to deal with them.

Did you try if this patch works against macOS for example?

> 
> Signed-off-by: zhangjianrong <zhangjianrong5@...wei.com>
> ---
>  drivers/thunderbolt/ctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
> index 4bdb2d45e0bf..1873b64caf7c 100644
> --- a/drivers/thunderbolt/ctl.c
> +++ b/drivers/thunderbolt/ctl.c
> @@ -461,6 +461,7 @@ static void tb_ctl_rx_callback(struct tb_ring *ring, struct ring_frame *frame,
>  	case TB_CFG_PKG_ERROR:
>  	case TB_CFG_PKG_OVERRIDE:
>  	case TB_CFG_PKG_RESET:
> +	case TB_CFG_PKG_XDOMAIN_RESP:
>  		if (*(__be32 *)(pkg->buffer + frame->size) != crc32) {
>  			tb_ctl_err(pkg->ctl,
>  				   "RX: checksum mismatch, dropping packet\n");
> @@ -474,7 +475,6 @@ static void tb_ctl_rx_callback(struct tb_ring *ring, struct ring_frame *frame,
>  		break;
>  
>  	case TB_CFG_PKG_EVENT:
> -	case TB_CFG_PKG_XDOMAIN_RESP:
>  	case TB_CFG_PKG_XDOMAIN_REQ:
>  		if (*(__be32 *)(pkg->buffer + frame->size) != crc32) {
>  			tb_ctl_err(pkg->ctl,
> -- 
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ