[lkml]   [2003]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: cryptoapi incorrect struct page usage
    On Sat, 09 Aug 2003 23:33:52 +0300
    Mika Penttilä <> 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.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:47    [W:0.019 / U:0.096 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site