Re: [PATCH 5/5] x86/sgx: Rename vm_prot_bits as max_vm_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-08-21 at 21:00 -0700, Sean Christopherson wrote:
> On Mon, Aug 19, 2019 at 06:25:44PM +0300, Jarkko Sakkinen wrote:
> > vm_prot_bits is very bad and misleading name for the field in struct
> > sgx_encl_page. What the field contains exactly is not @prot of
> > mprotect() but the *maximum* VM flags for the VMA that contains the
> > given enclave page.
> > 
> > Thus, the only viable name for the field is max_vm_flags. In functions
> > that also pass VM flags the parameter name is renamed from vm_prot_bits
> > to vm_flags.
> 
> Why not max_vm_prot_bits?  'vm_flags' implies the field contains all
> manner of VM_FLAGS.  The 'vm_prot_bits' name was derived from
> calc_vm_prot_bits() to provide this differentiation, especially since
> there's also a calc_vm_flag_bits(),

Squashed with vm_max_prot_bits.

/Jarkko




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux