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: <20200504150235.12171-2-alexandre.chartre@oracle.com>
Date:   Mon,  4 May 2020 17:02:22 +0200
From:   Alexandre Chartre <alexandre.chartre@...cle.com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
        x86@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     pbonzini@...hat.com, konrad.wilk@...cle.com,
        jan.setjeeilers@...cle.com, liran.alon@...cle.com,
        junaids@...gle.com, graf@...zon.de, rppt@...ux.vnet.ibm.com,
        kuzuno@...il.com, mgross@...ux.intel.com,
        alexandre.chartre@...cle.com
Subject: [RFC v4][PATCH part-3 01/14] mm/asi: Define the test ASI type

Define the test ASI type which can be used for testing or experimenting
ASI.

Signed-off-by: Alexandre Chartre <alexandre.chartre@...cle.com>
---
 arch/x86/include/asm/asi.h | 2 ++
 arch/x86/mm/asi.c          | 1 +
 drivers/staging/Makefile   | 1 +
 3 files changed, 4 insertions(+)

diff --git a/arch/x86/include/asm/asi.h b/arch/x86/include/asm/asi.h
index eafed750e07f..de4f790c630b 100644
--- a/arch/x86/include/asm/asi.h
+++ b/arch/x86/include/asm/asi.h
@@ -66,6 +66,7 @@ struct asi_tlb_state {
 #ifdef CONFIG_PAGE_TABLE_ISOLATION
 #define ASI_PCID_PREFIX_USER		0x80	/* user ASI */
 #endif
+#define ASI_PCID_PREFIX_TEST		0xff	/* test ASI */
 
 struct asi_type {
 	int			pcid_prefix;	/* PCID prefix */
@@ -156,6 +157,7 @@ extern int asi_init_dpt(struct dpt *dpt);
 #ifdef CONFIG_PAGE_TABLE_ISOLATION
 DECLARE_ASI_TYPE(user);
 #endif
+DECLARE_ASI_TYPE(test);
 
 static inline void asi_set_log_policy(struct asi *asi, int policy)
 {
diff --git a/arch/x86/mm/asi.c b/arch/x86/mm/asi.c
index 8b670ed13729..e0b0d70415d7 100644
--- a/arch/x86/mm/asi.c
+++ b/arch/x86/mm/asi.c
@@ -17,6 +17,7 @@
 #ifdef CONFIG_PAGE_TABLE_ISOLATION
 DEFINE_ASI_TYPE(user, ASI_PCID_PREFIX_USER, false);
 #endif
+DEFINE_ASI_TYPE(test, ASI_PCID_PREFIX_TEST, true);
 
 static void asi_log_fault(struct asi *asi, struct pt_regs *regs,
 			   unsigned long error_code, unsigned long address,
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 4d34198151b3..fb50e669579b 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -50,3 +50,4 @@ obj-$(CONFIG_FIELDBUS_DEV)     += fieldbus/
 obj-$(CONFIG_KPC2000)		+= kpc2000/
 obj-$(CONFIG_QLGE)		+= qlge/
 obj-$(CONFIG_WFX)		+= wfx/
+obj-$(CONFIG_ADDRESS_SPACE_ISOLATION) += asi/
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ