Re: pte Not Present?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Well, the address that was in fact 0xc005000. I've made a mistake.

It seems strange that the correspondent pte_t is NOT_PRESENT, since that
address belongs to the kernel code.

I used something like:

pgd_t dir = pgd_offset(current->mm,addr);
pmd_t pmd = pmd_offset(dir,addr);
pte_t pte = pte_alloc_offset(pmd,addr);

Regards,

Pedro.

----- Original Message -----
From: "Rik van Riel" <riel@conectiva.com.br>
To: "Pedro Nunes da Costa" <pncosta@dei.uc.pt>
Cc: "Linux Kernel Newbie" <kernelnewbies@nl.linux.org>
Sent: Thursday, November 14, 2002 2:03 AM
Subject: Re: pte Not Present?


> On Wed, 13 Nov 2002, Pedro Nunes da Costa wrote:
>
> > I'm writing a kernel module.
> >
> > When I try to obtain the pte of an address like 0x0005000, I get
informed that pte is not present.
> >
> > That is not possible. It's Kernel code!!
>
> Well, it is possible. It's even expected, since the kernel also
> lives in virtual (though non-pageable) memory.
>
> The kernel's memory might start at physical address 0, but it is
> mapped into the kernel's page tables from virtual address 0xc0000000.
>
> regards,
>
> Rik
> --
> Bravely reimplemented by the knights who say "NIH".
> http://www.surriel.com/ http://guru.conectiva.com/
> Current spamtrap:  <a
href=mailto:"october@surriel.com";>october@surriel.com</a>
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux