Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1956470imm; Thu, 24 May 2018 03:34:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZreasRv9YUG/DA4WjvPV7/vMXHpbXIjUZ893zyWxp1xaXnZttPpdRNGs7oNSE95Z/2GSX+1 X-Received: by 2002:a17:902:5959:: with SMTP id e25-v6mr361832plj.351.1527158084933; Thu, 24 May 2018 03:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527158084; cv=none; d=google.com; s=arc-20160816; b=G3Ml2n+gk240w28dCKYx41jLeLZX9928auUqJqvHO6Fx+7XKGsLaUTWBOaq6kPuhmT MO3HREd6RpKkf6Qj7GSegxpq6w6qW0h6vJp+aqdWt1OaWaXC5XWOVBdCxS7qB1IxYNbZ Nwf42OyEGm6Wgv/Od/c4ekTAJ1NyZlw+LoKkvNdkIx6KBjr9UMB4QHv9AmipQRZMehw2 /00cMKO6+trkyaIEKA8OWiOa4rkQaqBM3tdVOHOvaKXT3yV9EBnc08kS46RzJEudJotc 9yor7ephXDjOzS3dh+8l55UO6bc9hwhOM0dU2UGq27CUhrA4SkyAe8V0KzmdlHBpowxg OzLA== 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=Lb/Y/bTUIMsxKK1i7BsbPK0u1J/8kSTfrlPkZapeUps=; b=Q0PAuMWbrVk4onm/yqdmrAjlxC6Prc29RPoTObJyCDKogvkLQfsia85E0S4s42/GDk miXLG0uAxaVcVBQj26RgvPdaVB7LMOtKcGnvjB13/txr5hwv/1Tib4x2edGG0y65EQpz t74yed6KrACVaSGTzJH1W9uNfijVvM06IEWLsWB54E5ib7QI66j2a8ZMjjQsWBgw1TXC q55xRhmZlx3GvJgz6bXANOSiKPXUnNJJ6rBUOINqIgBn20PJo/DhtFdn9YHR8O813HFv XK+97v4g2gqli2Zd4cGbdCQR6jD4e41fc/yARM4PXeZFKVwpi9TVemPGZgws2+KFAtSg l01Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1d12dXtU; 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 1-v6si20069418plr.483.2018.05.24.03.34.30; Thu, 24 May 2018 03:34:44 -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=1d12dXtU; 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 S1032166AbeEXKdi (ORCPT + 99 others); Thu, 24 May 2018 06:33:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:42898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968464AbeEXKAd (ORCPT ); Thu, 24 May 2018 06:00:33 -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 1057A2088E; Thu, 24 May 2018 10:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156032; bh=lcPtmZTEdShN9YdoTH35xPBYyQ9vD34w0y+xVIdAbZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1d12dXtUhyJrHLXecUiOhcQcnjXvTrxCSJ5EGIvqHRTk/d+k4k1fwMsRWQOjfveHP FFAHUP3gZMfp/y6mrepDHlgxy6IoxuE1rLdlj3IOM5WWIUg3wRKSRBjEHTtfGU+fSX OP43QGapZN2mANebIMX0uQP1RKm/NfJmeaI5UcfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, greg@kroah.com Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman Subject: [PATCH 4.16 040/161] powerpc/64s: Move cpu_show_meltdown() Date: Thu, 24 May 2018 11:37:45 +0200 Message-Id: <20180524093023.134921604@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: Michael Ellerman commit 8ad33041563a10b34988800c682ada14b2612533 upstream. This landed in setup_64.c for no good reason other than we had nowhere else to put it. Now that we have a security-related file, that is a better place for it so move it. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/security.c | 11 +++++++++++ arch/powerpc/kernel/setup_64.c | 8 -------- 2 files changed, 11 insertions(+), 8 deletions(-) --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -5,6 +5,8 @@ // Copyright 2018, Michael Ellerman, IBM Corporation. #include +#include + #include @@ -13,3 +15,12 @@ unsigned long powerpc_security_features SEC_FTR_L1D_FLUSH_PR | \ SEC_FTR_BNDS_CHK_SPEC_BAR | \ SEC_FTR_FAVOUR_SECURITY; + + +ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf) +{ + if (rfi_flush) + return sprintf(buf, "Mitigation: RFI Flush\n"); + + return sprintf(buf, "Vulnerable\n"); +} --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -927,12 +927,4 @@ static __init int rfi_flush_debugfs_init } device_initcall(rfi_flush_debugfs_init); #endif - -ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf) -{ - if (rfi_flush) - return sprintf(buf, "Mitigation: RFI Flush\n"); - - return sprintf(buf, "Vulnerable\n"); -} #endif /* CONFIG_PPC_BOOK3S_64 */