On Thu, Jan 22, 2026 at 01:54:35PM +0800, Wentong Tian wrote:
> The vm_flags_t type is the dedicated type for virtual memory flags.
> Architecture and driver code should use this type instead of assuming
> vm_flags is an unsigned long, as the underlying type may change in the
> future.
>
> This follows the cleanup in commit d75fa3c94750 ("mm: update
> architecture and driver code to use vm_flags_t") by converting the
> remaining vm_prot_bits usage in SGX code.
>
> No functional change intended.
>
> Signed-off-by: Wentong Tian <[email protected]>
> ---
> arch/x86/kernel/cpu/sgx/encl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
> index cf149b9f4916..814edcde225d 100644
> --- a/arch/x86/kernel/cpu/sgx/encl.c
> +++ b/arch/x86/kernel/cpu/sgx/encl.c
> @@ -281,7 +281,7 @@ static struct sgx_encl_page
> *sgx_encl_load_page_in_vma(struct sgx_encl *encl,
> unsigned long addr,
> vm_flags_t vm_flags)
> {
> - unsigned long vm_prot_bits = vm_flags & VM_ACCESS_FLAGS;
> + vm_flags_t vm_prot_bits = vm_flags & VM_ACCESS_FLAGS;
> struct sgx_encl_page *entry;
>
> entry = xa_load(&encl->page_array, PFN_DOWN(addr));
> --
> 2.34.1
>
Reviewed-by: Jarkko Sakkinen <[email protected]>
BR, Jarkko