lkml.org 
[lkml]   [2014]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] x86, mpx: on-demand kernel allocation of bounds tables
On Fri, 14 Nov 2014, Dave Hansen wrote:
> * move mm init-time #ifdef to mpx.h

> +static inline void arch_bprm_mm_init(struct mm_struct *mm,
> + struct vm_area_struct *vma)
> +{
> + mpx_mm_init(mm);
> +#ifdef CONFIG_X86_INTEL_MPX
> + mm->bd_addr = MPX_INVALID_BOUNDS_DIR;
> +#endif

So we have a double init now :)

> +++ b/arch/x86/kernel/setup.c 2014-11-14 07:06:23.941684394 -0800
> @@ -959,6 +959,13 @@ void __init setup_arch(char **cmdline_p)
> init_mm.end_code = (unsigned long) _etext;
> init_mm.end_data = (unsigned long) _edata;
> init_mm.brk = _brk_end;
> +#ifdef CONFIG_X86_INTEL_MPX
> + /*
> + * NULL is theoretically a valid place to put the bounds
> + * directory, so point this at an invalid address.
> + */
> + init_mm.bd_addr = MPX_INVALID_BOUNDS_DIR;
> +#endif

And this one wants mpx_mm_init() replacement as well.

Thanks,

tglx


\
 
 \ /
  Last update: 2014-11-14 18:21    [W:0.120 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site