From patchwork Sat Jun 2 13:35:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 924495 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40yj7D5vYmz9s02 for ; Sat, 2 Jun 2018 23:42:32 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="i/MO5nnE"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40yj7D4HfVzF16W for ; Sat, 2 Jun 2018 23:42:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="i/MO5nnE"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40yj0d1sC7zF0tX for ; Sat, 2 Jun 2018 23:36:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="i/MO5nnE"; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 40yj0c2t4Wz8tGk for ; Sat, 2 Jun 2018 23:36:48 +1000 (AEST) Received: by ozlabs.org (Postfix) id 40yj0c0r1Tz9s1B; Sat, 2 Jun 2018 23:36:48 +1000 (AEST) Delivered-To: linuxppc-dev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=srs0=e1is=iu=linuxfoundation.org=gregkh@kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="i/MO5nnE"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40yj0b298Lz9s0x for ; Sat, 2 Jun 2018 23:36:47 +1000 (AEST) 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 5BE0F20880; Sat, 2 Jun 2018 13:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527946605; bh=Y8rOGcmgMfq9tGt4JWun6Z2uwmVFLWssy+zpRJ17WI4=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=i/MO5nnECTn/zwra4uwhWij28T5q2cnnhlgb8bhIRZKGcvOS5+CB16xx5hbA6YRl3 yGbbVJl7QQCUbIfBGaeksGCDpg0VlgRHai7DeTw9jO/JlXyMpeVJoZjeQ30EgptUrs I9JeGcVuclcIrR7IFgaJJWLcavdZtlYeNpi1miS0= Subject: Patch "powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()" has been added to the 4.9-stable tree To: gregkh@linuxfoundation.org,linuxppc-dev@ozlabs.org,mpe@ellerman.id.au From: Date: Sat, 02 Jun 2018 15:35:39 +0200 In-Reply-To: <20180602110908.29773-23-mpe@ellerman.id.au> Message-ID: <1527946539161205@kroah.com> MIME-Version: 1.0 X-stable: commit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is a note to let you know that I've just added the patch titled powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-fix-section-mismatch-warnings-from-setup_rfi_flush.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From foo@baz Sat Jun 2 15:29:05 CEST 2018 From: Michael Ellerman Date: Sat, 2 Jun 2018 21:09:07 +1000 Subject: powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, linuxppc-dev@ozlabs.org Message-ID: <20180602110908.29773-23-mpe@ellerman.id.au> From: Michael Ellerman commit 501a78cbc17c329fabf8e9750a1e9ab810c88a0e upstream. The recent LPM changes to setup_rfi_flush() are causing some section mismatch warnings because we removed the __init annotation on setup_rfi_flush(): The function setup_rfi_flush() references the function __init ppc64_bolted_size(). the function __init memblock_alloc_base(). The references are actually in init_fallback_flush(), but that is inlined into setup_rfi_flush(). These references are safe because: - only pseries calls setup_rfi_flush() at runtime - pseries always passes L1D_FLUSH_FALLBACK at boot - so the fallback flush area will always be allocated - so the check in init_fallback_flush() will always return early: /* Only allocate the fallback flush area once (at boot time). */ if (l1d_flush_fallback_area) return; - and therefore we won't actually call the freed init routines. We should rework the code to make it safer by default rather than relying on the above, but for now as a quick-fix just add a __ref annotation to squash the warning. Fixes: abf110f3e1ce ("powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again") Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/setup_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Patches currently in stable-queue which might be from mpe@ellerman.id.au are queue-4.9/powerpc-64s-clear-pcr-on-boot.patch queue-4.9/powerpc-rfi-flush-differentiate-enabled-and-patched-flush-types.patch queue-4.9/powerpc-64s-fix-section-mismatch-warnings-from-setup_rfi_flush.patch queue-4.9/powerpc-pseries-fix-clearing-of-security-feature-flags.patch queue-4.9/powerpc-powernv-set-or-clear-security-feature-flags.patch queue-4.9/powerpc-64s-move-cpu_show_meltdown.patch queue-4.9/powerpc-rfi-flush-call-setup_rfi_flush-after-lpm-migration.patch queue-4.9/powerpc-pseries-set-or-clear-security-feature-flags.patch queue-4.9/powerpc-rfi-flush-make-it-possible-to-call-setup_rfi_flush-again.patch queue-4.9/powerpc-move-default-security-feature-flags.patch queue-4.9/powerpc-powernv-use-the-security-flags-in-pnv_setup_rfi_flush.patch queue-4.9/powerpc-add-security-feature-flags-for-spectre-meltdown.patch queue-4.9/powerpc-pseries-use-the-security-flags-in-pseries_setup_rfi_flush.patch queue-4.9/powerpc-64s-enhance-the-information-in-cpu_show_meltdown.patch queue-4.9/powerpc-rfi-flush-move-out-of-hardlockup_detector-ifdef.patch queue-4.9/powerpc-rfi-flush-always-enable-fallback-flush-on-pseries.patch queue-4.9/powerpc-rfi-flush-move-the-logic-to-avoid-a-redo-into-the-debugfs-code.patch queue-4.9/powerpc-pseries-restore-default-security-feature-flags-on-setup.patch queue-4.9/powerpc-pseries-add-new-h_get_cpu_characteristics-flags.patch queue-4.9/powerpc-64s-add-support-for-a-store-forwarding-barrier-at-kernel-entry-exit.patch queue-4.9/powerpc-64s-wire-up-cpu_show_spectre_v1.patch queue-4.9/powerpc-powernv-support-firmware-disable-of-rfi-flush.patch queue-4.9/powerpc-pseries-support-firmware-disable-of-rfi-flush.patch queue-4.9/powerpc-64s-wire-up-cpu_show_spectre_v2.patch --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -726,7 +726,7 @@ void rfi_flush_enable(bool enable) rfi_flush = enable; } -static void init_fallback_flush(void) +static void __ref init_fallback_flush(void) { u64 l1d_size, limit; int cpu;