Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp687120ybv; Fri, 7 Feb 2020 06:45:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwY181g1pfYBSrEQQvqbEbnRbyXE3aWWJQKkpIhbO12GCt6dpCZUlF4j2pSQt5AucbVfSd3 X-Received: by 2002:aca:2419:: with SMTP id n25mr2331654oic.13.1581086757322; Fri, 07 Feb 2020 06:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581086757; cv=none; d=google.com; s=arc-20160816; b=T/OyJVuX8J/8I0t10m2KB4yyrfg01tIOept5P8ztVL/asihClRmhtJe6GE/D8JK0CX nz+KogI9+uyYyLHCQraFjV9FmixHwdeGj+uo9Y6biEj3wIOcIxFKvqRUs/tyE9HamxQf tHEMs2+d1cc3b34Z4hSXBgtJyeIovCx438cVwzoVBXMU1PnSFtdTD0Gvh6f0qP4cTKAZ qWtv30qRDVYtL+JNuD7KT9O89Im5h6srPUbIz/+vYM31Svephtmz/x8XzBQBUPWAPthl WgbVl+aIsQKwIDaUGJXd7EWc17ArsDk+zj44/avQLcfTXfDx3x6BsGabERsEZkwkSYVF fg8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=KVKoOLIrAqxRriTIMyprzsenYePU9v2bGKDVZtxb8c4=; b=l3G7MAvhUdvjhoZ+gCaMdoXb7E0iXF2JYp7jnZxrREVwizOlhqLC26H4Iurq9INxEU +amTisNIvLT2TguKf7rU9TWlukK4Hr6H2mXHRiCKGaLl+RXrgzA8H/vyjM5D6/H3Y8/J fLY8/wZxlcLJqUXfnDlentq70AUyqaw9jGdkkIK9QiQFS6pbYeMB6ZQU6an3tHnignHf DUmaVQxLlMfwWxVAOkVZcuLwiLx0I6qv1ukLsE025xcUdFyssQH32utbxuEJIpjnoUNI gariPZUpvi8ZRQKzSX3bZ1NHen5Xqjwhcq4WRM18TW5vgnAJJV3nOjhKjGtFdfU4Gptl Of5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si3876839oiv.13.2020.02.07.06.45.44; Fri, 07 Feb 2020 06:45:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726951AbgBGOov (ORCPT + 99 others); Fri, 7 Feb 2020 09:44:51 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:41014 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbgBGOov (ORCPT ); Fri, 7 Feb 2020 09:44:51 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j04sB-0005PM-8I; Fri, 07 Feb 2020 15:44:47 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 71EB5100F58; Fri, 7 Feb 2020 14:44:46 +0000 (GMT) From: Thomas Gleixner To: Eric Dumazet , Ingo Molnar Cc: linux-kernel , Eric Dumazet , Eric Dumazet , Andy Lutomirski Subject: Re: [PATCH] x86/traps: do not hash pointers in handle_stack_overflow() In-Reply-To: <20200207043836.106657-1-edumazet@google.com> References: <20200207043836.106657-1-edumazet@google.com> Date: Fri, 07 Feb 2020 14:44:46 +0000 Message-ID: <87tv42xxr5.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric Dumazet writes: > Mangling stack pointers in handle_stack_overflow() is moot, > as registers (including RSP/RBP) are clear anyway. > > BUG: stack guard page was hit at 0000000063381e80 (stack is > 000000008edc5696..0000000012256c50) To illustrate your argument above it would be useful to provide the post patch output as well. > kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP KASAN > ... > RSP: 0018:ffffc90002c1ffc0 EFLAGS: 00010802 > RAX: 1ffff11004a0094c RBX: ffff888025004180 RCX: c9d82d1007bb146c > RDX: dffffc0000000000 RSI: ffff888025004a40 RDI: ffff888025004180 > RBP: ffffc90002c201c0 R08: dffffc0000000000 R09: fffffbfff1405915 > R10: fffffbfff1405915 R11: 0000000000000000 R12: ffff888025004a60 > R13: ffff888025004a10 R14: c9d82d1007bb146c R15: ffff888025004180 > ... > > Signed-off-by: Eric Dumazet > Cc: Andy Lutomirski > --- > arch/x86/kernel/traps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c > index 6ef00eb6fbb925e86109f86845e2b3ccef4023ec..44873df292bd3f9f77bb721c53cb8a1c40994cca 100644 > --- a/arch/x86/kernel/traps.c > +++ b/arch/x86/kernel/traps.c > @@ -296,7 +296,7 @@ __visible void __noreturn handle_stack_overflow(const char *message, > struct pt_regs *regs, > unsigned long fault_address) > { > - printk(KERN_EMERG "BUG: stack guard page was hit at %p (stack is %p..%p)\n", > + printk(KERN_EMERG "BUG: stack guard page was hit at %px (stack > is %px..%px)\n", While touching this, can you please switch it to pr_emerg() ? Thanks, tglx