Received: by 10.192.165.148 with SMTP id m20csp803217imm; Fri, 27 Apr 2018 07:46:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqV2Wf2OBckk3VxvCSFlEqJVmauukbDbgrgGAfeUdypxbRlwcTiyBM0jhvmSuVm8YyqTGbd X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr2536248pln.203.1524840395493; Fri, 27 Apr 2018 07:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524840395; cv=none; d=google.com; s=arc-20160816; b=zPBEUzYY9DJclT8MoURMDKB9XAlzZhCc5HFCLxMfUDq9nQeGy00JLHtk+ZRV2bn2S1 rPn9MkDeY+qNwvbR40gERtMpiuSrZnszgawD0vfqC/1944TwsiNSCS/TqcofgOg0e0c3 xYlGx5oKROmfpLlCoHWbjqi/kDEUpgiH5bw8HEx7OXh7fopTZRntZ1ssJ/z50xuQAK5T 7iItjIvhMJYgvLc85xP2NLrxiYeIQhFxXZ2QTtQZyqpp7ihf/3qEWPvnKkpHZZmTU3c9 5EtGTjSARxjUtLLc6Ko+ZQgj2bUWX3rKo9zrh5WN0LHzQNM3ahjkIFrRgxbWod38tL3C HPEQ== 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=Hvw8CQUkRFbdIkEZxQMW9uXmgDHU0wlRkN/zn+nvax0=; b=MLcjqv/EXepYhZ8VIO69NcDAFqig8XvMUpXfhbfib/lNmslTXjTwygrdtfyvpErKFo 6vNOiv9DPlYpK8L6Z8TyuPqClOy5OQVolQMfywFxKi7c7BXutR7BBGTeIjJqafCwrCn3 CE4HclrsGImW+JFbgbSiF/mXmDLL1wlxClW8h8F88/pLDGbTxo4p6vggm2ws5+ownMQk SwUZwkDLdjBRQUHu3lB2goP5rWHbBHlM6smX9OS2DTtPOPElroKIdW40JI2dxGYjiPM5 3K2w2LVTesGFTfmR3ijGdoSu0T2R4rujVtqDIXOXT5aOFI6YceLveu/1nYgL/LLmzLwd Oxqg== 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 k72si1427217pfa.53.2018.04.27.07.46.21; Fri, 27 Apr 2018 07:46:35 -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 S934575AbeD0OpT (ORCPT + 99 others); Fri, 27 Apr 2018 10:45:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:53844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934441AbeD0OIL (ORCPT ); Fri, 27 Apr 2018 10:08:11 -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 C032521864; Fri, 27 Apr 2018 14:08:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C032521864 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.14 57/80] s390: report spectre mitigation via syslog Date: Fri, 27 Apr 2018 15:58:50 +0200 Message-Id: <20180427135735.841535906@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@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.14-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);