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]
Date:	Wed, 21 Aug 2013 00:26:04 -0700
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	"Nicholas A. Bellinger" <nab@...erainc.com>,
	target-devel <target-devel@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	Christoph Hellwig <hch@....de>, Hannes Reinecke <hare@...e.de>,
	Martin Petersen <martin.petersen@...cle.com>,
	Chris Mason <chris.mason@...ionio.com>,
	James Bottomley <JBottomley@...allels.com>
Subject: Re: [PATCH 6/9] target: Allow sbc_ops->execute_rw() to accept SGLs
 + data_direction

On Tue, 2013-08-20 at 23:35 -0700, Christoph Hellwig wrote:
> On Tue, Aug 20, 2013 at 08:07:57PM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@...erainc.com>
> > 
> > COMPARE_AND_WRITE expects to be able to send down a DMA_FROM_DEVICE
> > to obtain the necessary READ payload for comparision against the
> > first half of the WRITE payload containing the verify user data.
> > 
> > Currently virtual backends expect to internally reference SGLs,
> > SGL nents, and data_direction, so change IBLOCK, FILEIO and RD
> > sbc_ops->execute_rw() to accept this values as function parameters.
> > 
> > Also add the sbc_execute_rw() wrapper to handle the special case
> > for the initial COMPARE_AND_WRITE DMA_FROM_DEVICE -> READ I/O
> > submission.
> 
> I don't like the way this is structured with the new method.  It seems
> like we should just pass the sgl and associated data to execute_cmd
> and have the read vs write logic driven by command code, using generic
> flags instead of specificly checking for compare and write.

I considered that approach as well, but in the end all of the non
sbc_ops->execute_rw() users of se_cmd->execute_cmd() will never make use
of a passed *sgl, sgl_nents, or data_direction that is different than
se_cmd assignments.

So in the end, the approach of changing all se_cmd->execute_cmd() users
to accommodate COMPARE_AND_WRITE did not end up making sense outside of
this particular special case..

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ