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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240902134953.e834bc2e57d36b1d3b1397e4@linux-foundation.org>
Date: Mon, 2 Sep 2024 13:49:53 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Sven Schnelle <svens@...ux.ibm.com>
Cc: Nathan Chancellor <nathan@...nel.org>, Michael Ellerman
 <mpe@...erman.id.au>, linux-mm@...ck.org, linuxppc-dev@...ts.ozlabs.org,
 torvalds@...ux-foundation.org, christophe.leroy@...roup.eu,
 jeffxu@...gle.com, Liam.Howlett@...cle.com, linux-kernel@...r.kernel.org,
 npiggin@...il.com, oliver.sang@...el.com, pedro.falcato@...il.com,
 linux-um@...ts.infradead.org, linux-s390@...r.kernel.org, Ravi Bangoria
 <ravi.bangoria@...ux.ibm.com>, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH v2 1/4] mm: Add optional close() to struct
 vm_special_mapping

On Mon, 02 Sep 2024 21:06:48 +0200 Sven Schnelle <svens@...ux.ibm.com> wrote:

> So uprobe_clear_state() in the beginning free's the memory area
> containing the vm_special_mapping data, but exit_mmap() uses this
> address later via vma->vm_private_data (which was set in _install_special_mapping().
> 
> The following change fixes this for me, but i'm not sure about any side
> effects:
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index df8e4575ff01..cfcabba36c93 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1340,11 +1340,11 @@ static inline void __mmput(struct mm_struct *mm)
>  {
>         VM_BUG_ON(atomic_read(&mm->mm_users));
>  
> -       uprobe_clear_state(mm);
>         exit_aio(mm);
>         ksm_exit(mm);
>         khugepaged_exit(mm); /* must run before exit_mmap */
>         exit_mmap(mm);
> +       uprobe_clear_state(mm);
>         mm_put_huge_zero_folio(mm);
>         set_mm_exe_file(mm, NULL);
>         if (!list_empty(&mm->mmlist)) {

uprobe_clear_state() is a pretty simple low-level thing.  Side-effects
seem unlikely?  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ