Re: [PATCH RESEND 2/2] x86/mm: Randomize va with generic arch_pick_mmap_layout()

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

 



On Tue, Sep 21, 2021 at 10:34:14PM +0800, sxwjean@xxxxxx wrote:
> diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
> index 7516e4199b3c..c697e377644d 100644
> --- a/arch/x86/include/asm/compat.h
> +++ b/arch/x86/include/asm/compat.h
> @@ -151,6 +151,11 @@ struct compat_shmid64_ds {
>  	compat_ulong_t __unused5;
>  };
>  
> +static inline int is_compat_task(void)
> +{
> +	return IS_ENABLED(CONFIG_COMPAT) && test_thread_flag(TIF_32BIT);
> +}
> +

This is still fundamentally broken for x86. x86 doesn't have compat
tasks, the granularity is at syscall at best.




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

  Powered by Linux