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: <ZIjnGiMbih0sjn3g@kbusch-mbp.dhcp.thefacebook.com>
Date:   Tue, 13 Jun 2023 16:00:58 -0600
From:   Keith Busch <kbusch@...nel.org>
To:     Breno Leitao <leitao@...ian.org>
Cc:     Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>, leit@...com,
        "open list:NVM EXPRESS DRIVER" <linux-nvme@...ts.infradead.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvme: Print capabilities changes just once

On Tue, Jun 13, 2023 at 10:55:37AM -0700, Breno Leitao wrote:
> This current dev_info() could be very verbose and being printed very
> frequently depending on some userspace application sending some specific
> commands.
> 
> Let's turn it into a dev_info_once(), since it is not useful to know
> about it all the time.

This looks good to me. Vendors sometimes put unnecessary effects in the
log, and spamming the same recommendation to repeated operations isn't
going to be helpful. I expect anyone who knows what they're doing can
consult the effects log directly and take appropriate action on their
own.

Reviewed-by: Keith Busch <kbusch@...nel.org>
 
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
>  drivers/nvme/host/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 3ec38e2b9173..459e5a84e596 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1134,7 +1134,7 @@ void nvme_passthru_end(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u32 effects,
>  		mutex_unlock(&ctrl->scan_lock);
>  	}
>  	if (effects & NVME_CMD_EFFECTS_CCC) {
> -		dev_info(ctrl->device,
> +		dev_info_once(ctrl->device,
>  "controller capabilities changed, reset may be required to take effect.\n");
>  	}
>  	if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) {
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ