From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751709AbeANOiV (ORCPT + 1 other); Sun, 14 Jan 2018 09:38:21 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:37822 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbeANOiU (ORCPT ); Sun, 14 Jan 2018 09:38:20 -0500 Date: Sun, 14 Jan 2018 15:38:08 +0100 (CET) From: Thomas Gleixner To: Ingo Molnar cc: hpa@zytor.com, dvyukov@google.com, aryabinin@virtuozzo.com, glider@google.com, linux-kernel@vger.kernel.org, xiaolong.ye@intel.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/mm] x86/kasan: Panic if there is not enough memory to boot In-Reply-To: <20180114130756.zkysoiwaqfso2ml4@gmail.com> Message-ID: References: <20180110153602.18919-1-aryabinin@virtuozzo.com> <20180114130756.zkysoiwaqfso2ml4@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, 14 Jan 2018, Ingo Molnar wrote: > > * tip-bot for Andrey Ryabinin wrote: > > > Commit-ID: 74b61d1fb59bed3a6608161b05f2c0f5cb71acf6 > > Gitweb: https://git.kernel.org/tip/74b61d1fb59bed3a6608161b05f2c0f5cb71acf6 > > Author: Andrey Ryabinin > > AuthorDate: Wed, 10 Jan 2018 18:36:02 +0300 > > Committer: Thomas Gleixner > > CommitDate: Sun, 14 Jan 2018 12:59:51 +0100 > > > > x86/kasan: Panic if there is not enough memory to boot > > > > Currently KASAN doesn't panic in case it don't have enough memory > > to boot. Instead, it crashes in some random place: > > > > kernel BUG at arch/x86/mm/physaddr.c:27! > > > > RIP: 0010:__phys_addr+0x268/0x276 > > Call Trace: > > kasan_populate_shadow+0x3f2/0x497 > > kasan_init+0x12e/0x2b2 > > setup_arch+0x2825/0x2a2c > > start_kernel+0xc8/0x15f4 > > x86_64_start_reservations+0x2a/0x2c > > x86_64_start_kernel+0x72/0x75 > > secondary_startup_64+0xa5/0xb0 > > > > Use memblock_virt_alloc_try_nid() for allocations without failure > > fallback. It will panic with an out of memory message. > > > > Reported-by: kernel test robot > > Signed-off-by: Andrey Ryabinin > > Signed-off-by: Thomas Gleixner > > Acked-by: Dmitry Vyukov > > Cc: kasan-dev@googlegroups.com > > Cc: Alexander Potapenko > > Cc: lkp@01.org > > Link: https://lkml.kernel.org/r/20180110153602.18919-1-aryabinin@virtuozzo.com > > I think this commit should be in tip:x86/pti for dependency reasons, to get > backported automatically. I suspect we want the same KASAN robustness in -stable. > > If this patch is too high risk and should be in x86/mm, then it should still be > x86/pti based, to allow later merging into x86/pti. > > The latest already-upstream commit of x86/pti is de791821c295, and this commit > applies cleanly to that base. makes sense. I'll move it to x86/pti ...