Received: by 10.192.165.148 with SMTP id m20csp831432imm; Fri, 27 Apr 2018 08:11:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrTS9w0X1+fcdBAEzSrzXweCFUVHOyf4QQVmVZDrJs7lOP7KbDH3Ppag7A5T83zYq6KJVXA X-Received: by 10.98.113.196 with SMTP id m187mr2554788pfc.216.1524841905697; Fri, 27 Apr 2018 08:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524841905; cv=none; d=google.com; s=arc-20160816; b=SBGUx1QwtBa9/MUNaFzoksGAnq+EuD9EA5yNDgeYeA2Z5ZYk0n+693bKs1KaqOaMFL hZyKXRVgzg+8r3uIph8hHWMcu/2rY7Xc+Y4AoON+fsA2fJT7VKtjq5qa9Da+pHmxdPoq scG9TbGUhf7Uf35CmSgGi0z2BhvMnzQpa4UWsQLOE2IB7zXIPi5usdLXava9R7HmNqvf 9YbYSsnVeLgsCjkKqzpFVmMtAP309DsYa+pQkbJ4pqvPLf+VNZ84XxqDwlc1B3ofqhUs t6cZjbVa2HIKybB0ePfjc6o69jaDy/NByeAgkNut238KljqBAGG5nfFDMAU69THqk7GU H2KQ== 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=6gIbnU/oaLQUWjfc2pn+JEWwJl0KEFif0bwpUAEzsO8=; b=pvbWsx1RgBxesz102pl7ihdzkR29PjCcw2S/jzDiSStiHIB5pfAq8Gmmj00fcDg1tv 6k0Z86tfxagTlyLrgtOn1kkl5jgmCN97xFumNhISx62fi9Kjuz5wnGHVhkXTHlMLKD1U tfXh6ih1KijGzFv9bty9JqslkQyvp2X07W7NBMUxT39VkA8RpFIObkTCuROHznr/8tkO advBj5ccqFmdXzEDhJDwjhXY8//FPKpv5Ypkm8bB1D0U0utKeuaAg0hoIQiYZsfd5E1E RU36Sqc9ZrnDQbtdWrKX4aJQ8nT6c41SJtd75jb0+i4VKImplRT8h5oXPnyFcse/VQo2 PLlA== 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 v6-v6si1307399pgs.399.2018.04.27.08.11.31; Fri, 27 Apr 2018 08:11:45 -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 S933703AbeD0OEZ (ORCPT + 99 others); Fri, 27 Apr 2018 10:04:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:50708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933163AbeD0OEV (ORCPT ); Fri, 27 Apr 2018 10:04:21 -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 78D2D2189D; Fri, 27 Apr 2018 14:04:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78D2D2189D 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.9 43/74] s390: report spectre mitigation via syslog Date: Fri, 27 Apr 2018 15:58:33 +0200 Message-Id: <20180427135711.710333929@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@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.9-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);