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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56A8CC7EE22 for ; Tue, 9 May 2023 03:55:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233559AbjEIDzL (ORCPT ); Mon, 8 May 2023 23:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234410AbjEIDzH (ORCPT ); Mon, 8 May 2023 23:55:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD788A48; Mon, 8 May 2023 20:55:06 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 91CAF61011; Tue, 9 May 2023 03:55:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4AA3C433AE; Tue, 9 May 2023 03:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683604505; bh=FeEPuL62SD/ceTdy1AZqZeZrGvNE+W6iSSHqrcpuhdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GQXhuxX40OjGGl1paD/X/fdnwF9K7z/DBK9UKpH7kwctsb++xAOnVd8Vrlo+/lTHU yC7UFxLTQ/wQ5dQ4yIv2ocW5hSi0UsDrcFQcQ/T1CI092s3g+uuZbMJndTkhl/n4l3 gTTAm4c9zAuklrHU+soqL7v3xXxrXR2S8IT1RACELJGwF2HhxnSFVGLFf36eVe3FLM O9m4QRQSefHBk6PpO+vupZQ8liC70N0769oqFKFg1sv3oFuAH6xLqI0jrN/EYdwdrl tAVL3u+YZC6IloyF+RRfY+RLbbk+NEoqpg7PHsEDobSGysTcX37hzGVGv9DzFT8jZq L21/v6pEfIM5Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexandre Ghiti , Ard Biesheuvel , Atish Patra , Palmer Dabbelt , Sasha Levin , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 6.3 4/7] riscv: Fix EFI stub usage of KASAN instrumented strcmp function Date: Mon, 8 May 2023 23:54:27 -0400 Message-Id: <20230509035455.59524-4-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230509035455.59524-1-sashal@kernel.org> References: <20230509035455.59524-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexandre Ghiti [ Upstream commit 617955ca6e275c4dd0dcf5316fca7fc04a8f2fe6 ] The EFI stub must not use any KASAN instrumented code as the kernel proper did not initialize the thread pointer and the mapping for the KASAN shadow region. Avoid using the generic strcmp function, instead use the one in drivers/firmware/efi/libstub/string.c. Signed-off-by: Alexandre Ghiti Acked-by: Ard Biesheuvel Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20230203075232.274282-5-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/kernel/image-vars.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/riscv/kernel/image-vars.h b/arch/riscv/kernel/image-vars.h index 7e2962ef73f92..15616155008cc 100644 --- a/arch/riscv/kernel/image-vars.h +++ b/arch/riscv/kernel/image-vars.h @@ -23,8 +23,6 @@ * linked at. The routines below are all implemented in assembler in a * position independent manner */ -__efistub_strcmp = strcmp; - __efistub__start = _start; __efistub__start_kernel = _start_kernel; __efistub__end = _end; -- 2.39.2