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: <20250414235817.hu4bpvldk2yiayts@offworld>
Date: Mon, 14 Apr 2025 16:58:17 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Li Ming <ming.li@...omail.com>
Cc: jonathan.cameron@...wei.com, dave.jiang@...el.com,
	alison.schofield@...el.com, vishal.l.verma@...el.com,
	ira.weiny@...el.com, dan.j.williams@...el.com,
	linux-cxl@...r.kernel.org, linux-kernel@...r.kernel.org,
	shiju.jose@...wei.com
Subject: Re: [RFC PATCH 1/1] cxl/feature: Using Full Data Transfer only when
 offset is 0

On Wed, 09 Apr 2025, Li Ming wrote:

>Per CXL r3.2 section 8.2.10.6.3 Set Feature(Opcode 0502h)
>
>"If the Feature data is transferred in its entirely, the caller makes
>one call to Set Feature with Action = Full Data Transfer. The Offset
>field is not used and shall be ignored."
>
>It implies if using Full Data Transfer, the received data should be
>updated from offset 0 on device side.
>
>Current driver implementation is if feature data size is less than mbox
>payload - set feature header, driver will use Full Data Transfer even if
>user provides an offset. Per above description, feature data will be
>written from offset 0 rather than the offset value user provided, the
>result will not be what user expects.
>
>The changes is checking if the offset caller provides is equal to 0, if
>yes, using Full Data Transfer, if not, using Initiate Data Transfer -
>Finish Data Transfer.
>
>After the changes, all Set Feature transfer scenarios are below:
>
>1. data size + header is less than mbox payload and offset is 0
>	Full Data Transfer
>
>2. data size + header is less than mbox payload and offset is not 0
>	Initiate Data Transfer(with all feature data) - Finish Data Transfer(with no feature data)
>
>3. data size + header us greater than mbox payload with any value of offset
>	Initiate Data Transfer - Continue Data Transfer - Finish Data Transfer
>
>Fixes: 14d502cc2718e ("cxl/mbox: Add SET_FEATURE mailbox command")
>Signed-off-by: Li Ming <ming.li@...omail.com>

Reviewed-by: Davidlohr Bueso <dave@...olabs.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ