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-next>] [day] [month] [year] [list]
Message-Id: <200711082131.lA8LVhnk015137@imap1.linux-foundation.org>
Date:	Thu, 08 Nov 2007 13:31:43 -0800
From:	akpm@...ux-foundation.org
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, drepper@...hat.com, mingo@...e.hu,
	roland@...hat.com
Subject: [patch 2/2] clone: prepare to recycle CLONE_DETACHED and CLONE_STOPPED

From: Andrew Morton <akpm@...ux-foundation.org>

Ulrich says that we never used these clone flags and that nothing should be
using them.

As we're down to only a single bit left in clone's flags argument, let's add a
warning to check that no userspace is actually using these.  Hopefully we will
be able to recycle them.

Cc: Ulrich Drepper <drepper@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Roland McGrath <roland@...hat.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 kernel/fork.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff -puN kernel/fork.c~clone-prepare-to-recycle-clone_detached-and-clone_stopped kernel/fork.c
--- a/kernel/fork.c~clone-prepare-to-recycle-clone_detached-and-clone_stopped
+++ a/kernel/fork.c
@@ -1420,10 +1420,18 @@ long do_fork(unsigned long clone_flags,
 	int trace = 0;
 	long nr;
 
-	if (unlikely(current->ptrace)) {
-		trace = fork_traceflag (clone_flags);
-		if (trace)
-			clone_flags |= CLONE_PTRACE;
+	/*
+	 * We hope to recycle these flags after 2.6.26
+	 */
+	if (unlikely(clone_flags & (CLONE_DETACHED|CLONE_STOPPED))) {
+		if (printk_ratelimit()) {
+			char comm[TASK_COMM_LEN];
+
+			printk(KERN_INFO "fork(): process `%s' used deprecated "
+					"clone flags 0x%lx\n",
+				get_task_comm(comm, current),
+				clone_flags & (CLONE_DETACHED|CLONE_STOPPED));
+		}
 	}
 
 	p = copy_process(clone_flags, stack_start, regs, stack_size,
_
-
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