From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Rohit Seth <rohit.seth@intel.com>
Subject: Re: [patch] futex-2.5.40-B5
Date: Sat, 05 Oct 2002 04:00:10 +0400 [thread overview]
Message-ID: <3D9E2B8A.653BEF9D@tv-sign.ru> (raw)
Hello.
Ingo Molnar wrote:
> the new lookup code first does a lightweight follow_page(), then if no
> page is present we do the get_user_pages() thing.
What if futex placed in VM_HUGETLB area?
Then follow_page() return garbage.
I beleive in i386 case it can be fixed something like this:
--- mm/memory.c.orig Sat Oct 5 01:08:54 2002
+++ mm/memory.c Sat Oct 5 03:31:28 2002
@@ -480,6 +480,17 @@ follow_page(struct mm_struct *mm, unsign
if (pmd_none(*pmd) || pmd_bad(*pmd))
goto out;
+#ifdef CONFIG_HUGETLB_PAGE
+ if (pmd_large(pmd)) {
+ ptep = (pte_t *) pmd;
+
+ if (write && !pte_write(*ptep))
+ return NULL;
+
+ return pte_page(*ptep) + ((address & ~HPAGE_MASK) >> PAGE_SHIFT);
+ }
+#endif
+
ptep = pte_offset_map(pmd, address);
if (!ptep)
goto out;
Then follow_hugetlb_page() hook can be killed.
Oleg.
next reply other threads:[~2002-10-04 23:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-05 0:00 Oleg Nesterov [this message]
2002-10-05 0:42 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2002-10-05 0:53 Seth, Rohit
2002-10-02 18:14 Martin Wirth
2002-10-02 12:14 Ingo Molnar
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=3D9E2B8A.653BEF9D@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rohit.seth@intel.com \
/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®