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: <aGHrSVX7ce96nTmt@aschofie-mobl2.lan>
Date: Sun, 29 Jun 2025 18:41:29 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: Li Ming <ming.li@...omail.com>
CC: <dave@...olabs.net>, <jonathan.cameron@...wei.com>,
	<dave.jiang@...el.com>, <vishal.l.verma@...el.com>, <ira.weiny@...el.com>,
	<dan.j.williams@...el.com>, <shiju.jose@...wei.com>,
	<linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] cxl/core: Add a helper function to check dpa
 availability

On Sun, Jun 29, 2025 at 04:20:42PM +0800, Li Ming wrote:
> In CXL subsystem, many pieces of code that need to check dpa
> availability in case using wrong dpa. Add a helper function called
> is_valid_dpa() for dpa availability checking.

Does this have anything DPA special about it. Could it be done in
in a new helper like resource_contains_addr() for all to employ.
In CXL, we'd use it in at least one more place, checking for HPA
in a region resource. 

-- Alison


> 
snip

> +bool is_valid_dpa(struct resource *res, u64 dpa)
> +{
> +	return (dpa >= res->start && dpa <= res->end);
> +}
> +

snip

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ