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: <69c1bd48-c55b-4af1-a48b-1669102af1be@nvidia.com>
Date: Thu, 31 Jul 2025 14:47:44 +0300
From: Arto Merilainen <amerilainen@...dia.com>
To: "Aneesh Kumar K.V (Arm)" <aneesh.kumar@...nel.org>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org, aik@....com,
 linux-coco@...ts.linux.dev, lukas@...ner.de, kvmarm@...ts.linux.dev,
 Samuel Ortiz <sameo@...osinc.com>, Xu Yilun <yilun.xu@...ux.intel.com>,
 Jason Gunthorpe <jgg@...pe.ca>, Suzuki K Poulose <Suzuki.Poulose@....com>,
 Steven Price <steven.price@....com>,
 Catalin Marinas <catalin.marinas@....com>, Marc Zyngier <maz@...nel.org>,
 Will Deacon <will@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>
Subject: Re: [RFC PATCH v1 13/38] coco: host: arm64: Create a PDEV with rmm


On 28.7.2025 16.51, Aneesh Kumar K.V (Arm) wrote:

> +static int pci_res_to_pdev_addr(struct rmi_pdev_addr_range *pdev_addr,
> +				unsigned int naddr, struct resource *res,
> +				unsigned int nres)
> +{
> +	int i, j;
> +
> +	for (i = 0, j = 0; i < naddr && j < nres; j++) {
> +		if (res[j].flags & IORESOURCE_MEM) {
> +			pdev_addr[i].base = res[j].start;
> +			pdev_addr[i].top  = res[j].end;

I think there is an off-by-one bug in res[j].end. As per the RMM 
specification the base address is inclusive and the top address is 
exclusive. Both res[j].start and res[j].end are inclusive, and hence
res[j].end seems wrong.

> +	/* use the rid and MMIO resources of the epdev */
> +	params->rid_top = params->rid_base = rid;

Similar issue here. As per the specification the rid_base is inclusive 
and the rid_top exclusive.

- R2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ