Skip to contentSkip to conversation

Rename variable smep to cr4_smep

PATCH New Feng Wu 1 participant 2 messages Apr 1, 2014

Subsystems (3)
lore
Share & tools
lore

Feng Wu

author
#0 lore raw

PATCH 1/1 Rename variable smep to cr4_smep

This patch is based on the smap patchset

Feng Wu (1):
Rename variable smep to cr4_smep

 arch/x86/kvm/mmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 1/1 Rename variable smep to cr4_smep

Rename variable smep to cr4_smep, which can better reflect the meaning of the variable.

---
 arch/x86/kvm/mmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kvm/mmu.c +3 -3
index a183783..6000557 100644
@@ -3606,9 +3606,9 @@ void update_permission_bitmask(struct kvm_vcpu *vcpu,
 {
 	unsigned bit, byte, pfec;
 	u8 map;
-	bool fault, x, w, u, wf, uf, ff, smapf, cr4_smap, smep, smap = 0;
+	bool fault, x, w, u, wf, uf, ff, smapf, cr4_smap, cr4_smep, smap = 0;
 
-	smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP);
+	cr4_smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP);
 	cr4_smap = kvm_read_cr4_bits(vcpu, X86_CR4_SMAP);
 	for (byte = 0; byte < ARRAY_SIZE(mmu->permissions); ++byte) {
 		pfec = byte << 1;
@@ -3633,7 +3633,7 @@ void update_permission_bitmask(struct kvm_vcpu *vcpu,
 				/* Allow supervisor writes if !cr0.wp */
 				w |= !is_write_protection(vcpu) && !uf;
 				/* Disallow supervisor fetches of user code if cr4.smep */
-				x &= !(smep && u && !uf);
+				x &= !(cr4_smep && u && !uf);
 
 				/*
 				 * SMAP:kernel-mode data accesses from user-mode
Signature · 1 line
1.8.3.1