From: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] c/r: support ipc shm regions which are partially mapped
Date: Mon, 09 Aug 2010 11:23:43 -0700 [thread overview]
Message-ID: <87lj8fk5lc.fsf@caffeine.danplanet.com> (raw)
In-Reply-To: 1281129532-4041-1-git-send-email-orenl@cs.columbia.edu
This *almost* fixes it for me.
OL> + ret = do_shmat_pgoff(shmid, (char __user *) start, shmflg,
OL> + &addr, h->vm_end - h->vm_start, h->vm_pgoff);
As discussed on IRC, h->vm_pgoff needs to be <<PAGE_SHIFT'ed here.
Also, since do_shmat_pgoff() checks the inode size and compares it to
the vma size, (h->vm_end - h->vm_start) may not always be correct. We
should pass the smaller of the inode and vma sizes here.
Other than that, it looks good and works well for me :)
Thanks!
--
Dan Smith
IBM Linux Technology Center
email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
prev parent reply other threads:[~2010-08-09 18:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 21:18 [PATCH] c/r: support ipc shm regions which are partially mapped Oren Laadan
2010-08-09 18:23 ` Dan Smith [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=87lj8fk5lc.fsf@caffeine.danplanet.com \
--to=danms-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.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