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: <36895817-8f71-461a-93e0-5db1a39cd3c4@intel.com>
Date: Fri, 9 Feb 2024 13:17:27 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Fenghua Yu <fenghua.yu@...el.com>, Vinod Koul <vkoul@...nel.org>
Cc: dmaengine@...r.kernel.org, linux-kernel <linux-kernel@...r.kernel.org>,
 Lingyan Guo <lingyan.guo@...el.com>
Subject: Re: [PATCH] dmaengine: idxd: Clear Event Log head in idxd upon
 completion of the Enable Device command



On 2/9/24 12:18 PM, Fenghua Yu wrote:
> If Event Log is supported, upon completion of the Enable Device command,
> the Event Log head in the variable idxd->evl->head should be cleared to
> match the state of the EVLSTATUS register. But the variable is not reset
> currently, leading mismatch of the variable and the register state.
> The mismatch causes incorrect processing of Event Log entries.
> 
> Fix the issue by clearing the variable after completion of the command.

Should this be done in idxd_device_clear_state() instead?

> 
> Fixes: 2f431ba908d2 ("dmaengine: idxd: add interrupt handling for event log")
> Tested-by: Lingyan Guo <lingyan.guo@...el.com>
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
> ---
>  drivers/dma/idxd/device.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index ecfdf4a8f1f8..7c9fb9b3e110 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -546,6 +546,14 @@ int idxd_device_enable(struct idxd_device *idxd)
>  		return -ENXIO;
>  	}
>  
> +	/*
> +	 * If Event Log is supported, Event Log Status register was
> +	 * cleared after the Enable Device command. Clear Event Log
> +	 * head value that is stored in idxd to match the register state.
> +	 */
> +	if (idxd->evl)
> +		idxd->evl->head = 0;
> +
>  	idxd->state = IDXD_DEV_ENABLED;
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ