Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp180248ybv; Thu, 6 Feb 2020 20:42:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxDh/OYVcvEuLlbFSvQ7e7oNxinWNRz/0WxyajhBhaoa7OUAYdToUAU0SGQT1sw8mdDyJkd X-Received: by 2002:aca:5254:: with SMTP id g81mr887648oib.61.1581050553329; Thu, 06 Feb 2020 20:42:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581050553; cv=none; d=google.com; s=arc-20160816; b=Hh/vdaV7Y1Ki0zrk4iNd2P8nom4hDwsIDbqNVUktkaFgoHXG+Wg7Zp43k2wq+l5+RG Hbwy/Jc1JkeheJCW6ugmm/lc20a7FrcXKTXLLfjbXjdnT9Amm7FNCUvaTz2RWkgmaHtO 66kDH8nwJaercrpLqG3Ep7Tx6iOggR1qscQvKTPMwd0HL2d6VXRGG4m5fSWqxF3O0bLS SNkJ4ryJnkNu+pUvSoTEBxx9ORxdnI11tr0twGH0g/6jnBjzLcWASin0NOaMO7o8em1K U6tU5COVNWf6hrxrhJHYAtvm/X5sU/TvBSpmLV2mU9d5JojwR9lBkNyIZT5DelGCfAuF 9now== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=sBK5cpzGHdIvUKaHqM1DgwIph0gnDXoiKcHaONWU+rA=; b=Pt/BnZayNOKjdByh6ICX5IhVMprSG2ta6qIxmckoQde7mfNimeE1Y709qUJuHTlc6U o3VFaI2dhZesRXl+ao4nsoDNS6yIpJcmaBCcEPSlkVr4KWBCR792wmgP59bVAQN+RWqS vwXv2jRP2lKbJ9VZHEAhaFeHNHgtShwWZlu3gj5zgHo63w9E96eUPUru0uy5ORBez2HI +PAbAAjc1Z+k6zz71EBHrFG6jK9mEbEGzMEkH/wKwTgHXln0+LSRefQY7JtZImIUkZ99 +e0J116nN90GYp7iqhDtgt1cXCrBDkIf0iQbX7pz0zVBX4Ynpozn3iVAAvlxVazZW8oO ljqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="JNLE/o0U"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l84si3365450oig.5.2020.02.06.20.42.14; Thu, 06 Feb 2020 20:42:33 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="JNLE/o0U"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbgBGEil (ORCPT + 99 others); Thu, 6 Feb 2020 23:38:41 -0500 Received: from mail-vk1-f201.google.com ([209.85.221.201]:36461 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbgBGEil (ORCPT ); Thu, 6 Feb 2020 23:38:41 -0500 Received: by mail-vk1-f201.google.com with SMTP id j25so494937vkn.3 for ; Thu, 06 Feb 2020 20:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=sBK5cpzGHdIvUKaHqM1DgwIph0gnDXoiKcHaONWU+rA=; b=JNLE/o0Uutt+U6wL5PzjCJyy0nAXeXri1cda0G4JS4P2v+vnWMR4H1/o1TiBn6vL2Q 3nh6zs+he2dhoU7JvePW9hMesQWhf+nQ4QeV2R1+pAWb1j8l/0y/3IbSn/q2vSvJkIUg yp6UOMAItxzc3ikmNvNi/EjU7VCnwQnuFfOauHXY7hVC18TsSOfhPrLEBww8lXYiTJj0 QLRXTvwbyQCFyx9oGwusnk4SejUp7OSYMW3bc+u84gjVz7PcIeoSp9ygOZWshFdo0r5v S1TjfkhPAga2GgrGPhHz/xSqAJmQ/HIWuVY2E4VbRbzCQtx8GoXjIKFp3RRYfj8wHDPd Lerw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=sBK5cpzGHdIvUKaHqM1DgwIph0gnDXoiKcHaONWU+rA=; b=STKM/yiQoFMBFZwY4DPNT9C0Bv86UynJ0+AtsPZz8zjIyhO9BHFadttLBzwc3NY/kr XsP3FPUFbIeDmWSSiSO47sFrHhpP18IA2T9BC8DPFfaE6hNvkGHN4voOll/TKMnm9Z/D WVQy7pw694TPukniUHUxUXD7yoxoLZ7kHDhcQ2o4Tf4adxdFRyU3Y1d7KPpDi6HYtJax 9ntF8nt6reOuhLKRNZMO7rAzY20a/gGisD/tBsYFB393sxHkwCOVhVnTySZT7MOdmbOS e4aNigzQvElTA/YoXXxzYbqp58BdppASFygXw6YwEQtWS5pikZ86GTvnKkbEoFEI18Cy +ieQ== X-Gm-Message-State: APjAAAX4K68yNW3PbYtZ6yiywYoykDbASfpSvdTFNS7ZIZNIwf6fieQt rEiKaXWUeze2y6DurzF5d7cZqUJyfVbiUA== X-Received: by 2002:a1f:bd8d:: with SMTP id n135mr3841794vkf.88.1581050319527; Thu, 06 Feb 2020 20:38:39 -0800 (PST) Date: Thu, 6 Feb 2020 20:38:36 -0800 Message-Id: <20200207043836.106657-1-edumazet@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog Subject: [PATCH] x86/traps: do not hash pointers in handle_stack_overflow() From: Eric Dumazet To: Ingo Molnar Cc: linux-kernel , Eric Dumazet , Eric Dumazet , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) 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", (void *)fault_address, current->stack, (char *)current->stack + THREAD_SIZE - 1); die(message, regs, 0); -- 2.25.0.341.g760bfbb309-goog