From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACE75171A9 for ; Mon, 22 May 2023 19:44:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C18EC433EF; Mon, 22 May 2023 19:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684784692; bh=FeEPuL62SD/ceTdy1AZqZeZrGvNE+W6iSSHqrcpuhdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTTl51pQlaEwo7BE9huUkd1wqEtEOhg4+5D4inaa8PBfR/UgSmMz89yPbMg8ug8GX PailfSgTzrjDdn878Ab91wpGNApC+9WCWhlYpbKg0A/P4PV3VbVAZirADHhT9ArXqm JC6FYzph5vE3cS690eVt8aoKUPPf5z5xlF3XF6T8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexandre Ghiti , Ard Biesheuvel , Atish Patra , Palmer Dabbelt , Sasha Levin Subject: [PATCH 6.3 170/364] riscv: Fix EFI stub usage of KASAN instrumented strcmp function Date: Mon, 22 May 2023 20:07:55 +0100 Message-Id: <20230522190416.977450852@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522190412.801391872@linuxfoundation.org> References: <20230522190412.801391872@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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