From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF962C4167B for ; Thu, 30 Nov 2023 04:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MMvyv/4KGXnrr7w/9z0p0OXIwyLiLkC4vVBhHz0s8cU=; b=NEfh6ssQd6712x 3JYBki5Xanqla65Qk2jTwsQKW9tn1Xfx7p7DUWFm7p7jy/3m5PH6dFWIM5WQ6kNTkfV33r9B9mT2b rrWensj5vi/iNpehrqUNwqk5uiMtEhLa0i96Oq1gq29p4lN7yhQo5Z+x0PvMSKbNcma86NXuRfAtw me1HOS45oFVUi73ZLp60WxJCsi6rFxtRecJwo1IwR20uAnDe9lz87MpHzVjQ+IaWo235++BDhYZPl Fdxg1wAcysRnBuVy6HFycGaed8qWsTNUKdIIKlC0f3Ip9d+NujqP2mTdlsqg5oCMeJpWTIBtvVKdp nfRL7X5OhktPrycnaXlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8Yuc-009vdG-0A; Thu, 30 Nov 2023 04:44:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8YuZ-009vcp-2X for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2023 04:44:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E28221042; Wed, 29 Nov 2023 20:45:10 -0800 (PST) Received: from [10.162.41.8] (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 41EB23F5A1; Wed, 29 Nov 2023 20:44:21 -0800 (PST) Message-ID: Date: Thu, 30 Nov 2023 10:14:13 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 01/41] arm64: kernel: Disable latent_entropy GCC plugin in early C runtime Content-Language: en-US To: Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , Ryan Roberts , Kees Cook References: <20231129111555.3594833-43-ardb@google.com> <20231129111555.3594833-44-ardb@google.com> From: Anshuman Khandual In-Reply-To: <20231129111555.3594833-44-ardb@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_204427_876432_A66612E4 X-CRM114-Status: GOOD ( 14.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/29/23 16:45, Ard Biesheuvel wrote: > From: Ard Biesheuvel > > In subsequent patches, mark portions of the early C code will be marked Small nit - ^^^ redundant usage for mark ^^^^^^ > as __init. Unfortunarely, __init implies __latent_entropy, and this Typo here - s/Unfortunarely/Unfortunately/ > would result in the early C code being instrumented in an unsafe manner. > > Disable the latent entropy plugin for the early C code. I am just wondering if this '__latent_entropy' could be problematic for all early __init code in each supported platform. Although this plugin does not get disabled in that many places inside the kernel tree. $git grep DISABLE_LATENT_ENTROPY_PLUGIN arch/arm64/kernel/pi/Makefile: $(DISABLE_LATENT_ENTROPY_PLUGIN) \ arch/powerpc/kernel/Makefile:CFLAGS_early_32.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/Makefile:CFLAGS_cputable.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/Makefile:CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/Makefile:CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/Makefile:CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/vdso/Makefile: CFLAGS_vgettimeofday-32.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/kernel/vdso/Makefile: CFLAGS_vgettimeofday-64.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/lib/Makefile:CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) arch/powerpc/lib/Makefile:CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) scripts/Makefile.gcc-plugins: DISABLE_LATENT_ENTROPY_PLUGIN += -fplugin-arg-latent_entropy_plugin-disable -ULATENT_ENTROPY_PLUGIN scripts/Makefile.gcc-plugins:export DISABLE_LATENT_ENTROPY_PLUGIN > > Acked-by: Mark Rutland > Signed-off-by: Ard Biesheuvel > --- > arch/arm64/kernel/pi/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/kernel/pi/Makefile b/arch/arm64/kernel/pi/Makefile > index 4c0ea3cd4ea4..c844a0546d7f 100644 > --- a/arch/arm64/kernel/pi/Makefile > +++ b/arch/arm64/kernel/pi/Makefile > @@ -3,6 +3,7 @@ > > KBUILD_CFLAGS := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) -fpie \ > -Os -DDISABLE_BRANCH_PROFILING $(DISABLE_STACKLEAK_PLUGIN) \ > + $(DISABLE_LATENT_ENTROPY_PLUGIN) \ > $(call cc-option,-mbranch-protection=none) \ > -I$(srctree)/scripts/dtc/libfdt -fno-stack-protector \ > -include $(srctree)/include/linux/hidden.h \ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel