Received: by 10.213.65.68 with SMTP id h4csp465227imn; Tue, 13 Mar 2018 09:55:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELtzDStvpl4y+p2NdWxNhgDnFrSLxFUSslt/smQdkY9qlk6eSDDhBrsPXgf3Gxf9sDV4n5Rk X-Received: by 10.98.60.15 with SMTP id j15mr1255551pfa.7.1520960119019; Tue, 13 Mar 2018 09:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960118; cv=none; d=google.com; s=arc-20160816; b=WvR2T1LiIi8nLoFXBTljyulafJEMWG6nWhA5318LHIrCs5WXlcJH6CQhaBVVGwLm4f 8wiRNnptXArkQ/9ChJZwppp8HdBEQ8DwrcGq2QAov0Jr9l2vvMafgWGgS5Qk0WjJOJqQ OHdxLvZba/5zmSECBwZ+WsrdltOzTavs/QCQeaE6AO1ea3rC4lQVCIe2u1MIVEKVSNJY nPQug3XKgy+KjA9k3wxns9Vva65ujvDLdcQrwiRXOji/GVFkCEbBOK+YPYMMHoIYsScR +zaFt5X6SWAZj6mhwFnWtV/b1dTasvA2+8/AfM0dywgQV/VNhq24/I0MrZF/Fp2Tw3wG ukhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qUdM0u6sCnQKT6bh+catMSGQ9YU74HAvqk2nrohjaOQ=; b=R4POuAB6PvQBGU0ICVfm9njT+JayBqdueBrMBy8l1OSI/4iY8/l4AosK6EZ0eN1y44 Ho+R1K/G8PukQXHvrHlWaR83RfrNxJ5epCw2jrxhaCTvYR89WhH1F0/cGwfQMkxiEBv3 dxwXtEa5kukJemaXaiUVNbImgarfBtJ2vYD5VYYNpUWJVhaf1kclcy3hUEt82y5nvZvR TIFi1JMWBE+wu/66uo9VZhuMhikVGKvd35jF9Fbxc93cdfoLrX4t6Wv4jVIpom+Bux4v pObZx7npO/o+wLDc2jvei1yT5nhp1Nb+jUJe80+8gYHAeAW4OkCM931Djb9F77ZW1D7U w61Q== 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 p20-v6si382883plo.643.2018.03.13.09.55.04; Tue, 13 Mar 2018 09:55:18 -0700 (PDT) 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 S1752670AbeCMPat (ORCPT + 99 others); Tue, 13 Mar 2018 11:30:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58914 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575AbeCMPap (ORCPT ); Tue, 13 Mar 2018 11:30:45 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3197611A7; Tue, 13 Mar 2018 15:30:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , Andrew Morton , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Borislav Petkov , Linus Torvalds , Richard Weinberger Subject: [PATCH 4.15 046/146] bug: use %pB in BUG and stack protector failure Date: Tue, 13 Mar 2018 16:23:33 +0100 Message-Id: <20180313152324.186566555@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kees Cook commit 0862ca422b79cb5aa70823ee0f07f6b468f86070 upstream. The BUG and stack protector reports were still using a raw %p. This changes it to %pB for more meaningful output. Link: http://lkml.kernel.org/r/20180301225704.GA34198@beast Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Signed-off-by: Kees Cook Reviewed-by: Andrew Morton Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Richard Weinberger , Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/panic.c | 2 +- lib/bug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/kernel/panic.c +++ b/kernel/panic.c @@ -640,7 +640,7 @@ device_initcall(register_warn_debugfs); */ __visible void __stack_chk_fail(void) { - panic("stack-protector: Kernel stack is corrupted in: %p\n", + panic("stack-protector: Kernel stack is corrupted in: %pB\n", __builtin_return_address(0)); } EXPORT_SYMBOL(__stack_chk_fail); --- a/lib/bug.c +++ b/lib/bug.c @@ -191,7 +191,7 @@ enum bug_trap_type report_bug(unsigned l if (file) pr_crit("kernel BUG at %s:%u!\n", file, line); else - pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n", + pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", (void *)bugaddr); return BUG_TRAP_TYPE_BUG;