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]
Date: Wed, 3 Apr 2024 16:43:45 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Huang Ying <ying.huang@...el.com>
CC: Dan Williams <dan.j.williams@...el.com>, <linux-cxl@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cxl/hdm: Add debug message for invalid interleave
 granularity

On Tue,  2 Apr 2024 14:10:16 +0800
Huang Ying <ying.huang@...el.com> wrote:

> There's no debug message for invalid interleave granularity.  This
> makes it hard to debug related bugs.  So, this is added in this patch.
> 
> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
That is indeed odd given similar code around it.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>

> ---
>  drivers/cxl/core/hdm.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> index 7d97790b893d..973a27543ed5 100644
> --- a/drivers/cxl/core/hdm.c
> +++ b/drivers/cxl/core/hdm.c
> @@ -888,8 +888,12 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
>  	}
>  	rc = eig_to_granularity(FIELD_GET(CXL_HDM_DECODER0_CTRL_IG_MASK, ctrl),
>  				 &cxld->interleave_granularity);
> -	if (rc)
> +	if (rc) {
> +		dev_warn(&port->dev,
> +			 "decoder%d.%d: Invalid interleave granularity (ctrl: %#x)\n",
> +			 port->id, cxld->id, ctrl);
>  		return rc;
> +	}
>  
>  	dev_dbg(&port->dev, "decoder%d.%d: range: %#llx-%#llx iw: %d ig: %d\n",
>  		port->id, cxld->id, cxld->hpa_range.start, cxld->hpa_range.end,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ