kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Sadanand Warrier <sadanandwarrier@gmail.com>
To: Kernelnewbies@kernelnewbies.org
Subject: get_user_pages and pinning
Date: Sat, 2 Jan 2021 07:39:08 -0500	[thread overview]
Message-ID: <CADJuq2zgG0FRYpNdFknoCBYAu-=ZG1XqdqW=Zkjp_cP8Tn01Ww@mail.gmail.com> (raw)

Folks
   Since Linux uses lazy evaluation with respect to allocating memory
what happens if a user process allocates memory using malloc in excess
of say 8 or nine pages and calls a device ioctl and passes the user
space pointer to it to be used to pin pages using get_user_pages().
This buffer is to be used for a dma read from a device.
What happens if the memory isn't actually allocated (no initialization
with memset or calloc etc. and all PTEs are pointing to some zero
filled page) and there is no IOMMU?
Thanks

S

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2021-01-02 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 12:39 Sadanand Warrier [this message]
2021-01-02 13:08 ` get_user_pages and pinning Cengiz Can
2021-01-03 17:54   ` Sadanand Warrier
2021-01-03 18:26     ` Rik van Riel
2021-01-03 18:54       ` Sadanand Warrier
2021-01-02 13:20 ` Greg KH
2021-01-02 15:11   ` Sadanand Warrier
2021-01-03 17:58 Sadanand Warrier

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='CADJuq2zgG0FRYpNdFknoCBYAu-=ZG1XqdqW=Zkjp_cP8Tn01Ww@mail.gmail.com' \
    --to=sadanandwarrier@gmail.com \
    --cc=Kernelnewbies@kernelnewbies.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).