Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp151525ybj; Fri, 8 May 2020 08:31:57 -0700 (PDT) X-Google-Smtp-Source: APiQypI/XEEFOOz9XPkz4P1Ov8At3m4tjUZL8EcR+cp1NsbLtfMFG/b9zK/YeTCqSMgSfAceUiap X-Received: by 2002:a17:907:9488:: with SMTP id dm8mr2289546ejc.230.1588951917009; Fri, 08 May 2020 08:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588951917; cv=none; d=google.com; s=arc-20160816; b=kIsZgMlm9sIq3xeOyp8jpvW5yBpiWGuQqjVxHGYv9QPf01iHuFTKCjmsUgbDyzAMi+ p1VOyUynnZUiRD7rxEx9+no54neOQQKEf0L+Ho64BCZWFo7IwQQtqGoYSgkWgA4IFHrb zVhP6swXiRZkbtI+LrpKHEOFTtug6XrbkhOuoVX77EnQ1fIUR2V0s/mdEnoCu7/2DW/t M+93vCgCR31iVOUKgieG9EbqhormxbtVO2/al869HjK/z3yJsRPLQLaAXj26drghTcLr oqBI0FdvF/W95yzNfkciaiI0F990h/WOsnqj6lpRLeA8UJzddADGZA2p+K6d1uU4Iypy xwLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=nk6RHcExY0LgqkERTzLyOugz5IoSHIMF3+L+W3k3sTM=; b=RN39jowjlcjL+UqSUlM+RvLwSO9iAPYJszi4Wh59G69HtuhTRbXCVibGG7xhfcWMES es8xf7qUqlIT+MoXXCu9dxzmCBG8c7zhkp5Y4F+p5Flt6oc20/b2jjNeYyg+/G+vOMc7 pmCt1Tl3UfU+BTwWxiadaXcd9b/YowEYpv5lYYUzie0uzBtR+MXWpORdf/pvVh3TIfMx VJdf/0D/YrkMkNTrnBXJafOYfeje+WpnEkHUb05sppKwjjqn/j8KKJXPqdZDNV2Cr0kH OSPc+OSG+YKhuspCInBSQIaNSljT2lpZxwm7s0lPPL5H7l8Jo9/TAz6rrfWlEN2rmKTK 9hqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=aYPt015R; 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 g18si1162148edm.285.2020.05.08.08.31.33; Fri, 08 May 2020 08:31:56 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=aYPt015R; 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 S1727099AbgEHP3z (ORCPT + 99 others); Fri, 8 May 2020 11:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbgEHP3z (ORCPT ); Fri, 8 May 2020 11:29:55 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 206C2C061A0C for ; Fri, 8 May 2020 08:29:55 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id j8so2141900iog.13 for ; Fri, 08 May 2020 08:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nk6RHcExY0LgqkERTzLyOugz5IoSHIMF3+L+W3k3sTM=; b=aYPt015R3MZqJU6zTu0YTrS7KdSMum8HJnR6RQ6e24WQOjI4Ur9QVeRJSY7NnRIFZd IZsmJq0UDIY5bHgFrmoNzkk8HH+8BGvKWk8akxsxOkOpB630b9BQiCvT4zMi+qY8JgCD 3+8cGBW551YKMlefQVS+yAHfyVzzPbtmkMqbTh5P+veODcnjHamwHJKPaPuLICvIO5AP MfWRVMizT+trP06HQvKiby2brIKZcTfW/o9uMrcVEc/jvBfnIZzrAf/lLkZRspTAXUQ0 3LrM7X0RSt0briJXai/4T912sG84ytx04Yl5ggGd6jN2UzCykfXlpWfub1e6Chvie+Xp 9z7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nk6RHcExY0LgqkERTzLyOugz5IoSHIMF3+L+W3k3sTM=; b=ID8mEiIFb1QJU2xvmo6tXWC0kPwGfLjZ60goFp2HPF+8qvDuxK0yU8zloMWGs+In7v NkMHtfOeplX/0sj3b6eI0jFfbCxD8IElRoBp434/4SrINsrwYMliVfHhT5FfA3zAV4b2 bF2NWLuDl94LNmKOyHwwY63LikhNKl4uAzuMblruh9l5cr4yyr+K7KJtiIhpDlLOXV9K zF+yJqwSGd6BuUvSOYLxFYC/8IL5yoBTQWDOCTycvxgfsAuj9J1zQrvOmUYm9yIPKVs7 xS3J2C7mcDRkGtP0ex2jsH68OPzR508UKxcYkuzpYpMGrE5mQScFD6HBYMvMdnQBlcxr ngiQ== X-Gm-Message-State: AGi0PuaF1WvFMDMYdbfuqIYElj3nAQyMZ9gLGI+9PinfEl2ELZX40jaY DXBRBcILbuvYUimyn/+/OZv1fZFZccQ= X-Received: by 2002:a02:c9cb:: with SMTP id c11mr2911600jap.93.1588951793971; Fri, 08 May 2020 08:29:53 -0700 (PDT) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id t62sm915931ill.87.2020.05.08.08.29.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 May 2020 08:29:53 -0700 (PDT) Subject: Re: [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx To: Max Kellermann Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200508063846.21067-1-mk@cm4all.com> <20200508064056.GA21129@rabbit.intern.cm-ag> From: Jens Axboe Message-ID: Date: Fri, 8 May 2020 09:29:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200508064056.GA21129@rabbit.intern.cm-ag> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/8/20 12:40 AM, Max Kellermann wrote: > 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. I'd prefer just to keep the single patch, the stable backports tend to throw rejects anyway, and it's quick enough for me to just provide a tested backport. The single version I posted also gets rid of the extra sqe read, where we really should be doing just one, for example. -- Jens Axboe