Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp61068lqo; Tue, 7 May 2024 12:07:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6JNysnFr98RS3BBdGdAztE1qTMoxSOdBMUSCD+t5gjLhQ9LxIY27BNa/OUTu4VvEF4D9S4RM+39SybSa7EyH83wT5K7bUIqzGuZjNCg== X-Google-Smtp-Source: AGHT+IHmNwtIfyhBhoyzezfXKX3QkTmhoCfv8NCtQw96X2U3ygg0rL74P2oJgb0ZMoARifbUKkOq X-Received: by 2002:a17:90a:5b10:b0:2a1:fa5b:106 with SMTP id 98e67ed59e1d1-2b6169dacf3mr431268a91.30.1715108865319; Tue, 07 May 2024 12:07:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715108865; cv=pass; d=google.com; s=arc-20160816; b=cuWlQYyBmYfOXz/gwgAVZ/8S8u8Rtgf9CgPWJNbPDV77mthcapvAfyypOSUBYw4VJ/ OzhwvSATCMDGpu7Y3jKbp+160Z6JXpRkkxdOGjqHgESuTaJNMmkH/iqjbRuIKK+MsCp6 z7FRCZoahk3dN5tWtxWLKqKycwv90LmkEKhrixe2PAJ23iXR8/yUZjmLaZ9M2CfFMjEP 1XYME700L4l8N/RwsPlzm/znVc605RDKp7HUCrQYylLmdsK2TvRgVsG3JDqB9UTIQI5T ZnVsl3vpvNUU7+k4aqQacJqnDzWmFJnIUGUWuFegTRiD1LipCg88g2D9XR4TEjW5Xpca bInA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=JwU1IWNzhlSP5EH9iyMHaFmRpSbbE8IFJCVgZMlAkcM=; fh=/1cnlhy6viHBIZerDXx1Ui2uTFreT5xd8bCp3O66FDU=; b=eVEX/kfByIsju7TMDtNP+8Rg903J4oLFsWXWPuUuI/4MhuVF/j6TCfMxASawsAtWxm W1kr4IX0Fu8hio902dFyrABz+O9j774S2jj2D5IbScgi1gmcd+rrrq0SLrbBn/F5Da1m WbnmaieGLIKN0q3obKtYM3KiFTsBMvYdzHtacOfNU5AK0KEDNPweEpDohUHK8UzrP/91 nHenk3lVoVCZ8PUamANLOxEHbZJY8GrTpHNo5NSt1E4dau8/Q2C0PDG8c4aIgm5AG2pR ULitXC6CWJHfWnKdU2rdlFV1QTTFzy72xwxIgS4ftiRw4kIkCj3xFPzCk+DZEt6J99rO QKbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UQ4COlZi; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-172033-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172033-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m12-20020a17090a858c00b002b43aefd058si9157537pjn.6.2024.05.07.12.07.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172033-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UQ4COlZi; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-172033-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172033-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C3E0F284378 for ; Tue, 7 May 2024 19:07:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18A3B16DEC4; Tue, 7 May 2024 19:07:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="UQ4COlZi" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BE1916D9C8 for ; Tue, 7 May 2024 19:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715108853; cv=none; b=bxyR/YtxHBEu194ttuTrRAteB2creJknGtbVZRNhyuUSxtXtZ32yePIXi9JLWQZb29mai32AT/X/cQLbRFXMWoekWSjn1FblU8JaviZ+qz8Vz99U/9aPGQdqU68/pep0jzWlLUio2CkB9uPhcO3t8rcWENTG3dZ6s9s8bh15in4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715108853; c=relaxed/simple; bh=pui840tsR5Yet33PCWgvY2wZoLY0nvaSbhvNkKxiwJY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=O0sSao7P2CG0t9PjOBvXBHO+jdMj4C/i+lCpXX6Rk5644UqkxZaDvPBH2UfXOL17EuqIT0bPMrzRO6TByozXYE9iSr/+n5HFQI4Oa3AZc8S8cwAK0P4cDo8/0PBH3+oedcoK3sDgb40AFR9fn0htIZUE5OPYmYAp3l+A9XYALCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=UQ4COlZi; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a59a5f81af4so918586766b.3 for ; Tue, 07 May 2024 12:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1715108849; x=1715713649; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JwU1IWNzhlSP5EH9iyMHaFmRpSbbE8IFJCVgZMlAkcM=; b=UQ4COlZi1wjGRec1vXSHfd/ePwofzv5i+nayllj0aKOQVMkogpronwS7fiNKGmJYdc REVt1UaVKAKyPpoa8plwTreCFTeU3qc2gfW4ylySKcUh3P80ZgAPmXXBjy+U3z68P0a7 6wtqLOMLsQfLwo6VHZ4W8c4W0n2CIrr86nD1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715108849; x=1715713649; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JwU1IWNzhlSP5EH9iyMHaFmRpSbbE8IFJCVgZMlAkcM=; b=jBGBh5z5x+1Bws3nC1rwDm/jhaH6g+xGJN118Tv68W0gpuzxORj+J1TdS6OEbFSrmE 5E5lUwfZ6PFmIKE8bvFaWOyL8EJ+w5qMcc7ijcD9Yh5+JEsGI8GmonRmMzUjYk7maPnf oc9nhbf03uLtPgSv6f5zkG3FUApvU98p68jTqmZsniDZdSd1jv7j0MhluIMLhznc+jOF PWiHcKmOFwf4PQIReIkCZdGGauRokA1NryR8U2AY5IxOrYcR4axcJZHYt40mA9/pcRMO rlQDuft0o5gvPWCHFVKaXH2lq/1qMYvbTmoXT1jb73TZrPvupKbkbtZcOqZgTiRQzw1z iQag== X-Forwarded-Encrypted: i=1; AJvYcCVvjI+qdVSqrYtrNkwqLJhUzHoNV2kxOPYWH8T9qsHflYTCUtaftDeCFn4f8Oei46QtBiPeVfKmrdqZ+XcIQkhlX8MCHVNQapPRIQdE X-Gm-Message-State: AOJu0YzRDiaXstY49ERmVmCqrAhPjSEqRUXHwA2lQ9s1WGdYGp7hp70e EEtQAks/Fxg70JHeHIv9rdLSTEmPrDwXQP/bZaMx0g6OQBIqJ6uFFriCj5qIhPbJ3A0LyuZRe7k 9y636cw== X-Received: by 2002:a50:cdd9:0:b0:572:6aaf:e0d3 with SMTP id 4fb4d7f45d1cf-5731d9b78d4mr398358a12.7.1715108849149; Tue, 07 May 2024 12:07:29 -0700 (PDT) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com. [209.85.218.52]) by smtp.gmail.com with ESMTPSA id bd14-20020a056402206e00b00572bd30320esm6655077edb.82.2024.05.07.12.07.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 12:07:28 -0700 (PDT) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a59a5f81af4so918579466b.3 for ; Tue, 07 May 2024 12:07:27 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXCEWfHzas8dbyGI5R8IAa2P269fYt3s55xxKrn5e2eLnAar9r1xfHFxFrjvK2UAl1aCo6rIv91Q2dP6f7yJpRcOcOUTEhwhR1Jnse4 X-Received: by 2002:a17:906:1957:b0:a59:a977:a157 with SMTP id a640c23a62f3a-a59fb9f209dmr23097766b.73.1715108847432; Tue, 07 May 2024 12:07:27 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202405031110.6F47982593@keescook> <20240503211129.679762-2-torvalds@linux-foundation.org> <20240503212428.GY2118490@ZenIV> <20240504-wohngebiet-restwert-6c3c94fddbdd@brauner> In-Reply-To: From: Linus Torvalds Date: Tue, 7 May 2024 12:07:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes To: Daniel Vetter Cc: Simon Ser , Pekka Paalanen , =?UTF-8?Q?Christian_K=C3=B6nig?= , Christian Brauner , 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 Content-Type: text/plain; charset="UTF-8" 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 F_ISDUP would work very naturally indeed with F_DUPFD. Yes? No? Linus