Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp305902lqo; Thu, 9 May 2024 23:34:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVI4GcEgv1thgxxl20XlPpPsl/dMo1yNo+wM/F0+S47BNRAR3y4/umBRzaAum43EMAXzTS6Wfdp15BEES49p1lZdWLDdrBTh/TjI1gTnw== X-Google-Smtp-Source: AGHT+IH5u4NBo92NCIrxWQQ6Vjxu0w7TctlG76NhMxYjJuSx9e0TtFh0OYqTbz8oRaJCqHcLITAO X-Received: by 2002:a17:902:d506:b0:1e4:24cc:e021 with SMTP id d9443c01a7336-1ef44050595mr21620005ad.50.1715322878588; Thu, 09 May 2024 23:34:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715322878; cv=pass; d=google.com; s=arc-20160816; b=Bthb6M4jvf47Gm5CLxCTz7PV7baLvLMZLh8rrDkHap5jP6cu+0X4l0p33IWoKgwTSA Rpg8pryp5GJStQD17XC5GJk+8WB0nVqRb5kDGz9BAbKkrxs5Fe5NYTmue/573rJMeTIx SMOBkWRut1jmzRU4XgiXcsmmaMzUdmMnSrePel5qnCu/HgfOK9hSVl8VaEiGfwqi4H4Z v7ZeK3h/ZO9rwTGi6eJN0/1zi6fmJ9eDWMU4ECeatULhvC1oiiwzZN5roYmoezRDiH3q /po/QqUi0AZbdA7ldqy8S/CqxPfKIIDftbvoMgiV3ociytEv3Tb5aO6GdWRjD5z7ldmZ QQ7w== 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=qqhMcDIWyo95XcDFJz46zE4yNLSEO2VfVMdQydetIVk=; fh=GYwExkYgyJWZNKe8uLUADIte747Ale7hL+fw+znN9wQ=; b=EBc56wDCq6HyTgwjsaJOW2r2D66EPhuxLdlzbt0wiBO0fhcnHJ3eeePF4iyNnJYPlS LFqhGJzuvcCGIN/pRCB3QyEbIU+x3hi4CJMeRcQo678TTAQLUJOjjj/obL0GfBDrG7oT 1EYgnulFZqQ1+BV4prCnjG0nmNL1pnhTbw2yPrAhfVCUwFiT213MH7naCC+Z8M9wm6wv JERlF8k9b73aovIh5GlTWVsGWjGDv7HE4IN04taDfVbtkvknu5qtcw3uq6J3QdaNvjgl JqoRAyCvlxCI4s4NGTs40Qtm2xm5eiiKsHqoUnxK9RuOB970hZLqH4/uv/4hVVE5l3M8 gf8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jdyWyMgS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175335-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. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9cffb1si8312695ad.124.2024.05.09.23.34.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 23:34:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jdyWyMgS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175335-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 DAA75B2199C for ; Fri, 10 May 2024 06:34:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E72B15E7E4; Fri, 10 May 2024 06:34:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jdyWyMgS" 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 5105C2940D; Fri, 10 May 2024 06:34:02 +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=1715322843; cv=none; b=YQlhI39pggUGQYYioV84/+v/ds2kDl1JfRN5Ag7HlpAMmAnNMWgjm92Ge+RAJaWKA5RGwhqmMERnbMnZ+eq3dj7KtAdRwa6BXN0gvxmnKwU8slvRKuAMzr+hFzLHgUpQW3yi0dTX2yrhw/83eOxjgKOg04o7dSKAAW4QuSZvN+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715322843; c=relaxed/simple; bh=wVgOOLtVKMV7bsilEbUlznVvVGVC/ysLZc58xE9C6/w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X0mbDgFSg6hK5z9U7easKBmrJo4UC5L80vOg7hTPDeahY/blLt8v3CmNXr5L6/OkbE8uGlN1pMZwS4w0bBSCjHzFSThIHOJc+SYflkum0S3qoeS7UNZI6piDv9kEEHEHFTnAE9Yv20P3NA8bMy9zsxpv3fbtpBBZH30DBl+DOpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jdyWyMgS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C318BC113CC; Fri, 10 May 2024 06:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715322842; bh=wVgOOLtVKMV7bsilEbUlznVvVGVC/ysLZc58xE9C6/w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jdyWyMgS+v9qUGAFlHih7XgvQwrmsyDQCIOGDIKvOfqMEFtpGPQ0OGCTu8jYydX/R D5aAXl+I3zxvW5NV9UXZpfwVEJ+cUvSc6GFxu267oR/eyntQ+aO7DUNJWJtaGnni47 5yiXHQuv2uRwexYJnTqAVm4IxxgkCHS2sX7PBkpAWGQ+xjDDk1Z+FmTypT8l0+3tns YAVR2sp3FWUjEdwhxPam5R0321D2eTUJUx7qVrlAA/Tdugfyfca6c1Ao6f1pHPlIp5 zi02q1WopIt+CS92a/E7+wnTqhdrRX2WrjomGr6uAH+TwysbzNY1rm6tT5Ire4VWc9 cMw7Z7GkywhrQ== Date: Fri, 10 May 2024 08:33:54 +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: <20240510-abnehmen-klammheimlich-36242d03b7a0@brauner> References: <20240509-kutschieren-tacker-c3968b8d3853@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 Thu, May 09, 2024 at 08:48:20AM -0700, Linus Torvalds wrote: > On Thu, 9 May 2024 at 04:39, Christian Brauner wrote: > > > > Not worth it without someone explaining in detail why imho. First pass > > should be to try and replace kcmp() in scenarios where it's obviously > > not needed or overkill. > > Ack. > > > I've added a CLASS(fd_raw) in a preliminary patch since we'll need that > > anyway which means that your comparison patch becomes even simpler imho. > > I've also added a selftest patch: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs.misc > > LGTM. > > Maybe worth adding an explicit test for "open same file, but two > separate opens, F_DUPFD_QUERY returns 0? Just to clarify the "it's not > testing the file on the filesystem for equality, but the file pointer > itself". Yep, good point. Added now.