Re: How to tell whether an address is from low-memory or high-memory ?

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

 



I am doing porting work; hence I am not referring to any existing architecture.

The reason for my questions was to understand how and where does Linux
insures that userspace addresses do not conflict with kernelspace
addresses within a process address space ?

In other words, when a userspace virtual address mapping is created in
a process address space, how and where does Linux insures that it does
not conflict with addresses returned by kmalloc() ?

Searching the Internet returned that kmalloc() always return an
address in low-memory, and that it is always a 1-to-1 mapping to
physical memory; while userspace virtual address mapping reside in
high-memory; however, I could not find where in the Linux kernel the
low-memory or high-memory mapping range is defined.

Any help understanding how Linux insures that userspace addresses do
not conflict with kernelspace addresses would be much appreciated ?


On Thu, Nov 14, 2019 at 3:55 PM Jonathon Reinhart
<jonathon.reinhart@xxxxxxxxx> wrote:
>
> What architecture are you referring to?
>
> "High memory" and "Low memory" apply to x86_32 (see arch/x86/Kconfig),
> but not to x86_64, where all physical memory is directly usable by the
> kernel (see Documentation/x86/x86_64/mm.rst).
>
> On Thu, Nov 14, 2019 at 4:30 PM William Tambe <tambewilliam@xxxxxxxxx> wrote:
> >
> > How to tell whether an address is from low-memory or high-memory ?
> >
> > And are addresses in low-memory always a 1-to-1 mapping to physical memory ?



[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux