Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1925075imm; Thu, 24 May 2018 03:02:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPySIffxakoluJPcb7Jr5aEImA30eI8WBueO4AhiJomNkkeORbxj8luu4aIk91PWnPLbZe X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr6776845plb.184.1527156145030; Thu, 24 May 2018 03:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527156145; cv=none; d=google.com; s=arc-20160816; b=KXlam9NaGE1MEckjL6Nry//ht1PzusqV3v2H2q+4HK+MJbZgTuw+20nWQDUOBbb8aa PM0xHqdpJOJpAVYGLtBfZQgrqtFWCSviwbmJtS5Vs4g5NT7RtPgb3YHGhhIn3G8Pgbqb vAbuYRzWrx7jqiIJkE/Gef8DSLVxfzAgy3iEq1+I97bgqxWESubrVUr1wAYKU4cX3ou1 pMzqFQfJ3Zy2eJ6a2Qpb9n5VyW/tXP4Zn5nlsw1nU48GIhV6QGQe6CurodgQV/pHj/ca 8EuVqkcGGTAK4uFeaz0ho3HQWuULTpNMWBEv+/C9iXAYAMXnzn35VuS0vg3vi+5iXZbn yScw== 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:dkim-signature :arc-authentication-results; bh=BohMhZaUjqYHv3/FkTitoJ9rb/5Sj3NI2Fp3GbCLbdM=; b=F/GXY23Uuad402koaXWNWUJdP0w2kbm4hpDNKuCBOtPLeuqON3H8WTQKJ3jgM0oKtz Tn/gvaB8RtAugLf552qv3+pULhkLh0EwqS+3g9S+X/GV4D+xajKX0VirPZxgDYuSAMKv cFdU13BRNR5Xfkp2FiiARgmmyE9Zz/6JtoiMIe6MtUJfnU/38ky2VFPx8epNh8ahkMhO nG/jcaXjOBE8dT1NpjwDoadxypTzZtMt1TnkiLeg51R6aYUj8rIYudH62vyP/EjGBxY8 QSTJtuwGSqBu0WYtukd4f4RSX8ET4S0njRWNfGoBV2h357i29ePv5FB8wlp07wAY1RUx PGjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w0XDwybQ; 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 w19-v6si19954041plp.538.2018.05.24.03.02.10; Thu, 24 May 2018 03:02:25 -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; dkim=pass header.i=@kernel.org header.s=default header.b=w0XDwybQ; 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 S1030917AbeEXKBO (ORCPT + 99 others); Thu, 24 May 2018 06:01:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:45684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030878AbeEXKBG (ORCPT ); Thu, 24 May 2018 06:01:06 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 D6B0520899; Thu, 24 May 2018 10:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156066; bh=lhVGLhiRK5lOaH9vL1B4xOWLrE9xv47swQFKYxeFysc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w0XDwybQEPDzd2b2h51LdzcFYjnIWL4sNosnJ6uICwJ0r3pClHhtRFkCmnXucuKMB 0TcW6H8R968fFqoKM9/BG4/7xyVMcMhiG8+fYoId3E/4GhicORuC60XAYfRzQbGGYh oNUVvyOfSwp+++p98ThfvL4G/EuOn2fCgfb83SmE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Martin Schwidefsky Subject: [PATCH 4.16 051/161] s390: report spectre mitigation via syslog Date: Thu, 24 May 2018 11:37:56 +0200 Message-Id: <20180524093024.568592676@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky [ Upstream commit bc035599718412cfba9249aa713f90ef13f13ee9 ] Add a boot message if either of the spectre defenses is active. The message is "Spectre V2 mitigation: execute trampolines." or "Spectre V2 mitigation: limited branch prediction." Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/nospec-branch.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/arch/s390/kernel/nospec-branch.c +++ b/arch/s390/kernel/nospec-branch.c @@ -32,6 +32,16 @@ static int __init nospec_setup_early(cha } early_param("nospec", nospec_setup_early); +static int __init nospec_report(void) +{ + if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable) + pr_info("Spectre V2 mitigation: execute trampolines.\n"); + if (__test_facility(82, S390_lowcore.alt_stfle_fac_list)) + pr_info("Spectre V2 mitigation: limited branch prediction.\n"); + return 0; +} +arch_initcall(nospec_report); + #ifdef CONFIG_EXPOLINE int nospec_disable = IS_ENABLED(CONFIG_EXPOLINE_OFF);