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]
Message-ID: <20200818175751.xg726hgyirbt354d@wittgenstein>
Date:   Tue, 18 Aug 2020 19:57:51 +0200
From:   Christian Brauner <christian.brauner@...ntu.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Christoph Hewllig <hch@...radead.org>,
        linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-arch@...r.kernel.org, Jonathan Corbet <corbet@....net>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Ley Foon Tan <ley.foon.tan@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, Arnd Bergmann <arnd@...db.de>,
        Steven Rostedt <rostedt@...dmis.org>,
        Stafford Horne <shorne@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Kars de Jong <jongk@...ux-m68k.org>,
        Kees Cook <keescook@...omium.org>,
        Greentime Hu <green.hu@...il.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Tom Zanussi <zanussi@...nel.org>,
        Xiao Yang <yangx.jy@...fujitsu.com>, linux-doc@...r.kernel.org,
        uclinux-h8-devel@...ts.sourceforge.jp, linux-ia64@...r.kernel.org,
        linux-m68k@...ts.linux-m68k.org, sparclinux@...r.kernel.org,
        kgdb-bugreport@...ts.sourceforge.net,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()

On Tue, Aug 18, 2020 at 06:44:47PM +0100, Matthew Wilcox wrote:
> On Tue, Aug 18, 2020 at 07:34:00PM +0200, Christian Brauner wrote:
> > The only remaining function callable outside of kernel/fork.c is
> > _do_fork(). It doesn't really follow the naming of kernel-internal
> > syscall helpers as Christoph righly pointed out. Switch all callers and
> > references to kernel_clone() and remove _do_fork() once and for all.
> 
> My only concern is around return type.  long, int, pid_t ... can we
> choose one and stick to it?  pid_t is probably the right return type
> within the kernel, despite the return type of clone3().  It'll save us
> some work if we ever go through the hassle of growing pid_t beyond 31-bit.

It should be safe to switch kernel_clone() to return pid_t. (Afair, the
syscall wrappers all have "long" as return type. (I think Linus provided
some more details on that in another mail. Also see
include/linux/syscalls.h. So the return type for clone3() is really
somewhat a userspace thing, I think.)

I wonder whether I should take the opportunity and switch the advertised
flag arguments for the legacy clone() syscalls and kernel_thread() from
unsigned long to unsigned int so we can get rid of the lower
		.flags		= (lower_32_bits(clone_flags) & ~CSIGNAL),
calls I added to fix sign extension issues glibc ran into...

Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ