Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp346443lqo; Wed, 8 May 2024 01:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5knT8Ys9uXGI6eF52DFs09l0AcTLE65BvNC3ZCxKY8vJCNqdbKg8k9/+L1nwwebgTSc98mpVBHlkfUybKvCT8+2C95apm9j0EBV4cSw== X-Google-Smtp-Source: AGHT+IGwAiv2LPiSarDKhThg3UktcWj8QJoR1njw+CMcXuy8IcpQJJmnbDiwRL+a40ftCmdOtiwP X-Received: by 2002:a05:6871:3428:b0:22e:9792:97ed with SMTP id 586e51a60fabf-24098a5e551mr2491140fac.38.1715156152685; Wed, 08 May 2024 01:15:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715156152; cv=pass; d=google.com; s=arc-20160816; b=r/QPr4WxdqQ93wPQNYLERYj0mIiKze7DE4h/BhLBohCS80pEjbfT1Zd2VdKRhYea2e ClNZmweJiyQcM26SewwEbgNJMepoecRUQvXuZ5J7do0yi0uFowVtW3cNE2RkNQp7r1mq sMVPGr4G46uKgpjDhfJiBT5askVZLyB+kLPC92JzDaQqq/38/wnKikUDQZm2bSSiWX94 PqhZld+4lufGfz8Bth/ZheNurjUswU1Aw8aeH6in3ZNxAyyJEyLCVYffCu0QG2Y4j68B trM+FItruwHAjTSFEBWi6NoHfjXDGokETih/y8ylzmUfuU6abp1/lMIQXsJdRBt4t9gm JjQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YkBwfj+UBFX+LR/qBSUZ9MbPTTaK7KUk7eTsIVNbiWM=; fh=GYwExkYgyJWZNKe8uLUADIte747Ale7hL+fw+znN9wQ=; b=g0F57yI8dn1WmpWZmadCbuX4fIQIhkd3GOoq1TKXuRrHJgI//caDmAQPGUat+HfCjS WazQb3TRaoZIjEtf6psk30IvORhmS29dLM03t1nkz2vAbVJ/6UzkNMOcujqW222KbgkQ /hcc6UNFvzV7Ys775MQ1P0CasfPIbeZNK/SlzWg/yQGZ2uCgw9Kb6RWce36do6CBOjlD 6sOfuwbLVeJYIQKk9aCg2x2J3Vl0dHJ3/vD4Z3u5JUdv67c6oBH02HdhedQIinz/YKmg 8+sUoynSOsEEYau9LJM6jJoaJBLcbgOAUUxM2f9okgndfxRfG4jpM9BuWCJ6nQBvK/ge TsNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ovjlFQ8u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u73-20020a63794c000000b006313253ed88si442999pgc.245.2024.05.08.01.15.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ovjlFQ8u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C8732B25252 for ; Wed, 8 May 2024 08:07:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73F13548F0; Wed, 8 May 2024 08:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ovjlFQ8u" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 892D73D996; Wed, 8 May 2024 08:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715155548; cv=none; b=gUA4aRxITZd7oDEdxlBRpMxk/DmBjL4TTiUeTLKb66W58rRa7zIb360ZApW4gQzohvotrVZezzuuJ8J4Uqv/4YRHrKSc5fbwrrQLUFkoCrJMzmBV2In+9kiXI6ggI/AR4nvHDFGOdnqtIEsDcoyAG2OEtBTNnacY9Q9eErixsoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715155548; c=relaxed/simple; bh=hs3mKg+OQgaq+nvum86puw6d4BslQHZXpTBdAaPI+nY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QOVVgRXU74IAjy6qW4BYvCmUgd2bmzblg8xvYMlT6HjnjcrGKzvNtZwJlJGl/gqvH9tRK7W8JYNTa/qH+BCtjOFCacdtZmF3M56AS9R0pr6zVynf4gHJvrlQk8jpsFNJxDReLEKaE/sBWNEAQMrjIfJxdd3NH/QYpSfK7KztlV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ovjlFQ8u; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57027C4AF18; Wed, 8 May 2024 08:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715155548; bh=hs3mKg+OQgaq+nvum86puw6d4BslQHZXpTBdAaPI+nY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ovjlFQ8ukkRvL4ghs8zz4V4Kw25gMFTaKuE5sx+j5PMt25EqkuW7RedC1pfMLWx63 QEOFtHNRBffi6eG8d4Mc8xu7/ZyYm2seS4ecvxSlxfPCTPsLhk5MqZ4Pugbnx9ygmJ ygElqYKrHzPHkKg9gGbFrHYd8hMkQbOsVRr/ndDF8RPm+r98qt4Kj+lyRf4fsULQpg HMs+r9d6EMaqu/xPzpW45mnmK24O45KOknIWxUeRCB4Cob5QR2kfh7BNtNmwrHvghE yU8xCwRc7djD6gRoEWtKEOpa2BXeXhzcE5Wh5AZUeXxQ0HUevyciP88YZ8/e6YgjI2 tLmeOlFmOHC2Q== Date: Wed, 8 May 2024 10:05:40 +0200 From: Christian Brauner To: Linus Torvalds Cc: Daniel Vetter , Simon Ser , Pekka Paalanen , Christian =?utf-8?B?S8O2bmln?= , Al Viro , keescook@chromium.org, axboe@kernel.dk, christian.koenig@amd.com, dri-devel@lists.freedesktop.org, io-uring@vger.kernel.org, jack@suse.cz, laura@labbott.name, linaro-mm-sig@lists.linaro.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, minhquangbui99@gmail.com, sumit.semwal@linaro.org, syzbot+045b454ab35fd82a35fb@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Subject: Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes Message-ID: <20240508-gefangen-unberechenbar-96845bd61def@brauner> References: <20240503212428.GY2118490@ZenIV> <20240504-wohngebiet-restwert-6c3c94fddbdd@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, May 07, 2024 at 12:07:10PM -0700, Linus Torvalds wrote: > On Tue, 7 May 2024 at 11:04, Daniel Vetter wrote: > > > > On Tue, May 07, 2024 at 09:46:31AM -0700, Linus Torvalds wrote: > > > > > I'd be perfectly ok with adding a generic "FISAME" VFS level ioctl > > > too, if this is possibly a more common thing. and not just DRM wants > > > it. > > > > > > Would something like that work for you? > > > > Yes. > > > > Adding Simon and Pekka as two of the usual suspects for this kind of > > stuff. Also example code (the int return value is just so that callers know > > when kcmp isn't available, they all only care about equality): > > > > https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/util/os_file.c#L239 > > That example thing shows that we shouldn't make it a FISAME ioctl - we > should make it a fcntl() instead, and it would just be a companion to > F_DUPFD. > > Doesn't that strike everybody as a *much* cleaner interface? I think +1 See https://github.com/systemd/systemd/blob/a4f0e0da3573a10bc5404142be8799418760b1d1/src/basic/fd-util.c#L517 that's another heavy user of this kind of functionality.