Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 9 Dec 2002 11:19:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 9 Dec 2002 11:19:52 -0500 Received: from adsl-206-170-148-147.dsl.snfc21.pacbell.net ([206.170.148.147]:16908 "EHLO gw.goop.org") by vger.kernel.org with ESMTP id ; Mon, 9 Dec 2002 11:19:52 -0500 Subject: Re: Detecting threads vs processes with ps or /proc From: Jeremy Fitzhardinge To: Robert Love Cc: Nick LeRoy , Linux Kernel List In-Reply-To: <1039205353.1943.2191.camel@phantasy> References: <200212060924.02162.nleroy@cs.wisc.edu> <1039204112.1943.2142.camel@phantasy> <200212061356.16022.nleroy@cs.wisc.edu> <1039205353.1943.2191.camel@phantasy> Content-Type: text/plain Organization: Message-Id: <1039451252.5905.866.camel@ixodes.goop.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 09 Dec 2002 08:27:33 -0800 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 20 On Fri, 2002-12-06 at 12:09, Robert Love wrote: > One thing to note: if you can modify the kernel and procps, you can just > export the value of task->mm out of /proc. It is a gross hack, and > perhaps a security issue, but that will work 100%. Same ->mm implies > thread. It isn't a terribly gross hack. I have a patch (somewhere...) which adds an ASID: field to /proc//status, which simply contains the mm pointer (as an opaque identifier token). If you were worried about exposing (yet another) kernel pointer value, I suppose you could mush it about a bit, but I think that would give the illusion of obscurity rather than any actual increase in security. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/