mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Casey Leedom <casey_leedom@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: ZERO_PAGE() vs. loadable modules in Redhat 4.4 i386 kernels ...
Date: Wed, 27 Jun 2007 11:12:08 -0700 (PDT)	[thread overview]
Message-ID: <20070627181208.98426.qmail@web30504.mail.mud.yahoo.com> (raw)

Hello,

  I'm working on a driver that does a get_user_pages() for a DMA write.  We
have a timeout on the DMA completion where we mark the pages as COW and return
to the application so it can potentially generate more data in order to
increase throughput, etc.  The problem is that when we traverse the
PGT/PUD/PMD/PTE hierarchy to mark the pages, we sometime fault out when the PUD
covering [0x80000000, 0xc0000000) comes out as zero when that entire region is
covered by a single large malloc()'ed buffer.  This happens because
get_user_pages() returns a reference to empty_zero_page without passing through
the fault path when a page is backed by anonymous memory.  I put a check this
in my driver using ZERO_PAGE() and everything is great.  Except that it doesn't
work on 32-bit i386 Redhat 4.4 kernels because the symbol for empty_zero_page
is not only not exported via EXPORT_SYMBOL() but has also somehow been stripped
from the kallsyms table.  This means that I can't check for the ZERO_PAGE() in
a module.

  Can someone suggest a better way of doing this?  Either by some subterfuge to
get empty_zero_page or perhaps by asking the kernel to instantiate the
PGT/PUD/PMD/PTE hierarchy for a page?  I'm sort of stuck here.  Thanks for any
help and/or advice you can offer.

Casey

             reply	other threads:[~2007-06-27 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 18:12 Casey Leedom [this message]
2007-06-27 18:39 ` Arjan van de Ven
2007-06-27 18:53   ` Casey Leedom
2007-06-27 20:18     ` Arjan van de Ven
2007-06-27 21:40       ` Casey Leedom
2007-06-27 22:43         ` Casey Leedom
2007-06-27 19:02 ` Hugh Dickins
2007-06-27 19:13   ` Casey Leedom

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=20070627181208.98426.qmail@web30504.mail.mud.yahoo.com \
    --to=casey_leedom@yahoo.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®