Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp862286pxb; Tue, 1 Feb 2022 12:00:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjO8pGmH+BKojkNeFVYGlmsfVezrAJlO68311e3lFR53l23SY7EBlezc8vIyKe3aFboMlk X-Received: by 2002:a17:907:2cc7:: with SMTP id hg7mr16190503ejc.288.1643745628911; Tue, 01 Feb 2022 12:00:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643745628; cv=none; d=google.com; s=arc-20160816; b=Az+5/bMU9AHLr+3rrLpq6G51sIjBDy33lONtIIyroWG0TRACsjXYx3zPGf3ZVASACi P0w196Dlclxnwo567X9Yoz6AtpsLIU0ofcGJN3DpVPivYvttotMeg4GNpaHOG55fF4rs N/Dflk+T7diK9dBanqfNSwCZjl2qREeF9+kLOXdfD0R2BoNhwfZJP4QQU8HtEn6o9lZv nkyrQElkBLCZTtjo6ODc8VJ7uEpURO8Z+jWjNLMjfD1L9skNbn4WVMvrz9L0EE5gbQaw m2/xOPf19w9V3Ml+SH/eG8JdLQIlahcYQoJ71HM8NLa5XiTPfvxKi1+v0FpGTyYoWdXc aI6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k9Ej09zfkGJtENfP0XPGeGble5w8EoKVAh0IcmEgLFM=; b=dbzLpDEC96QDb60Gp9qZ2dCKhPmWaGiGTR3dLFjRwpXYRpiBp7760/4MHcYtQbYKl6 XG1G6Dgs6ku8wXFVgTW+ZPq+5dQ/TOewNgfF9xGEXowmLg/efs+9WZyUuzwGLseMo17J pMenPlyndajin12seOU0xysODVfuNKg5OnLa3JnXUYOXEhUozrZFunpemB+yg6AGNcPI CI916eAMjfgON2L6le+6XVkj20e9Ku5YKSOAxY/gCvPKva61V3tnA/m8q4Ij8a5NHAJj vkPIRXGpnlwi5zYtYpt2uG5k9du5lNwvnxlTUeCP2ZlQ1sS9fjwb8X1C+OWRD5lyD9Q6 0iWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B9ER4431; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz44si6987496ejc.994.2022.02.01.12.00.03; Tue, 01 Feb 2022 12:00:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B9ER4431; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359613AbiAaLLt (ORCPT + 99 others); Mon, 31 Jan 2022 06:11:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359814AbiAaLH6 (ORCPT ); Mon, 31 Jan 2022 06:07:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7265C06175E; Mon, 31 Jan 2022 03:05:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8B4E3B82A6B; Mon, 31 Jan 2022 11:05:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA6B3C340E8; Mon, 31 Jan 2022 11:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627099; bh=Wqg69i/kAkE8iQFF0uMwAU4zMNRtto1xKrShNqHzgBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B9ER44311phoooudJnqb55xQ5n4MXayNcd6j5QB91qDkM3wip08NFyD/QzE1TpOqA krEaR6svqgM6P3vcUpRDMudeqZa0SHqBy881VkT4RaEMb5COMcjqdgtOkCnN6FV/iM d/9dy3vt8Qm71ZqALZB4DeryKREn0MUet6NHDblQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erhard Furtner , Christophe Leroy , Michael Ellerman Subject: [PATCH 5.10 041/100] powerpc/32: Fix boot failure with GCC latent entropy plugin Date: Mon, 31 Jan 2022 11:56:02 +0100 Message-Id: <20220131105221.820340276@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105220.424085452@linuxfoundation.org> References: <20220131105220.424085452@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy commit bba496656a73fc1d1330b49c7f82843836e9feb1 upstream. Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination yet. As there is no way to tell GCC to use PTRRELOC() to access it, disable latent entropy plugin in early_32.o and feature-fixups.o and code-patching.o Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") Cc: stable@vger.kernel.org # v4.9+ Reported-by: Erhard Furtner Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://bugzilla.kernel.org/show_bug.cgi?id=215217 Link: https://lore.kernel.org/r/2bac55483b8daf5b1caa163a45fa5f9cdbe18be4.1640178426.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/lib/Makefile | 3 +++ 2 files changed, 4 insertions(+) --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -11,6 +11,7 @@ CFLAGS_prom_init.o += -fPIC CFLAGS_btext.o += -fPIC endif +CFLAGS_early_32.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) CFLAGS_cputable.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -19,6 +19,9 @@ CFLAGS_code-patching.o += -DDISABLE_BRAN CFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING endif +CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) +CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) + obj-y += alloc.o code-patching.o feature-fixups.o pmem.o inst.o test_code-patching.o ifndef CONFIG_KASAN