lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Dec 2018 12:49:44 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>, x86@...nel.org
Cc:     linux-kernel@...r.kernel.org, luto@...nel.org, peterz@...radead.org
Subject: Re: [PATCH] x86/mpx: pass 'mm' to kernel_managing_mpx_tables() in
 mpx_notify_unmap()

On 12/3/18 12:43 PM, Jarkko Sakkinen wrote:
> If mm is not the same as current->mm, mpx_notify_unmap() will yield
> invalid results and at worst will lead to a crash if it gets called by
> a kthread.

It's also worth noting that this does not fix any actual,
end-user-visible bug today.  It really only prepares the code for the
case where it is called for a different mm than current->mm.

> --- a/arch/x86/mm/mpx.c
> +++ b/arch/x86/mm/mpx.c
> @@ -882,7 +882,7 @@ static int mpx_unmap_tables(struct mm_struct *mm,
>   * necessary, and the 'vma' is the first vma in this range (start -> end).
>   */
>  void mpx_notify_unmap(struct mm_struct *mm, struct vm_area_struct *vma,
> -		unsigned long start, unsigned long end)
> +		      unsigned long start, unsigned long end)
>  {
>  	int ret;

Please leave superfluous whitespace changes out of these things.

But, otherwise, this looks fine.

> Fixes: 1de4fa14ee25 ("x86, mpx: Cleanup unused bound tables")

FWIW, I'm not sure you should be submitting this separately from your
SGX series.  The deferred unmapping is really the thing that requires
the code to be changed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ