From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3446C37756C; Mon, 9 Feb 2026 14:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770647249; cv=none; b=iQxK3+BnJ/qRD660DKRGo/ez5Oce2JNqfbbX+hvrj/pkfgFBp2czqUHx9bUQ4zBeWPWR9Nl5ANTdAh1Dm908XdM2iqSWGfU0qobB2eYRtNUEZY4I5VVrKictPoVFK1juwOiAaCCHq9dVORkP84/XlIE8EemtQ93+zNc/iPBrTGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770647249; c=relaxed/simple; bh=7GFNwywbL6PnfThRuSqtiCJSBQIeGFIxVxg2QQz9KLY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sq84fCDlwESSkfRF/2RU0g5BiW8FBK9SApbMZz1ly0HaBk2hbnekRFJApzyWxa0zTI0nRVLixBceWGk7auEXbfOg1NLykPJE6TWI3lBDYaG7bYvRnfhVwcHJio0WU6+6yRwkuQjK3cpwdznRfzEM2uO5q/NA7F6vr+LmIl+onoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JVPryUrD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JVPryUrD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 617EEC116C6; Mon, 9 Feb 2026 14:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770647248; bh=7GFNwywbL6PnfThRuSqtiCJSBQIeGFIxVxg2QQz9KLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVPryUrDC0MWalsWJp+3IBm0vnDqzxO1TcacIDBYXXcsbH1ozp+lrjlcnHPHasRDZ ZGRg5YhwJ/foSQIdw2csklIP9doQ5IUJU/LZlzckLzxrCRXAtHb72P0bY/NEOvc/tx 0zm/ERv5LP9H3NIGbJiXx1vEgin0Juh5u/pc1/4A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , "Matthew Wilcox (Oracle)" , Arnd Bergmann , "Russell King (Oracle)" Subject: [PATCH 6.18 016/175] ARM: 9468/1: fix memset64() on big-endian Date: Mon, 9 Feb 2026 15:21:29 +0100 Message-ID: <20260209142321.059389876@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260209142320.474120190@linuxfoundation.org> References: <20260209142320.474120190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Weissschuh commit 23ea2a4c72323feb6e3e025e8a6f18336513d5ad upstream. On big-endian systems the 32-bit low and high halves need to be swapped for the underlying assembly implementation to work correctly. Fixes: fd1d362600e2 ("ARM: implement memset32 & memset64") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Arnd Bergmann Signed-off-by: Russell King (Oracle) Signed-off-by: Greg Kroah-Hartman --- arch/arm/include/asm/string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h @@ -42,7 +42,10 @@ static inline void *memset32(uint32_t *p extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi); static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n) { - return __memset64(p, v, n * 8, v >> 32); + if (IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN)) + return __memset64(p, v, n * 8, v >> 32); + else + return __memset64(p, v >> 32, n * 8, v); } /*