| To: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [CRYPTO] Fix stack overrun in crypt() |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Wed, 21 Jul 2004 15:02:19 -0700 |
| Cc: | jmorris@xxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040715114840.GA1325@xxxxxxxxxxxxxxxxxxx> |
| References: | <20040715114840.GA1325@xxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 15 Jul 2004 21:48:40 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> PS I think someone should double-check the logic in the scatterwalk
> stuff, especially the whichbuf bits.
The goal of scatterwalk_whichbuf() is to use the temporary buffer
if we are walking over a page boundary.
We can use walk->data, and thus directly the page involved, if
we do not cross such a boundary. The test is that all of the
following conditions pass:
1) nbytes is <= walk->len_this_page
When scatterwalk_start() is invoked, walk->len_this_page
is set to the minimum of the remaining scatterlist segment
length and the remaining bytes in that page itself.
2) walk->data + nbytes does not straddle a PAGE_CACHE_SIZE
boundary
This looks all fine to me.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [CRYPTO] Fix stack overrun in crypt(), David S. Miller |
|---|---|
| Next by Date: | Re: [PATCH] br2684 - use try_module_get appropriately, David S. Miller |
| Previous by Thread: | Re: [CRYPTO] Fix stack overrun in crypt(), David S. Miller |
| Next by Thread: | [0/2] CARP implementation. HA master's failover., Evgeniy Polyakov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |