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]
Message-ID: <6411cf5f-0a92-452c-b974-be14dcc4bd32@intel.com>
Date: Wed, 14 Jan 2026 09:08:17 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Robert Richter <rrichter@....com>
Cc: Davidlohr Bueso <dave@...olabs.net>,
 Jonathan Cameron <jonathan.cameron@...wei.com>,
 Alison Schofield <alison.schofield@...el.com>,
 Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
 Dan Williams <dan.j.williams@...el.com>, linux-cxl@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] cxl: Check for invalid addresses returned from
 translation functions on errors



On 1/13/26 10:45 AM, Robert Richter wrote:
> On 13.01.26 08:51:15, Dave Jiang wrote:
>>
>>
>> On 1/7/26 5:05 AM, Robert Richter wrote:
>>> Translation functions may return an invalid address in case of errors.
>>> If the address is not checked the further use of the invalid value
>>> will cause an address corruption.
>>>
>>> Consistently check for a valid address returned by translation
>>> functions. Use RESOURCE_SIZE_MAX to indicate an invalid address for
>>> type resource_size_t. Depending on the type either RESOURCE_SIZE_MAX
>>> or ULLONG_MAX is used to indicate an address error.
>>>
>>> Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>>> Signed-off-by: Robert Richter <rrichter@....com>
>>> ---
>>> v3:
>>>  * updated sob-chain,
>>>  * changed error handling flow in test/cxl_translate.c (Alison),
>>>
>>> v2:
>>>  * separated from this patch series (Alison):
>>>    [PATCH v8 00/13] cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
>>>  * improved error handling logic and early return on error in
>>>    region_offset_to_dpa_result() (Dave),
>>>  * use RESOURCE_SIZE_MAX to indicate an invalid address for
>>>    resource_size_t types (Alison, kernel test robot),
>>>  * improved patch description (Alison),
>>>  * added line wrap for code >80 chars.
>>> ---
>>>
>>> Signed-off-by: Robert Richter <rrichter@....com>
>>
>> Applied to cxl/fixes
>> 8441c7d3bd6c5a52ab2ecf77e43a5bf262004f5c
> 
> Thanks Alison and Dave.
> 
>> Added user impact statement and fixed up tab formatting reported by checkpatch.
> 
>>> +		pr_err("test random iter %d FAIL hpa=%llu, dpa=%llu reverse_dpa=%llu, pos=%d reverse_pos=%d eiw=%u eig=%u\n",
>>> +			i, hpa, dpa, reverse_dpa, pos, reverse_pos, eiw, eig);
> 
> Note that my checkpatch does not trigger a tab issue here. How did you
> test that?

Maybe --strict?

> 
> Thanks,
> 
> -Robert


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ