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] [day] [month] [year] [list]
Date:	Thu, 25 Oct 2012 17:27:35 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Jonas Bonn <jonas@...thpole.se>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] openrisc: determine regs directly in copy_thread

On Thu, Oct 25, 2012 at 05:46:39PM +0200, Jonas Bonn wrote:
> copy_thread can use current_pt_regs() to get the pt_regs data that
> it needs so there's no need to pass this in as an argument.
> 
> As do_fork() doesn't use the regs argument for anything other than
> to pass it straight through to copy_thread, we just pass in a NULL
> argument in its place.  The plan seems to be to eventually drop the
> regs argument to do_fork altogether.

Hmm...  That's the plan, all right, but we need one more thing before
it's safe to pass NULL here.
        if (!(clone_flags & CLONE_UNTRACED) && likely(user_mode(regs))) {
in do_fork() should (and can right now, no prereqs for that one) become
simply
        if (!(clone_flags & CLONE_UNTRACED)) {
kernel_thread() *always* passes CLONE_UNTRACED, so it's not just "likely",
it's "always true if we get to evaluating that sucker in the first place".

FWIW, I think that merging that into mainline would be a good idea -
it would make life simpler and it's obviously safe.  Another thing I probably
want to push to Linus, for pretty much the same reasons: generic variants
of fork/vfork/clone, selected by matching __ARCH_WANT_SYS_...; obviously
safe and allows to do that unification in per-arch trees.  Less PITA
regarding the merge ordering that way...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ