linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Benny Halevy <bhalevy@panasas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/12] crypto: don't pollute the global namespace with  sg_next()
Date: Thu, 10 May 2007 23:37:43 +0200	[thread overview]
Message-ID: <20070510213743.GY4163@kernel.dk> (raw)
In-Reply-To: <4643243C.8030906@panasas.com>

On Thu, May 10 2007, Benny Halevy wrote:
> Jens Axboe wrote:
> > It's a subsystem function, prefix it as such.
> 
> Jens, Boaz and I talked about this over lunch.
> I wonder whether the crypto code must use your implementation
> instead of its own as it needs to over the sglist, e.g. for
> calculating iscsi (data) digest.

The thought did cross my mind, and yes I think that would be a good
idea. The whole thing should probably just migrate to
lib/scattersomething.c

> The crypto implementation of chained sglists in crypto/scatterwalk.h
> determines the chain link by !sg->length which will sorta work
> with your implementation, however the marker bit on page pointer must
> be cleared to use it.

I don't like using sg->length, as that may be modified for legitimate
reason. That's why I chose to use the lsb bit of the page pointer.

> Also, is it possible that after the original sglist has gone through
> dma_map_sg and entries were merged, some entries will have zero
> length?  I'm not sure... If so, if the crypto implementation scans
> the sg list after it was dma mapped (maybe in a retry path) it
> may hit an entry that looks to it like a chaining link.  This
> might be an existing bug and another reason for the crypto code
> to use your implementation.

It's hard to say, depends heavily on the sub system or arch. Even if
using the pointer tagging mechanism seems a bit nasty, I think it's the
more resilient approach.

-- 
Jens Axboe


  reply	other threads:[~2007-05-10 21:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 11:40 [PATCH 0/12] Chaining sg lists for bio IO commands v4 Jens Axboe
2007-05-10 11:40 ` [PATCH 1/12] crypto: don't pollute the global namespace with sg_next() Jens Axboe
2007-05-10 13:55   ` Benny Halevy
2007-05-10 21:37     ` Jens Axboe [this message]
2007-05-11  5:20       ` Benny Halevy
2007-05-12  2:34         ` Herbert Xu
2007-05-10 11:40 ` [PATCH 2/12] Add sg helpers for iterating over a scatterlist table Jens Axboe
2007-05-10 11:40 ` [PATCH 3/12] libata: convert to using sg helpers Jens Axboe
2007-05-10 11:40 ` [PATCH 4/12] block: " Jens Axboe
2007-05-10 11:40 ` [PATCH 5/12] scsi: " Jens Axboe
2007-05-10 11:40 ` [PATCH 6/12] i386 dma_map_sg: " Jens Axboe
2007-05-10 11:40 ` [PATCH 7/12] i386 sg: add support for chaining scatterlists Jens Axboe
2007-05-10 13:00   ` Satyam Sharma
2007-05-10 13:23   ` Satyam Sharma
2007-05-10 11:40 ` [PATCH 8/12] x86-64: update iommu/dma mapping functions to sg helpers Jens Axboe
2007-05-10 13:48   ` Benny Halevy
2007-05-10 21:38     ` Jens Axboe
2007-05-21  6:32     ` Jens Axboe
2007-05-21  7:09       ` Benny Halevy
2007-05-21  7:13         ` Jens Axboe
2007-05-10 11:40 ` [PATCH 9/12] x86-64: enable sg chaining Jens Axboe
2007-05-10 11:40 ` [PATCH 10/12] scsi: simplify scsi_free_sgtable() Jens Axboe
2007-05-10 11:40 ` [PATCH 11/12] SCSI: support for allocating large scatterlists Jens Axboe
2007-05-10 11:40 ` [PATCH 12/12] ll_rw_blk: temporarily enable max_segments tweaking Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070510213743.GY4163@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=bhalevy@panasas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).