From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 83EDC44DB6D; Tue, 16 Jun 2026 16:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781625709; cv=none; b=hnZQKAt66E/MkmN8OnS3U0mXQzWGwf0XTXnIXCvkf3vicQZ+3/+7BtE9TgPHswQYbhhnkozOBlY6mDuced7JfvggBDsrUhoxxCKXTzg7ajDUHFbxO4eCB+Ka7z8ffAa4OHZTNDMHbjBiqsOAwzWYUdClaF6UIQ48n6qKQmrkMLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781625709; c=relaxed/simple; bh=a6B4GWbq384A8MguOu3ailFtK7lOyC6bf8jEfiivRpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Or3lbQxhA6qcjIKYIFkDoxEPzQ5ZQ5GN+SnzDc8SkvKsMmYWhtKAHr6/K6gaSMgRqR6S7KlqVbP3/8dDUtupbUUnP74G8WgDe3Xl0IQCVII7uLbFGnO5FCH0Pz3lBtYz4OEa+JtqJp4kabYPFuaiigtTj+0p3L+rJ8OoQXWfdEw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UHBg0VbV; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UHBg0VbV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 542121F000E9; Tue, 16 Jun 2026 16:01:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781625708; bh=4G0UAZ+/dW01jFpHP62e9hCO+qGctuvJbgcNdN2Bg5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UHBg0VbVT3JvmFkcwf/3dvXVVNCldAHhI0ERM0eBFjB/Bwv6NQa8DD99c0CpYE0Uz KZ87kKYhdSOFyG6AGxc/7hHRbiKQVQZKVjfaM/0JpVHzbuxHmmG7xcqc8dzfptmDis L6uiPzIxNemKcT4KexBgHysGEfON6+y5DkSFSNhI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Karl Mehltretter , Linus Walleij , Russell King Subject: [PATCH 6.18 193/325] ARM: 9475/1: entry: use byte load for KASAN VMAP stack shadow Date: Tue, 16 Jun 2026 20:29:49 +0530 Message-ID: <20260616145107.572899265@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145057.827196531@linuxfoundation.org> References: <20260616145057.827196531@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Karl Mehltretter commit 77a1f6883dc6e837bb2cb30b9b02e2f94338e2c6 upstream. Commit 44e9a3bb76e5 ("ARM: 9430/1: entry: Do a dummy read from VMAP shadow") added a dummy read from the KASAN VMAP stack shadow in __switch_to(). The read uses ldr, but the KASAN shadow address is byte-granular and is not guaranteed to be word aligned. ARMv5 faults unaligned word loads. With CONFIG_KASAN_VMALLOC and CONFIG_VMAP_STACK enabled, ARM926/VersatilePB crashes in __switch_to() with an alignment exception before reaching init. Use ldrb for the dummy shadow access. The code only needs to fault in the shadow mapping if the stack shadow is missing, so a byte load is sufficient and matches the granularity of KASAN shadow memory. Fixes: 44e9a3bb76e5 ("ARM: 9430/1: entry: Do a dummy read from VMAP shadow") Cc: stable@vger.kernel.org # v6.13+ Signed-off-by: Karl Mehltretter Reviewed-by: Linus Walleij Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- arch/arm/kernel/entry-armv.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -567,7 +567,7 @@ ENTRY(__switch_to) @ are using KASAN mov_l r2, KASAN_SHADOW_OFFSET add r2, r2, ip, lsr #KASAN_SHADOW_SCALE_SHIFT - ldr r2, [r2] + ldrb r2, [r2] #endif #endif