From: "David S. Miller" <davem@redhat.com>
To: "Mika Penttilä" <mika.penttila@kolumbus.fi>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: cryptoapi incorrect struct page usage
Date: Sat, 9 Aug 2003 13:36:37 -0700 [thread overview]
Message-ID: <20030809133637.137e8128.davem@redhat.com> (raw)
In-Reply-To: <3F355AB0.6@kolumbus.fi>
On Sat, 09 Aug 2003 23:33:52 +0300
Mika Penttilä <mika.penttila@kolumbus.fi> wrote:
> sg[elt].page = virt_to_page(skb->data + offset);
> sg[elt].offset = (unsigned long)(skb->data + offset) % PAGE_SIZE;
> sg[elt].length = copy;
>
> so unpinned pages are passed to cryptoapi. Nothing prevents these pages
> from being swapped out. Something like get_user_pages() is needed to pin
> these pages for the duration of crypto operations. Comments?
The page at skb->data was allocated by the skbuff allocation
layer, it has therefore a lifetime the size of the SKB itself.
The crypto API call is finished before we can possibly free up
the SKB, so nothing bad can happen.
prev parent reply other threads:[~2003-08-09 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-09 20:33 Mika Penttilä
2003-08-09 20:36 ` David S. Miller [this message]
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=20030809133637.137e8128.davem@redhat.com \
--to=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=mika.penttila@kolumbus.fi \
/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
all inboxes | Powered by JetHome®