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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230330233520.21937-4-chang.seok.bae@intel.com>
Date:   Thu, 30 Mar 2023 16:35:20 -0700
From:   "Chang S. Bae" <chang.seok.bae@...el.com>
To:     linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     shuah@...nel.org, tglx@...utronix.de, dave.hansen@...ux.intel.com,
        bp@...en8.de, chang.seok.bae@...el.com
Subject: [PATCH v3 3/3] selftests/x86/amx: Remove unneeded code

Remove some unused helper code. Also, get rid of the redundant permission
request.

Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
Cc: Shuah Khan <shuah@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-kselftest@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
Changes from v2:
* Add as a new patch
---
 tools/testing/selftests/x86/amx.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/tools/testing/selftests/x86/amx.c b/tools/testing/selftests/x86/amx.c
index f0b1efe89ef7..854f7d61be89 100644
--- a/tools/testing/selftests/x86/amx.c
+++ b/tools/testing/selftests/x86/amx.c
@@ -39,16 +39,6 @@ struct xsave_buffer {
 	};
 };
 
-static inline uint64_t xgetbv(uint32_t index)
-{
-	uint32_t eax, edx;
-
-	asm volatile("xgetbv;"
-		     : "=a" (eax), "=d" (edx)
-		     : "c" (index));
-	return eax + ((uint64_t)edx << 32);
-}
-
 static inline void xsave(struct xsave_buffer *xbuf, uint64_t rfbm)
 {
 	uint32_t rfbm_lo = rfbm;
@@ -110,8 +100,6 @@ static struct {
 
 #define CPUID_LEAF_XSTATE		0xd
 #define CPUID_SUBLEAF_XSTATE_USER	0x0
-#define TILE_CPUID			0x1d
-#define TILE_PALETTE_ID			0x1
 
 static void check_cpuid_xtiledata(void)
 {
@@ -161,12 +149,6 @@ static inline void clear_xstate_header(struct xsave_buffer *buffer)
 	memset(&buffer->header, 0, sizeof(buffer->header));
 }
 
-static inline uint64_t get_xstatebv(struct xsave_buffer *buffer)
-{
-	/* XSTATE_BV is at the beginning of the header: */
-	return *(uint64_t *)&buffer->header;
-}
-
 static inline void set_xstatebv(struct xsave_buffer *buffer, uint64_t bv)
 {
 	/* XSTATE_BV is at the beginning of the header: */
@@ -769,8 +751,6 @@ static void test_context_switch(void)
 	/* Affinitize to one CPU to force context switches */
 	affinitize_cpu0();
 
-	req_xtiledata_perm();
-
 	printf("[RUN]\tCheck tiledata context switches, %d iterations, %d threads.\n",
 	       ctxtswtest_config.iterations,
 	       ctxtswtest_config.num_threads);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ