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 7AA21C54E94 for ; Wed, 25 Jan 2023 08:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234716AbjAYI1x (ORCPT ); Wed, 25 Jan 2023 03:27:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232745AbjAYI1u (ORCPT ); Wed, 25 Jan 2023 03:27:50 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824B77A8A for ; Wed, 25 Jan 2023 00:27:48 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id h16so16203646wrz.12 for ; Wed, 25 Jan 2023 00:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6xmv+QSgbqVHZO5FLG2f26KzmGjk1zWdaRkSSaCJJ9A=; b=cbBspW8qJ+TGXotE39Oa2GtMgqgvEaxRYhO5hoiVi0ud4rsKGjyyMhGeWSEbTliuQu PeUr4O1lu088PVCipbmpjO0xJw9wvuZk+/4okqKqdh86qOXFy7I5tUzhr/fPkah8VI3a 9N8G72tSz7j4xyTYwDhoG+P/goUThd3U9eirP7gIklgIcTl0A/rU6mHILG/9h52wlabF 1Ao2ehXEQ8ebqT3m6/yspOli05h+eIaKYOnjR9zEF/UBqi25rdpavoWW3Hzs5BPZcD3x NAQpK+CWPziWqOfXXs5R8Uj+rOL3fy3Pte2cQP3RFwlo2s4mYjCSeqjPQTRuWy0k8e1q WlEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6xmv+QSgbqVHZO5FLG2f26KzmGjk1zWdaRkSSaCJJ9A=; b=oQQ0lAMZQv8pznxyE+N6BxG4YOvOB620hNAQ8xlDT+lZ7QUaOZPGoBHTOL+/e+1nLc T//Y31JT38TnNVPk57Dl/RgAqEBf17p+Og5Rs6aLK3aryd4CHm8nBvv0jpB7QG6/q/+9 amlaXu77gDrPpHmUZXuVefkxRq6eWCY6+TuCayjTKJsl3A1CU9C+rRVWjBmcncpjXcM7 pmEk3YQprjKwXJpDhsV8zWv0kTkuQLSxYmK194lhcO+UuNZRJy5K8ZYFUYDS3w/iUPZ6 WJnAzUrjS/E22hjF5wGub6hcrUC4n7LJ/0muX+ALc2gCvNXHOjJnngMebQxePYgVoiHj xi9A== X-Gm-Message-State: AFqh2kqbPjMSv9EEI2coDfGbnNybaJtt1BahcSZqYGAyRGLWg8qDxaeh tARD46575PEHgu9M6B+WjkfG5ywZiLFtH9bR X-Google-Smtp-Source: AMrXdXu8PoPu+NFgqgrtB5cmrqLEb9a4CDisajsgtj/VZ1j268QbuemGFUZLIa8Y7cOSokqHZPwRQA== X-Received: by 2002:a05:6000:1c0e:b0:26f:6bf:348f with SMTP id ba14-20020a0560001c0e00b0026f06bf348fmr24106837wrb.6.1674635266981; Wed, 25 Jan 2023 00:27:46 -0800 (PST) Received: from alex-rivos.home (lfbn-lyo-1-450-160.w2-7.abo.wanadoo.fr. [2.7.42.160]) by smtp.gmail.com with ESMTPSA id g9-20020adfa489000000b002b065272da2sm3863367wrb.13.2023.01.25.00.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 00:27:46 -0800 (PST) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Ard Biesheuvel , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-efi@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH v3 4/6] riscv: Fix EFI stub usage of KASAN instrumented strcmp function Date: Wed, 25 Jan 2023 09:23:31 +0100 Message-Id: <20230125082333.1577572-5-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230125082333.1577572-1-alexghiti@rivosinc.com> References: <20230125082333.1577572-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 7e2962ef73f9..15616155008c 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.37.2