Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754678AbaGHMsv (ORCPT ); Tue, 8 Jul 2014 08:48:51 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:59965 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754455AbaGHMst (ORCPT ); Tue, 8 Jul 2014 08:48:49 -0400 MIME-Version: 1.0 In-Reply-To: <20140708120702.GB30459@infradead.org> References: <1404124096-21445-1-git-send-email-drysdale@google.com> <1404124096-21445-2-git-send-email-drysdale@google.com> <20140630154928.GB10375@google.com> <20140708120702.GB30459@infradead.org> From: Meredydd Luff Date: Tue, 8 Jul 2014 13:48:27 +0100 Message-ID: Subject: Re: [PATCH 01/11] fs: add O_BENEATH_ONLY flag to openat(2) To: Christoph Hellwig Cc: Andy Lutomirski , David Drysdale , Al Viro , LSM List , Greg Kroah-Hartman , James Morris , Kees Cook , Linux API , "linux-kernel@vger.kernel.org" , linux-man@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8 July 2014 13:07, Christoph Hellwig wrote: > There's two different AT_* namespaces. The flags that most *at syscalls > has, and the the one for the dfd argument, which currently only contains > AT_FDCWD, although a new constant has recently been proposed to it. > > Having an AT_BENEATH magic value for the dfd argument certainly feels > elegant to me How would that work? The directory beneath which openat is looking is conveyed in the dfd argument itself. If I'm understanding this right, you'd have to pass a different value for "open relative to fd#5" and "open relative to fd#5, but beneath it only", which doesn't sound hugely elegant to me. Meredydd -- 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/