Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6016627ybc; Wed, 27 Nov 2019 13:27:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzJyOlwckKPMajIOPIG+nbx0KBuhKKIUYGhowAIf0oUhXU0ETUhiJu1G0eWoa60tzOg9AyD X-Received: by 2002:a17:906:2893:: with SMTP id o19mr52402686ejd.32.1574890074397; Wed, 27 Nov 2019 13:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890074; cv=none; d=google.com; s=arc-20160816; b=nEWk1pHQhdeE5CPnAwvzz+F88NJFY98rNWCC29W5h6ougYU1IVWTDgkmoUsWSl7YrN QN7nadRTgJhzSc8M3QlMSgZ3BDkl/aCjt25P8mH/NTdshYB82g40kiTh6d5GpkPQiLai sP4zlDlH4PNI/2egLojMDPg9UMA+qVf3+QHnJOkgyAlOl5usGaNOQPn5gcgGRjOLEmPf htsMDdVFZ4VztFdw6npQ74DV/1naX2cP/RLrhKBXjVY7/J2cNCuP1kdaloXlqM2mtQQl QqWQtagBerjpl0zVnCAgcGP8TqcfXG8CW7EG9ZpySRfoW9MmEefHLT6Xx2JJL4V9J5Ip 4WUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h+al/J01ONwLft8gj6GA+v7TZ6xRrDJBmH+hXRdB534=; b=StTb/Bn+AjyxGdVFPvBhWa56C/FpWkmb4il9bU17Jjvmkkjtq4v9xgL2xqxgBMeglY bbwdwMzl/mt67STYxeEKVgpIX6bK6OKG0jIeS0r3Gow6PilYVReHf9n+VVsVfG+EfJmh +K7PKRQWYhjGsBsECYTPzUr5+lsQ+gLM+c811Nm1bNA+jeobxl3DHBwde5nI6cZ3fSIN 65rEmIh4rm8cg7onlJHy6cXN+LnIDogKvEgidJHKnph0fSyKnFMjXGckviI8wB0U+qOi 8ELpWzGRP/079MqotL8HNYbQnydndKO2dFHfeQuT/G+OePyyOHO4D1MhArFTPw+qRvjp j3uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pUT7eN8J; 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 f19si4733981edq.319.2019.11.27.13.27.30; Wed, 27 Nov 2019 13:27:54 -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=@kernel.org header.s=default header.b=pUT7eN8J; 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 S1731915AbfK0VCk (ORCPT + 99 others); Wed, 27 Nov 2019 16:02:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:55382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731916AbfK0VCi (ORCPT ); Wed, 27 Nov 2019 16:02:38 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0D7721771; Wed, 27 Nov 2019 21:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888557; bh=mVdXT8KgpU+9tvB2z5w+5sXBmDF6P0AEXBz5zUQsBtY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pUT7eN8J4FZPR/CaIf2ZlX16SS+ki4DKC092wz18g8G9o/uvkUTQ1x6RMovWYCx1S NOlCFSjBg49bO3TACpHZM7cJVYuCnOXg6r4xOp5vlAr5CyxLYVxBWiocWyhdC7qIoj fowg20PkcXvv+TqiA2mh3LaagtragYV66Lz21KNg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Borislav Petkov , Kees Cook , Masahiro Yamada , "Steven Rostedt (VMware)" , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 179/306] kernel/panic.c: do not append newline to the stack protector panic string Date: Wed, 27 Nov 2019 21:30:29 +0100 Message-Id: <20191127203128.406585408@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov [ Upstream commit 95c4fb78fb23081472465ca20d5d31c4b780ed82 ] ... because panic() itself already does this. Otherwise you have line-broken trailer: [ 1.836965] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: pgd_alloc+0x29e/0x2a0 [ 1.836965] ]--- Link: http://lkml.kernel.org/r/20181008202901.7894-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Kees Cook Cc: Masahiro Yamada Cc: "Steven Rostedt (VMware)" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/panic.c b/kernel/panic.c index 72e001e3753e3..8138a676fb7d1 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -636,7 +636,7 @@ device_initcall(register_warn_debugfs); */ __visible void __stack_chk_fail(void) { - panic("stack-protector: Kernel stack is corrupted in: %pB\n", + panic("stack-protector: Kernel stack is corrupted in: %pB", __builtin_return_address(0)); } EXPORT_SYMBOL(__stack_chk_fail); -- 2.20.1