linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Tim Bird <tim.bird@am.sony.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 14(16] pramfs: memory protection
Date: Mon, 11 Oct 2010 08:57:45 +0200	[thread overview]
Message-ID: <AANLkTimGC_0W-=nSeoti6DLh5XNxvGwU6jqoGUkuOKPx@mail.gmail.com> (raw)
In-Reply-To: <87aamm3si1.fsf@basil.nowhere.org>

2010/10/10 Andi Kleen <andi@firstfloor.org>:
> Marco Stornelli <marco.stornelli@gmail.com> writes:
>> +
>> +     do {
>> +             pgd = pgd_offset(&init_mm, address);
>> +             if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
>> +                     goto out;
>> +
>> +             pud = pud_offset(pgd, address);
>> +             if (pud_none(*pud) || unlikely(pud_bad(*pud)))
>> +                     goto out;
>> +
>> +             pmd = pmd_offset(pud, address);
>> +             if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
>> +                     goto out;
>> +
>> +             ptep = pte_offset_kernel(pmd, addr);
>> +             pte = *ptep;
>> +             if (pte_present(pte)) {
>
> This won't work at all on x86 because you don't handle large
> pages.

On x86 works because I tested. Maybe there's a particular
configuration with large pages. Sincerly I'm only an "user", so if
you/Linus or others want to change it or rewrite it, for me it's ok.
The pte manipulation are a bit out of scope for a fs, so I let the
things to the mm experts.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-10-11  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-10 16:36 Marco Stornelli
2010-10-10 16:46 ` Andi Kleen
2010-10-11  6:57   ` Marco Stornelli [this message]
2010-10-11 17:32   ` Marco Stornelli
2010-10-12  7:45     ` Andi Kleen
2010-10-12 10:47       ` Marco Stornelli
2010-10-12 11:56         ` Andi Kleen

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='AANLkTimGC_0W-=nSeoti6DLh5XNxvGwU6jqoGUkuOKPx@mail.gmail.com' \
    --to=marco.stornelli@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tim.bird@am.sony.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