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, 16 May 2016 18:20:39 +0200
From:	Oleg Nesterov <>
To:	Andrea Arcangeli <>
Cc:	Andrew Morton <>,
	Linus Torvalds <>,,
Subject: Re: [PATCH 1/1] userfaultfd: don't pin the user memory in

On 05/16, Andrea Arcangeli wrote:
> Reviewed-by: Andrea Arcangeli <>


> > +static inline bool userfaultfd_get_mm(struct userfaultfd_ctx *ctx)
> > +{
> > +	return atomic_inc_not_zero(&ctx->mm->mm_users);
> > +}
> Nice cleanup, but wouldn't it be more generic to implement this as
> mmget(&ctx->mm) (or maybe mmget_not_zero) in include/linux/mm.h
> instead of userfaultfd.c, so then others can use it too, see:

Yes, agreed. userfaultfd_get_mm() doesn't look as good as I initially thought.

So I guess it would be better to make V2 right now, to avoid another change in
userfaultfd.c which changes the same code.

Except I think mmget_not_zero() should go to linux/sched.h, until we move
mmdrop/mmput/etc to linux/mm.h.

I'll send V2 soon...


Powered by blists - more mailing lists