From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794049605; b=b9ZrdHmEdzJyanH9a8gltkUJdp1IgkRrXMrTTfbbZtIACkIxnZXhzBDoF7o69Y/ld5xH nGe0VPVoQdGMWLLqNABtD/eNr3dI8k+bABK7aXUDwpd6LV91o+J5hj4PjKnxQI7pZBn7l hHdqjlh8h6TXM4U7TxjqyYJgeyoWTdBjUUVGPWhwcA8yNQb3QyVZfqZgNoP2kDhmIpCBN I4LmSXzWVYnmDDOu50sTjZits3065CBO7g2Yn3fG/NBFMbEQ4bz/PGkTQnfDJPRab+YHB X6JaPqOZdwVL0o2koLiUSK93sSjl+k5qH7KLcy48zzeZBOwxUCuGTOVpH8N+DJKw5Lg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794049605; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=i2HpBNc5GckeeTtCdPrjblz9kmPCGJO8EXgXywqG6N0=; b=QM47Yc+NlRcBBdVSi5H39cmTKypc35p6UigTwr4cH0V5VughF8bdz4tKQRp6u6ELrEpk OorZcQqOtaGaxACqoZtGoO8zse2f1YwMg7p8RTW1cBPD6nKN7qXqemk6IfDrxChOq3y/x FGPjOuGfGXF9FZByq6zURkYCVDFMsVK2Uz8b2eJRTfdccqORbgAPF9znMq/121RmAczsB XynsxPJMvIlVD5qS1dpZcjcwpeFUoA9VAJSHJLmli2Tyd7QBdhQ5GGGgGhg6AWIvaKJA0 OGXKhXvAY5ZSFTQQOOP79oseGhXu6LNyWPBB7nyQJRMS3hEXlqDWywpU3YbfGvakBCg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="f7mhDBB/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B950606D81A for ; Sat, 7 Nov 2026 11:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=f7mhDBB/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id A153D1F008A3; Sat, 7 Nov 2026 11:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794049605; bh=i2HpBNc5GckeeTtCdPrjblz9kmPCGJO8EXgXywqG6N0=; h=From:To:Cc:Subject:Date; b=f7mhDBB/j6CP/KP1E1jmRbo+avY8UnryTp6bX9MLE2oqAQ534ykpAr4HLSMPQBAHe /1fKcXp2rbimzDkBlWAgGB3S3WzDdfNuZl602JwJLqcHJlCws58hyNTNduvSTNe3Zv HjjBTBb11KCbc0wnAhpeAw8fnWT1s3/fzZPbGObE5Ns50nCtSlb9Ufk6PeNHM5FM11 j3miySz3Ac4F9MqAGbHN+Y7eYDIEcMfUjIqlUk6zbTEqeNK6JYpHZ0GAJ1LEJjqodh 7M4S4TsLekA66oJnlrhupR88CoNufGi6pOSmWkm+iV8wVnLuFICQ6SBvYpYTdQ0yyT zSPGGgiXhc5UA== From: Sasha Levin To: ardb@kernel.org Cc: stable@vger.kernel.org Subject: FAILED: patch "[PATCH] efi/libstub: arm64: Don't use the platform register x18" failed to apply to 5.15-stable tree Date: Sat, 7 Nov 2026 06:06:43 -0500 Message-ID: <20261107060643-failed-5.15-4c86b5f3fa78@kernel.org> X-Mailer: git-send-email 2.53.0 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x 4c86b5f3fa78347fa9cbc9e8ec06615b2f80e397 # git commit -s git send-email --to '' --in-reply-to '20261107060643-failed-5.15-4c86b5f3fa78@kernel.org' --subject-prefix 'PATCH 5.15.y' 'HEAD^..' Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 4c86b5f3fa78347fa9cbc9e8ec06615b2f80e397 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 15 Oct 2026 13:38:58 +0200 Subject: [PATCH] efi/libstub: arm64: Don't use the platform register x18 The UEFI specification designates x18, the platform register, as "do not use" on AArch64, so that UEFI code is compatible both with an OS that assigns a fixed role to x18, and with one that uses it as a temporary register. The arm64 EFI stub and the EFI zboot decompressor only avoid x18 if the kernel is built with shadow call stacks, as that is the only case where -ffixed-x18 is added to KBUILD_CFLAGS, which the stub inherits. Otherwise, the compiler is free to use x18 as a temporary register, and it does so. So pass -ffixed-x18 unconditionally when building the stub for arm64, so that the image can be run by loaders that rely on x18 being left alone, such as a kernel that uses it for its shadow call stack. Cc: Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 564773c89d146..e13d4dfe27c58 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -21,7 +21,7 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ $(CC_FLAGS_DIALECT) \ # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly # disable the stackleak plugin -cflags-$(CONFIG_ARM64) += -fpie $(DISABLE_KSTACK_ERASE) \ +cflags-$(CONFIG_ARM64) += -fpie $(DISABLE_KSTACK_ERASE) -ffixed-x18 \ -fno-unwind-tables -fno-asynchronous-unwind-tables cflags-$(CONFIG_ARM) += -DEFI_HAVE_STRLEN -DEFI_HAVE_STRNLEN \ -DEFI_HAVE_MEMCHR -DEFI_HAVE_STRRCHR \ -- 2.53.0