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 527AC376A19; Tue, 16 Jun 2026 17:06:18 +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=1781629579; cv=none; b=EbT7M3UOJGzoycwLyFy8h4BJUPQIfSvs0NLMaNbxURMsWpes86qs7SkzJXf+29PlD0abu7OrRHovFTG9y5dtURn0hNST6NPhymM+ds6DeWEP0kxSJR031Ituv48ezSZdgkZcduFup8nekOVAVuclPhGWSyOdWtZSN3bKp2dzXqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781629579; c=relaxed/simple; bh=VKaZTw0gorbhMWE1OTvhN6LFZAzJivYnSd0Vl7GgjxU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Uz+/jOEJAoqGIPNusO36Grh1xuDzLtcmNSKgebf9Ir4LZBCutcglrwzlBPPADmWkhHDzKnKTNOzcrey/iPo6jaA7EAQdaY43ke/aKjDADRU1EEJ6tv4hwCwVm3xpGyioeYtVD/C1kRHqhkRAp8VeK9s1lZDj+aTvMWWob4PsdJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GvnvWIxa; 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="GvnvWIxa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 389401F000E9; Tue, 16 Jun 2026 17:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781629578; bh=sHUjNt/iGJZeSFl71XXehqpf7YeDM8jPykXIkMtQooc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GvnvWIxatByh0haRFSooJlF1uQMt6vEwaI+ikVguiWFul35yqdMajtXrJdkUiUJSU zsXs/bzwAzfAjj7LSXY/GA9hnIMfbtsLPVcOJUjKUroI4UVCz2poHBrPh1z2A2N5us 32kYcvrd6OSTtOzuBtghbu/zvduJ8nbhwM4r0GSc= 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.6 313/452] ARM: 9475/1: entry: use byte load for KASAN VMAP stack shadow Date: Tue, 16 Jun 2026 20:29:00 +0530 Message-ID: <20260616145133.954270149@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145117.796205997@linuxfoundation.org> References: <20260616145117.796205997@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.6-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 @@ -561,7 +561,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