Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759669AbXE3WUZ (ORCPT ); Wed, 30 May 2007 18:20:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755893AbXE3WUQ (ORCPT ); Wed, 30 May 2007 18:20:16 -0400 Received: from poll.devit.com ([216.165.189.132]:48623 "EHLO mx0.devit.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754144AbXE3WUO (ORCPT ); Wed, 30 May 2007 18:20:14 -0400 X-Greylist: delayed 1680 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 May 2007 18:20:14 EDT Date: Wed, 30 May 2007 16:51:51 -0500 From: "David M. Lloyd" To: Linus Torvalds Cc: Ulrich Drepper , Ingo Molnar , Jeff Garzik , Zach Brown , Linux Kernel Mailing List , Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Evgeniy Polyakov , "David S. Miller" , Suparna Bhattacharya , Jens Axboe , Thomas Gleixner Subject: Re: Syslets, Threadlets, generic AIO support, v6 Message-ID: <20070530165151.6c2719eb@localhost> In-Reply-To: References: <20070529212718.GH7875@mami.zabbo.net> <465CA654.5000505@garzik.org> <20070530072055.GA3077@elte.hu> <465D286E.2080807@redhat.com> <20070530084252.GA15708@elte.hu> <465DE992.6070803@redhat.com> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 969 Lines: 21 On Wed, 30 May 2007 14:27:52 -0700 (PDT) Linus Torvalds wrote: > Well, don't think of it as a special case at all: think of bit 30 as > a "the user asked for a non-linear fd". If the sole point is to protect an fd from being closed or operated on outside of a certain context, why not just provide the ability to "protect" an fd to prevent its use. Maybe a pair of syscalls like "fdprotect" and "fdunprotect" that take an fd and an integer key. Protected fds would return EBADF or something if accessed. The same integer key must be provided to fdunprotect in order to gain access to it again. Then glibc or valgrind or whatever would just unprotect the fd before operating on it. - DML - 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/