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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c7b96e7-ea31-1d3b-9b5c-3b89133926b5@suse.de>
Date:   Mon, 31 May 2021 17:25:38 +0200
From:   Hannes Reinecke <hare@...e.de>
To:     Daniel Wagner <dwagner@...e.de>, linux-nvme@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, Keith Busch <kbusch@...nel.org>,
        Jens Axboe <axboe@...com>, Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Subject: Re: [PATCH] nvme: verify MNAN value if ANA is enabled

On 5/31/21 12:36 PM, Daniel Wagner wrote:
> The controller is required to have a non-zero MNAN value if it supports
> ANA:
> 
>    If the controller supports Asymmetric Namespace Access Reporting, then
>    this field shall be set to a non-zero value that is less than or equal
>    to the NN value.
> 
> Signed-off-by: Daniel Wagner <dwagner@...e.de>
> ---
> This is a follow up to the discussion in
> 
>   https://lore.kernel.org/linux-nvme/20210521144734.90044-1-dwagner@suse.de/
> 
>  drivers/nvme/host/core.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index cb1a76a3d42a..4c412adc9e14 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2972,6 +2972,16 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
>  	if (ret < 0)
>  		goto out_free;
>  
> +#ifdef CONFIG_NVME_MULTIPATH
> +	if (ctrl->ana_log_buf && (!ctrl->max_namespaces ||
> +				  ctrl->max_namespaces > le32_to_cpu(id->nn))) {
> +		dev_err(ctrl->device,
> +			"Invalid MNAN value %u\n", ctrl->max_namespaces);
> +		ret = -EINVAL;
> +		goto out_free;
> +	}
> +#endif
> +
>  	if (ctrl->apst_enabled && !prev_apst_enabled)
>  		dev_pm_qos_expose_latency_tolerance(ctrl->device);
>  	else if (!ctrl->apst_enabled && prev_apst_enabled)
> 
Reviewed-by: Hannes Reinecke <hare@...e.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@...e.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ