Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196AbYJEJIx (ORCPT ); Sun, 5 Oct 2008 05:08:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752725AbYJEJIp (ORCPT ); Sun, 5 Oct 2008 05:08:45 -0400 Received: from nf-out-0910.google.com ([64.233.182.186]:59929 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752485AbYJEJIo (ORCPT ); Sun, 5 Oct 2008 05:08:44 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=LOhxBGfkJjBE3tVHd+UBAR3/AZVoR08TzBtgY8l2TZOqxdt/HQSk7EofGV7waPMaXs SPJiaqWcSPla5cZh2FGKGncj76e9emt7ifIvaBkRBHHZgeTsLi/ZHB/HktMCJyiGFVlA xyS7NhkxIH4cMGbvA7mQD4HZxh3fkRVECmXZs= Date: Sun, 5 Oct 2008 13:11:20 +0400 From: Alexey Dobriyan To: Arjan van de Ven Cc: Kees Cook , linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: add "personality" to process status file Message-ID: <20081005091120.GA21003@x200.localdomain> References: <20081002211424.GJ10632@outflux.net> <20081004145149.52c34ee7@infradead.org> <20081004220220.GK10632@outflux.net> <20081004164239.0c1483a4@infradead.org> <20081005004233.GL10632@outflux.net> <20081004174843.6fe48a8e@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081004174843.6fe48a8e@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1760 Lines: 43 On Sat, Oct 04, 2008 at 05:48:43PM -0700, Arjan van de Ven wrote: > On Sat, 4 Oct 2008 17:42:33 -0700 > Kees Cook wrote: > > > On Sat, Oct 04, 2008 at 04:42:39PM -0700, Arjan van de Ven wrote: > > > On Sat, 4 Oct 2008 15:02:20 -0700 > > > Kees Cook wrote: > > > > Nothing else seemed appropriate, but I could make a brand new proc > > > > file, if that's sensible. "status_private" ? > > > > > > how about a file called "personality" that has each set bit as an > > > ascii version ? > > > (one per line maybe) > > > > Well, it's a one-to-many due to how the personality types are defined, > > so doing a bitfield-to-ASCII-names conversion wouldn't really work > > out: > > > > PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | > > WHOLE_SECONDS | SHORT_INODE, > > PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | > > WHOLE_SECONDS, ... > > PER_BSD = 0x0006, > > PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, > > > > But I can certainly just make it a stand-alone file with just the > > bitfield. Or, I can still do the conversion and ignore PER_OSR5 and > > PER_SUNOS. > > well.. if "you" as kernel can't really make out what it is, how is poor > userspace supposed to do it ? Kernel should just print with %lx and leave pretty-printing to luserspace. And name should be /proc/*/personality (obviously :-) Assuming anybody cares about personalities at all. -- 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/