lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173858700679.10177.6725513729928336032.tip-bot2@tip-bot2>
Date: Mon, 03 Feb 2025 12:50:06 -0000
From: "tip-bot2 for Mike Rapoport (Microsoft)" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Mike Rapoport (Microsoft)" <rppt@...nel.org>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/mm] x86/mm/pat: cpa-test: fix length for CPA_ARRAY test

The following commit has been merged into the x86/mm branch of tip:

Commit-ID:     33ea120582a638b2f2e380a50686c2b1d7cce795
Gitweb:        https://git.kernel.org/tip/33ea120582a638b2f2e380a50686c2b1d7cce795
Author:        Mike Rapoport (Microsoft) <rppt@...nel.org>
AuthorDate:    Sun, 26 Jan 2025 09:47:25 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 03 Feb 2025 11:46:01 +01:00

x86/mm/pat: cpa-test: fix length for CPA_ARRAY test

The CPA_ARRAY test always uses len[1] as numpages argument to
change_page_attr_set() although the addresses array is different each
iteration of the test loop.

Replace len[1] with len[i] to have numpages matching the addresses array.

Fixes: ecc729f1f471 ("x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftests")
Signed-off-by: "Mike Rapoport (Microsoft)" <rppt@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lore.kernel.org/r/20250126074733.1384926-2-rppt@kernel.org
---
 arch/x86/mm/pat/cpa-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pat/cpa-test.c b/arch/x86/mm/pat/cpa-test.c
index 3d2f7f0..ad3c1fe 100644
--- a/arch/x86/mm/pat/cpa-test.c
+++ b/arch/x86/mm/pat/cpa-test.c
@@ -183,7 +183,7 @@ static int pageattr_test(void)
 			break;
 
 		case 1:
-			err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1);
+			err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1);
 			break;
 
 		case 2:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ