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: <20200307110007.fmtaaqt2udsgohtp@wittgenstein>
Date:   Sat, 7 Mar 2020 12:00:07 +0100
From:   Christian Brauner <christian.brauner@...ntu.com>
To:     minyard@....org
Cc:     linux-kernel@...r.kernel.org, Corey Minyard <cminyard@...sta.com>,
        stable@...r.kernel.org, Adrian Reber <areber@...hat.com>,
        Oleg Nesterov <oleg@...hat.com>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Andrei Vagin <avagin@...il.com>
Subject: Re: [PATCH v2] pid: Fix error return value in some cases

On Fri, Mar 06, 2020 at 11:23:14AM -0600, minyard@....org wrote:
> From: Corey Minyard <cminyard@...sta.com>
> 
> Recent changes to alloc_pid() allow the pid number to be specified on
> the command line.  If set_tid_size is set, then the code scanning the
> levels will hard-set retval to -EPERM, overriding it's previous -ENOMEM
> value.
> 
> After the code scanning the levels, there are error returns that do not
> set retval, assuming it is still set to -ENOMEM.
> 
> So set retval back to -ENOMEM after scanning the levels.
> 
> Fixes: 49cb2fc42ce4 "fork: extend clone3() to support setting a PID"
> Signed-off-by: Corey Minyard <cminyard@...sta.com>
> Cc: <stable@...r.kernel.org> # 5.5
> Cc: Adrian Reber <areber@...hat.com>
> Cc: Christian Brauner <christian.brauner@...ntu.com>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Dmitry Safonov <0x7f454c46@...il.com>
> Cc: Andrei Vagin <avagin@...il.com>

Thanks! I've pulled the patch now and applied.

I think that restores the old behavior. If you don't mind, I'll add a
comment on top of it saying something like:
"ENOMEM is not the most obvious choice but it's the what we've been
 exposing to userspace for a long time and it's also documented
 behavior. So we can't easily change it to something more sensible."

Acked-by: Christian Brauner <christian.brauner@...ntu.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ