Received: by 10.192.165.148 with SMTP id m20csp852113imm; Fri, 27 Apr 2018 08:31:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqlZMuQwk+5+xGcANtgvdpQ1rXPnqDuXJXwaFFatR830BtER+DOiyXM4SCAw6stNhihMQ5n X-Received: by 2002:a17:902:2805:: with SMTP id e5-v6mr2727119plb.55.1524843092446; Fri, 27 Apr 2018 08:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524843092; cv=none; d=google.com; s=arc-20160816; b=oWeHFMIl4ZDWbrOVW9O+fGa9cO/AAYAmGLzqYt0O34eLPOxXqoUeh7Wspv3CoL6cFO nSiS+aWIfT+SshbqDuNhzQyxHnWoN+HbTDoJWOHyb7wMjG3vijtmc9YhQHHeODlM7hpM KsRYv/HtUXIRS0Jeme72YbKuJrpHdYMtBozegsana0LClFICEPfxJTepaHgRtyMQRbK3 Ga6RclSZjj9VkhC7Gc3xvT5f/aUwcuVq1ltkg7YzUWecHeto67tMB3A7dqyozeQ33Seq 1Sfim4vuoUe/RYkNSaAhPu9WWSBwgKoGgRCFvIV9P2AyfYp6NzeeFR74qvNAvzFKF0En unug== 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:dmarc-filter :arc-authentication-results; bh=p2VFOG1e8YmOPBM2BL6bi1rCbUlmIDqL0Gf+tkFcPVk=; b=lEQ2WKZ1EC2f0Z0SrX6VOl+8AgsmnlKNC7CKYCsfuelCm1Avq/YzRqH+tmcBUUt9C+ +VdCRnBPeFdFasYCVwvJjFh298+N5z+MxUFnkihhvLE11L6LorUsGYN0kbrhRxQY8FIH i56+dgM9pZ3k4zTBXdGToJsfYWKuKgy60Kjnz2PMFpr6znYBBEdz6auXjSesCAKf2IrA NRW0uwZncs53vv0Lux4LNNzGM8cmaorun4YoXHBL9fgyHTh4OE5d9T12ptVU1fhf/TtL 2zN+sJeB9wYY4Tk5Yadc9y02Vph4t+BNzqA3eta7/BwkomRHYQdankoQScbNTnLZdgLo pq7w== 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 l15-v6si1436622pgu.659.2018.04.27.08.31.18; Fri, 27 Apr 2018 08:31:32 -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 S933232AbeD0PaL (ORCPT + 99 others); Fri, 27 Apr 2018 11:30:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:48258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933110AbeD0OBO (ORCPT ); Fri, 27 Apr 2018 10:01:14 -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 B538F2185A; Fri, 27 Apr 2018 14:01:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B538F2185A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Schwidefsky Subject: [PATCH 4.4 24/50] s390: report spectre mitigation via syslog Date: Fri, 27 Apr 2018 15:58:26 +0200 Message-Id: <20180427135657.143654571@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135655.623669681@linuxfoundation.org> References: <20180427135655.623669681@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.4-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 @@ -33,6 +33,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);