Re: [PATCH 20/34] x86, pkeys: differentiate instruction fetches

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

 



On Thu, 3 Dec 2015, Dave Hansen wrote:
>  static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
> -		bool write, bool foreign)
> +		bool write, bool execute, bool foreign)
....
> +	/*
> +	 * gups are always data accesses, not instruction
> +	 * fetches, so execute=0 here

Again. Can we please be consistent about booleans?

> +	 */
> +	if (!arch_vma_access_permitted(vma, write, 0, foreign))
>  		return -EFAULT;
>  	return 0;
>  }
> @@ -576,8 +580,11 @@ bool vma_permits_fault(struct vm_area_st
>  	/*
>  	 * The architecture might have a hardware protection
>  	 * mechanism other than read/write that can deny access.
> +	 *
> +	 * gup always represents data access, not instruction
> +	 * fetches, so execute=0 here:
>  	 */
> -	if (!arch_vma_access_permitted(vma, write, foreign))
> +	if (!arch_vma_access_permitted(vma, write, 0, foreign))
>  		return false;

Ditto.

Other than that: Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]