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: <38b02ca5-59dd-4193-bea7-e15e4f5f426e@oracle.com>
Date: Wed, 26 Mar 2025 18:37:35 -0500
From: Mike Christie <michael.christie@...cle.com>
To: Dongli Zhang <dongli.zhang@...cle.com>, virtualization@...ts.linux.dev,
        kvm@...r.kernel.org, netdev@...r.kernel.org
Cc: mst@...hat.com, jasowang@...hat.com, pbonzini@...hat.com,
        stefanha@...hat.com, eperezma@...hat.com, joao.m.martins@...cle.com,
        joe.jin@...cle.com, si-wei.liu@...cle.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/10] vhost-scsi: cache log buffer in I/O queue
 vhost_scsi_cmd

On 3/17/25 7:04 PM, Dongli Zhang wrote:
> @@ -1390,6 +1424,24 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
>  			goto err;
>  		}
> 
> +		if (unlikely(vq_log && log_num)) {
> +			if (!cmd->tvc_log)
> +				cmd->tvc_log = kmalloc_array(vq->dev->iov_limit,
> +							     sizeof(*cmd->tvc_log),
> +							     GFP_KERNEL);
> +
> +			if (likely(cmd->tvc_log)) {
> +				memcpy(cmd->tvc_log, vq->log,> +				       sizeof(*cmd->tvc_log) * log_num);
> +				cmd->tvc_log_num = log_num;


Hey Dongli, this approach seems ok.

Could you just move this to a function?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ