Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741278 > unrolled thread
| Started by | Ingo Molnar <mingo@kernel.org> |
|---|---|
| First post | 2017-09-28 10:30 +0200 |
| Last post | 2017-09-28 12:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCHv7 10/19] x86/mm: Make __PHYSICAL_MASK_SHIFT and __VIRTUAL_MASK_SHIFT dynamic Ingo Molnar <mingo@kernel.org> - 2017-09-28 10:30 +0200
Re: [PATCHv7 10/19] x86/mm: Make __PHYSICAL_MASK_SHIFT and __VIRTUAL_MASK_SHIFT dynamic "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-09-28 12:30 +0200
Re: [PATCHv7 10/19] x86/mm: Make __PHYSICAL_MASK_SHIFT and __VIRTUAL_MASK_SHIFT dynamic Ingo Molnar <mingo@kernel.org> - 2017-09-28 12:50 +0200
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2017-09-28 10:30 +0200 |
| Subject | Re: [PATCHv7 10/19] x86/mm: Make __PHYSICAL_MASK_SHIFT and __VIRTUAL_MASK_SHIFT dynamic |
| Message-ID | <uuCmK-6C9-31@gated-at.bofh.it> |
* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
> --- a/arch/x86/mm/dump_pagetables.c
> +++ b/arch/x86/mm/dump_pagetables.c
> @@ -82,8 +82,8 @@ static struct addr_marker address_markers[] = {
> { 0/* VMALLOC_START */, "vmalloc() Area" },
> { 0/* VMEMMAP_START */, "Vmemmap" },
> #ifdef CONFIG_KASAN
> - { KASAN_SHADOW_START, "KASAN shadow" },
> - { KASAN_SHADOW_END, "KASAN shadow end" },
> + { 0/* KASAN_SHADOW_START */, "KASAN shadow" },
> + { 0/* KASAN_SHADOW_END */, "KASAN shadow end" },
What's this? Looks hacky.
Thanks,
Ingo
[toc] | [next] | [standalone]
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Date | 2017-09-28 12:30 +0200 |
| Message-ID | <uuEeT-7MF-19@gated-at.bofh.it> |
| In reply to | #1741278 |
On Thu, Sep 28, 2017 at 10:28:13AM +0200, Ingo Molnar wrote:
>
> * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
>
> > --- a/arch/x86/mm/dump_pagetables.c
> > +++ b/arch/x86/mm/dump_pagetables.c
> > @@ -82,8 +82,8 @@ static struct addr_marker address_markers[] = {
> > { 0/* VMALLOC_START */, "vmalloc() Area" },
> > { 0/* VMEMMAP_START */, "Vmemmap" },
> > #ifdef CONFIG_KASAN
> > - { KASAN_SHADOW_START, "KASAN shadow" },
> > - { KASAN_SHADOW_END, "KASAN shadow end" },
> > + { 0/* KASAN_SHADOW_START */, "KASAN shadow" },
> > + { 0/* KASAN_SHADOW_END */, "KASAN shadow end" },
>
> What's this? Looks hacky.
KASAN_SHADOW_START and KASAN_SHADOW_END depend on __VIRTUAL_MASK_SHIFT,
which is dynamic for boot-time switching case. It means we cannot
initialize the corresponding address_markers fields compile-time, so we do
it boot-time.
I used the same approach we use to deal with dynamic VMALLOC_START,
VMEMMAP_START and PAGE_OFFSET.
--
Kirill A. Shutemov
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2017-09-28 12:50 +0200 |
| Message-ID | <uuEye-7SR-23@gated-at.bofh.it> |
| In reply to | #1741399 |
* Kirill A. Shutemov <kirill@shutemov.name> wrote:
> On Thu, Sep 28, 2017 at 10:28:13AM +0200, Ingo Molnar wrote:
> >
> > * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
> >
> > > --- a/arch/x86/mm/dump_pagetables.c
> > > +++ b/arch/x86/mm/dump_pagetables.c
> > > @@ -82,8 +82,8 @@ static struct addr_marker address_markers[] = {
> > > { 0/* VMALLOC_START */, "vmalloc() Area" },
> > > { 0/* VMEMMAP_START */, "Vmemmap" },
> > > #ifdef CONFIG_KASAN
> > > - { KASAN_SHADOW_START, "KASAN shadow" },
> > > - { KASAN_SHADOW_END, "KASAN shadow end" },
> > > + { 0/* KASAN_SHADOW_START */, "KASAN shadow" },
> > > + { 0/* KASAN_SHADOW_END */, "KASAN shadow end" },
> >
> > What's this? Looks hacky.
>
> KASAN_SHADOW_START and KASAN_SHADOW_END depend on __VIRTUAL_MASK_SHIFT,
> which is dynamic for boot-time switching case. It means we cannot
> initialize the corresponding address_markers fields compile-time, so we do
> it boot-time.
Yes, so please instead of just commenting out the values, please do something like
this:
/*
* This field gets initialized with the (dynamic) KASAN_SHADOW_END value
* in boot_fn_foo()
*/
{ 0, "KASAN shadow end" },
where boot_fn_foo() is the function where this all gets set up.
Thanks,
Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web