Skip to contentSkip to conversation

x86/sgx: Drop 'page_index' from sgx_backing

PATCH Applied Kristen Carlson Accardi 3 participants 3 messages Jul 8, 2022 – Jul 11, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/sgx: Drop 'page_index' from sgx_backing

From: Sean Christopherson <[email protected]>

Storing the 'page_index' value in the sgx_backing struct is dead code and no longer needed.

---
 arch/x86/kernel/cpu/sgx/encl.c | 1 -
 arch/x86/kernel/cpu/sgx/encl.h | 1 -
 2 files changed, 2 deletions(-)
arch/x86/kernel/cpu/sgx/encl.c +0 -1
index 19876ebfb504..fa93586a536c 100644
@@ -735,7 +735,6 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 		return PTR_ERR(pcmd);
 	}
 
-	backing->page_index = page_index;
 	backing->contents = contents;
 	backing->pcmd = pcmd;
 	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
arch/x86/kernel/cpu/sgx/encl.h +0 -1
index 332ef3568267..eeb1a53ddf48 100644
@@ -78,7 +78,6 @@ struct sgx_va_page {
 };
 
 struct sgx_backing {
-	pgoff_t page_index;
 	struct page *contents;
 	struct page *pcmd;
 	unsigned long pcmd_offset;
Signature · 1 line
2.20.1
#1 lore raw
The following commit has been merged into the x86/sgx branch of tip:

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

Commit-ID:     e0a5915f1cca21da8ffc0563aea9fa1df5d16fb4
Gitweb:        https://git.kernel.org/tip/e0a5915f1cca21da8ffc0563aea9fa1df5d16fb4
Author:        Sean Christopherson <[email protected]>
AuthorDate:    Fri, 08 Jul 2022 09:21:24 -07:00
Committer:     Dave Hansen <[email protected]>
CommitterDate: Fri, 08 Jul 2022 09:31:11 -07:00

x86/sgx: Drop 'page_index' from sgx_backing

Storing the 'page_index' value in the sgx_backing struct is dead code and no longer needed.

---
 arch/x86/kernel/cpu/sgx/encl.c | 1 -
 arch/x86/kernel/cpu/sgx/encl.h | 1 -
 2 files changed, 2 deletions(-)
arch/x86/kernel/cpu/sgx/encl.c +0 -1
index 295a9c9..73bfc5a 100644
@@ -943,7 +943,6 @@ int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 		return PTR_ERR(pcmd);
 	}
 
-	backing->page_index = page_index;
 	backing->contents = contents;
 	backing->pcmd = pcmd;
 	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
arch/x86/kernel/cpu/sgx/encl.h +0 -1
index 3d0e0ba..57cc236 100644
@@ -79,7 +79,6 @@ struct sgx_va_page {
 };
 
 struct sgx_backing {
-	pgoff_t page_index;
 	struct page *contents;
 	struct page *pcmd;
 	unsigned long pcmd_offset;
maintainer Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf

In reply to Kristen Carlson Accardi
Quoted 40 lines · Kristen Carlson Accardi

From: Sean Christopherson <[email protected]>

Storing the 'page_index' value in the sgx_backing struct is dead code and no longer needed.

---
 arch/x86/kernel/cpu/sgx/encl.c | 1 -
 arch/x86/kernel/cpu/sgx/encl.h | 1 -
 2 files changed, 2 deletions(-)
arch/x86/kernel/cpu/sgx/encl.c +0 -1
index 19876ebfb504..fa93586a536c 100644
@@ -735,7 +735,6 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 		return PTR_ERR(pcmd);
 	}
 
-	backing->page_index = page_index;
 	backing->contents = contents;
 	backing->pcmd = pcmd;
 	backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
arch/x86/kernel/cpu/sgx/encl.h +0 -1
index 332ef3568267..eeb1a53ddf48 100644
@@ -78,7 +78,6 @@ struct sgx_va_page {
 };
 
 struct sgx_backing {
-	pgoff_t page_index;
 	struct page *contents;
 	struct page *pcmd;
 	unsigned long pcmd_offset;
Signature · 1 line
2.20.1

BR, Jarkko