All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: keescook@chromium.org, Ard Biesheuvel <ardb@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Peter Jones <pjones@redhat.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Atish Patra <atishp@atishpatra.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Xi Ruoyao <xry111@xry111.site>,
	Lennart Poettering <lennart@poettering.net>,
	Jeremy Linton <jeremy.linton@arm.com>,
	Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: [PATCH 08/21] efi: libstub: Use local strncmp() implementation unconditionally
Date: Mon, 17 Oct 2022 19:16:47 +0200	[thread overview]
Message-ID: <20221017171700.3736890-9-ardb@kernel.org> (raw)
In-Reply-To: <20221017171700.3736890-1-ardb@kernel.org>

In preparation for moving the EFI stub functionality into the zboot
decompressor, switch to the stub's implementation of strncmp()
unconditionally.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/arm64/kernel/image-vars.h        | 1 -
 arch/riscv/kernel/image-vars.h        | 1 -
 drivers/firmware/efi/libstub/string.c | 2 --
 3 files changed, 4 deletions(-)

diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
index 74d20835cf91..5a12ca2d7158 100644
--- a/arch/arm64/kernel/image-vars.h
+++ b/arch/arm64/kernel/image-vars.h
@@ -26,7 +26,6 @@ PROVIDE(__efistub_memchr		= __pi_memchr);
 PROVIDE(__efistub_strlen		= __pi_strlen);
 PROVIDE(__efistub_strnlen		= __pi_strnlen);
 PROVIDE(__efistub_strcmp		= __pi_strcmp);
-PROVIDE(__efistub_strncmp		= __pi_strncmp);
 PROVIDE(__efistub_strrchr		= __pi_strrchr);
 PROVIDE(__efistub_dcache_clean_poc	= __pi_dcache_clean_poc);
 
diff --git a/arch/riscv/kernel/image-vars.h b/arch/riscv/kernel/image-vars.h
index d6e5f739905e..b46322cb5864 100644
--- a/arch/riscv/kernel/image-vars.h
+++ b/arch/riscv/kernel/image-vars.h
@@ -28,7 +28,6 @@ __efistub_memchr		= memchr;
 __efistub_strlen		= strlen;
 __efistub_strnlen		= strnlen;
 __efistub_strcmp		= strcmp;
-__efistub_strncmp		= strncmp;
 __efistub_strrchr		= strrchr;
 
 __efistub__start		= _start;
diff --git a/drivers/firmware/efi/libstub/string.c b/drivers/firmware/efi/libstub/string.c
index 5d13e43869ee..9f5810d86646 100644
--- a/drivers/firmware/efi/libstub/string.c
+++ b/drivers/firmware/efi/libstub/string.c
@@ -35,7 +35,6 @@ char *strstr(const char *s1, const char *s2)
 }
 #endif
 
-#ifndef __HAVE_ARCH_STRNCMP
 /**
  * strncmp - Compare two length-limited strings
  * @cs: One string
@@ -57,7 +56,6 @@ int strncmp(const char *cs, const char *ct, size_t count)
 	}
 	return 0;
 }
-#endif
 
 /* Works only for digits and letters, but small and fast */
 #define TOLOWER(x) ((x) | 0x20)
-- 
2.35.1


  parent reply	other threads:[~2022-10-17 17:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 17:16 [PATCH 00/21] efi: Combine stub functionality with zboot decompressor Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 01/21] arm64: efi: Move dcache cleaning of loaded image out of efi_enter_kernel() Ard Biesheuvel
2022-10-18 11:27   ` Catalin Marinas
2022-10-18 11:38     ` Ard Biesheuvel
2022-10-18 11:54       ` Catalin Marinas
2022-10-17 17:16 ` [PATCH 02/21] arm64: efi: Avoid dcache_clean_poc() altogether in efi_enter_kernel() Ard Biesheuvel
2022-10-18 11:57   ` Catalin Marinas
2022-10-18 11:59     ` Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 03/21] arm64: efi: Move efi-entry.S into the libstub source directory Ard Biesheuvel
2022-10-18 11:57   ` Catalin Marinas
2022-10-17 17:16 ` [PATCH 04/21] efi: libstub: Remove zboot signing from build options Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 05/21] efi: libstub: Drop randomization of runtime memory map Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 06/21] efi: libstub: Drop handling of EFI properties table Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 07/21] efi: libstub: Deduplicate ftrace command line argument filtering Ard Biesheuvel
2022-10-17 17:16 ` Ard Biesheuvel [this message]
2022-10-17 17:16 ` [PATCH 09/21] efi: libstub: Clone memcmp() into the stub Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 10/21] efi: libstub: Enable efi_printk() in zboot decompressor Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 11/21] efi: loongarch: Drop exports of unused string routines Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 12/21] efi: libstub: Move screen_info handling to common code Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 13/21] efi: libstub: Provide local implementations of strrchr() and memchr() Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 14/21] efi: libstub: Factor out EFI stub entrypoint into separate file Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 15/21] efi: libstub: Add image code and data size to the zimage metadata Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 16/21] efi: libstub: Factor out min alignment and preferred kernel load address Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 17/21] efi/riscv: libstub: Split off kernel image relocation for builtin stub Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 18/21] efi/arm64: " Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 19/21] efi/loongarch: Don't jump to kernel entry via the old image Ard Biesheuvel
2022-10-17 17:16 ` [PATCH 20/21] efi/loongarch: libstub: Split off kernel image relocation for builtin stub Ard Biesheuvel
2022-10-17 17:17 ` [PATCH 21/21] efi: libstub: Merge zboot decompressor with the ordinary stub Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221017171700.3736890-9-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=atishp@atishpatra.org \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@loongson.cn \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jeremy.linton@arm.com \
    --cc=keescook@chromium.org \
    --cc=lennart@poettering.net \
    --cc=linux-efi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=palmer@dabbelt.com \
    --cc=pjones@redhat.com \
    --cc=will@kernel.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.