From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Dmitry Vyukov <dvyukov@google.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: kernel test robot <xiaolong.ye@intel.com>,
Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Borislav Petkov <bp@alien8.de>, Brian Gerst <brgerst@gmail.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
David Laight <David.Laight@aculab.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Eduardo Valentin <eduval@amazon.com>,
Greg KH <gregkh@linuxfoundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Juergen Gross <jgross@suse.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will.deacon@arm.com>,
LKML <linux-kernel@vger.kernel.org>,
tipbuild@zytor.com, LKP <lkp@01.org>,
Alexander Potapenko <glider@google.com>,
kasan-dev <kasan-dev@googlegroups.com>
Subject: Re: [lkp-robot] [x86/cpu_entry_area] 10043e02db: kernel_BUG_at_arch/x86/mm/physaddr.c
Date: Thu, 28 Dec 2017 19:01:41 +0300 [thread overview]
Message-ID: <5cac9d39-dc2e-e671-cd16-ad32e014fd27@virtuozzo.com> (raw)
In-Reply-To: <CACT4Y+aEMHEYVF+XW_BwUJUY215Xy_t4vv4vwRzOw5YfzkiBgA@mail.gmail.com>
On 12/27/2017 09:12 PM, Dmitry Vyukov wrote:
>>
>> Not really a problem caused by the patch above, it's merily exposing a code
>> path which relies blindly on "enough memory available" assumptions.
>>
>> Throwing more memory at the VM makes the problem go away...
>
> Hi Thomas,
>
> We just need a check inside of early_alloc() to properly diagnose such
> situation, right?
> KASAN allocates 1/8 of physical memory, so the code has _some_ logic
> behind it. But I guess it runs into a corner case where 1/8 is somehow
> larger than 1 :)
>
We may simply don't have 1/8 available. And we actually need slightly more
than 1/8. Kernel image is present in 2 locations (direct mapping/kernel mapping)
so at least ram/8 + kernel_size/8. The same for cpu_entry_area. Plus some memory
to build page tables.
And note that kernel_size could be hundreds of megabytes.
next prev parent reply other threads:[~2017-12-28 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-26 2:03 [lkp-robot] [x86/cpu_entry_area] 10043e02db: kernel_BUG_at_arch/x86/mm/physaddr.c kernel test robot
2017-12-27 18:05 ` Thomas Gleixner
2017-12-27 18:12 ` Dmitry Vyukov
2017-12-28 11:51 ` Thomas Gleixner
2017-12-28 11:54 ` Dmitry Vyukov
2017-12-28 16:18 ` Andrey Ryabinin
2018-01-10 9:36 ` Dmitry Vyukov
2017-12-28 16:01 ` Andrey Ryabinin [this message]
2018-01-10 15:36 ` [PATCH] x86/kasan: panic if there is not enough memory to boot Andrey Ryabinin
2018-01-10 15:40 ` Dmitry Vyukov
2018-01-14 12:04 ` [tip:x86/mm] x86/kasan: Panic " tip-bot for Andrey Ryabinin
2018-01-14 13:07 ` Ingo Molnar
2018-01-14 14:38 ` Thomas Gleixner
2018-01-14 14:46 ` [tip:x86/pti] " tip-bot for Andrey Ryabinin
2018-01-14 23:37 ` tip-bot for Andrey Ryabinin
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=5cac9d39-dc2e-e671-cd16-ad32e014fd27@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=David.Laight@aculab.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=dvlasenk@redhat.com \
--cc=dvyukov@google.com \
--cc=eduval@amazon.com \
--cc=glider@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tipbuild@zytor.com \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
--cc=xiaolong.ye@intel.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