Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1391701ybj; Thu, 7 May 2020 23:44:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKEFP38iQpa3ctTVLiA8Ts6ojebJRwsU93dBuyGibDbZ102LMvTo7MJsf70U5VGVwWzHGqx X-Received: by 2002:a17:906:1c94:: with SMTP id g20mr584608ejh.319.1588920246174; Thu, 07 May 2020 23:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588920246; cv=none; d=google.com; s=arc-20160816; b=rRsh2GGkyLAa10zwp2ihces+BRDbfP6VS/44V49y9+TD7vRUt7MsBB/sfXIxGUDcov CXb3EclHUBBhTnZk1b5llwu8DLbz7i9Ea5d2xnvidRSwR743ELOe2nML4cLrcUHohhKc XD31ilQ7HxQ76m1onnV28M0uLwkEZnYEyFyIbS8+tB3hoSzdAbXGcdCl8cEDExGfiqKm 5S1aSDeq4bJRDAkyqBKVi1PctHNeUCtMufv0UHZKn5ZjUHImkDGQYjfUTDLC+iVON1Wy 3ObQkwVe7YfcbV8mTkanxbgjzmYBfWBOTAQkr+fK2aC0Uh66Q5dHfmR2uvgiLyj6FR8E OGuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NsF1Rfv4ljbkksO2SWdo27Nf78gzz3HSXaVl3lq+3Fs=; b=buz0vp0UrX5UobIo0JMOYyFATma7dstzQhVrnAbaPSMosC/mdVmkvXI1Kx3PrOEmDF btaqSIbqLvFqpxDc9Dn/fZE8J813Nmj4oTb7IVP0JLR3jTvoY2D1oSRH0pZsSI6QkHdI 8cv7cp9Qmr7WFHd47oaeqwWGIFyTb0eVoPmiYl1Qo05TD3StG4L0cwSkLQAzHeZn/ibj 5PU83V4QJ3r0yZVBVWQxDuOzHcJvgTO7rTNx97HFaib3cazh9HR4RAAbZLEpdhkPC/O/ SUrXiUGmJ8a/v6WUHsXrjG+P6RdV1VMgUGVKCSJKBjNzdJvqRieAvS9qZoUBHWWkSrdk jWuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si381567ejz.499.2020.05.07.23.43.43; Thu, 07 May 2020 23:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgEHGlB (ORCPT + 99 others); Fri, 8 May 2020 02:41:01 -0400 Received: from nibbler.cm4all.net ([82.165.145.151]:43085 "EHLO nibbler.cm4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727867AbgEHGk7 (ORCPT ); Fri, 8 May 2020 02:40:59 -0400 Received: from localhost (localhost [127.0.0.1]) by nibbler.cm4all.net (Postfix) with ESMTP id EB97CC0271 for ; Fri, 8 May 2020 08:40:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at nibbler.cm4all.net Received: from nibbler.cm4all.net ([127.0.0.1]) by localhost (nibbler.cm4all.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 219PGDMDguyP for ; Fri, 8 May 2020 08:40:56 +0200 (CEST) Received: from zero.intern.cm-ag (zero.intern.cm-ag [172.30.16.10]) by nibbler.cm4all.net (Postfix) with SMTP id CBDD0C0263 for ; Fri, 8 May 2020 08:40:56 +0200 (CEST) Received: (qmail 4015 invoked from network); 8 May 2020 09:57:16 +0200 Received: from unknown (HELO rabbit.intern.cm-ag) (172.30.3.1) by zero.intern.cm-ag with SMTP; 8 May 2020 09:57:16 +0200 Received: by rabbit.intern.cm-ag (Postfix, from userid 1023) id A73C3461450; Fri, 8 May 2020 08:40:56 +0200 (CEST) Date: Fri, 8 May 2020 08:40:56 +0200 From: Max Kellermann To: axboe@kernel.dk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx Message-ID: <20200508064056.GA21129@rabbit.intern.cm-ag> References: <20200508063846.21067-1-mk@cm4all.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508063846.21067-1-mk@cm4all.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/05/08 08:38, Max Kellermann wrote: > This fails for `O_PATH` file descriptors, because io_file_get() calls > fget(), which rejects `O_PATH` file descriptors. To support `O_PATH`, > fdget_raw() must be used (like path_init() in `fs/namei.c` does). > This rejection causes io_req_set_file() to throw `-EBADF`. This > breaks the operations `openat`, `openat2` and `statx`, where `O_PATH` > file descriptors are commonly used. Code is the same as in v1, but I investigated the root cause of the problem and updated the patch description. Jens, I believe this should be a separate trivial commit just removing those flags, to allow Greg to backport this to stable easily. Max