[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1359687985.1303.15.camel@kernel>
Date: Thu, 31 Jan 2013 21:06:25 -0600
From: Simon Jeons <simon.jeons@...il.com>
To: Tang Chen <tangchen@...fujitsu.com>
Cc: Jianguo Wu <wujianguo@...wei.com>, akpm@...ux-foundation.org,
rientjes@...gle.com, len.brown@...el.com, benh@...nel.crashing.org,
paulus@...ba.org, cl@...ux.com, minchan.kim@...il.com,
kosaki.motohiro@...fujitsu.com, isimatu.yasuaki@...fujitsu.com,
wency@...fujitsu.com, hpa@...or.com, linfeng@...fujitsu.com,
laijs@...fujitsu.com, mgorman@...e.de, yinghai@...nel.org,
glommer@...allels.com, x86@...nel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-acpi@...r.kernel.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, linux-ia64@...r.kernel.org,
cmetcalf@...era.com, sparclinux@...r.kernel.org
Subject: Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory
Hi Tang,
On Fri, 2013-02-01 at 10:42 +0800, Tang Chen wrote:
I confuse!
> Hi Simon,
>
> On 02/01/2013 10:17 AM, Simon Jeons wrote:
> >> For example:
> >>
> >> 64TB, what ever
> >> xxxTB, what ever
> >> logic address space: |_____kernel_______|_________user_________________|
> >> \ \ / /
> >> \ /\ /
> >> physical address space: |___\/__\/_____________| 4GB or
> >> 8GB, what ever
> >> *****
> >
> > How much address space user process can have on x86_64? Also 8GB?
>
> Usually, we don't say that.
>
> 8GB is your physical memory, right ?
> But kernel space and user space is the logic conception in OS. They are
> in logic
> address space.
>
> So both the kernel space and the user space can use all the physical memory.
> But if the page is already in use by either of them, the other one
> cannot use it.
> For example, some pages are direct mapped to kernel, and is in use by
> kernel, the
> user space cannot map it.
How can distinguish map and use? I mean how can confirm memory is used
by kernel instead of map?
>
> >
> >>
> >> The ***** part physical is mapped to user space in the process' own
> >> pagetable.
> >> It is also direct mapped in kernel's pagetable. So the kernel can also
> >> access it. :)
> >
> > But how to protect user process not modify kernel memory?
>
> This is the job of CPU. On intel cpus, user space code is running in
> level 3, and
> kernel space code is running in level 0. So the code in level 3 cannot
> access the data
> segment in level 0.
1) If user process and kenel map to same physical memory, user process
will get SIGSEGV during #PF if access to this memory, but If user proces
s will map to the same memory which kernel map? Why? It can't access it.
2) If two user processes map to same physical memory, what will happen
if one process access the memory?
>
> Thanks. :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists