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] [day] [month] [year] [list]
Date: Wed, 27 Mar 2024 14:56:59 -0400
From: Peter Xu <peterx@...hat.com>
To: Peng Zhang <zhangpeng362@...wei.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, david@...hat.com,
	axelrasmussen@...gle.com, surenb@...gle.com, lokeshgidra@...gle.com,
	Liam.Howlett@...cle.com, wangkefeng.wang@...wei.com,
	sunnanyong@...wei.com
Subject: Re: [PATCH] userfaultfd: early return in dup_userfaultfd()

On Wed, Mar 27, 2024 at 05:08:35PM +0800, Peng Zhang wrote:
> From: ZhangPeng <zhangpeng362@...wei.com>
> 
> When vma->vm_userfaultfd_ctx.ctx is NULL, vma->vm_flags should have
> cleared __VM_UFFD_FLAGS. Therefore, there is no need to down_write or
> clear the flag, which will affect fork performance. Fix this by
> returning early if octx is NULL in dup_userfaultfd().
> 
> By applying this patch we can get a 1.3% performance improvement for
> lmbench fork_prot. Results are as follows:
>                    base      early return
> Process fork+exit: 419.1106  413.4804
> 
> Signed-off-by: ZhangPeng <zhangpeng362@...wei.com>

Reviewed-by: Peter Xu <peterx@...hat.com>

-- 
Peter Xu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ