Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2352780rdb; Fri, 8 Dec 2023 05:58:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQXEu+fJ/zYepFxFFy41bWI0TtF35Q7jh87mIBsWGlgeUc82KhiRxlDksbAdsE6HC1DSMB X-Received: by 2002:a05:6a00:b4a:b0:6ce:2731:a07b with SMTP id p10-20020a056a000b4a00b006ce2731a07bmr39465pfo.42.1702043904204; Fri, 08 Dec 2023 05:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702043904; cv=none; d=google.com; s=arc-20160816; b=lXNcsZmF+wguQlIM0VlPhr2RGbFp3/c5XvPa87uY+RS8OJpc2MCVn/+TzugXpVRFuf Fev/0UN+AgPwTF8owfZADhvrdS4kcFNjBHR64aNaeERo6x1Mfv93YM4vJwaOguLAXbg5 dI92nAqKXd8M975oB1vOj35043tXRwHzjLkFmsNNlf7vCkOow3i/kPgqfSO7yV0JFV/L 42ZvNRJwTX2Bz2/rIvVikoKFrQVKfyWU0qe9ZgaIM6QVkFKo+N9XzXHg9IYHjBE/I+ZU j/KqoUSAsJPTTFGmWhff6WAxlgnjDSVOz5RqGeHY9eEJihizYo+IqVo2B5i1gZVm5fgS xlLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=ZVS2GiFnVhk8BbnE3962ZAIxlqpLh4SepAXQYdXCDKE=; fh=rF4kNN7bN5Uu6Z1YUaswcxpPOBvqelqXqvkVXwBUMx4=; b=j3B/XiARCb9xOheghmeGTdYfr3z7pmeRorm/0v5EgB0DqsiohKX1iyaYmwGFPKqXbd hTt8nr2rrnxNuEooXm0vZdPvqX1sW5hWgpMqhQk++P/AvAm289teI90D2KS/M6YTMPM7 roJeIsbfVOkUQgoqT59NSZegx4f8NYuRmwNrKwCjINFYlALihSTz79auBUHlirFOTnaP Hax1taCOkvFWkXS00KVApNK5ISfnKpAuNSNt/L7tMKu0UiGQVJj/WhcncpXGPPzzcO81 ESjDCYJpQP+MgmmHeLdOZWI2k/YEMKHj85/+TlVvFYAhpfn4MrMLZWkKCb8KoBswTBZf P8Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="O4pbba2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x1-20020a631701000000b005b887ff580asi1514804pgl.878.2023.12.08.05.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 05:58:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="O4pbba2/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8AF1C81AAE6A; Fri, 8 Dec 2023 05:58:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573879AbjLHN6J (ORCPT + 99 others); Fri, 8 Dec 2023 08:58:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573864AbjLHN6I (ORCPT ); Fri, 8 Dec 2023 08:58:08 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5B7A9 for ; Fri, 8 Dec 2023 05:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702043893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZVS2GiFnVhk8BbnE3962ZAIxlqpLh4SepAXQYdXCDKE=; b=O4pbba2/d3rJpSiBVfY7u/w1do9dfXcw8SkLMnVCa8qIdbJHk0eDa7mz9uCpJUN7RAtXxG u3w2JYRcWKDm16LH4e7v7unkRa0p89gzay86GvbL9UZCRggdkf2zWBt9SiexZutpPsDEI6 wYaPavobdaV/39eUX+r95kBaftiEhmk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-whDzf_fgMXWWbeog9d0oZg-1; Fri, 08 Dec 2023 08:58:08 -0500 X-MC-Unique: whDzf_fgMXWWbeog9d0oZg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 906F3101A551; Fri, 8 Dec 2023 13:58:07 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.131]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EF4B40C6EB9; Fri, 8 Dec 2023 13:58:05 +0000 (UTC) From: Florian Weimer To: Christian Brauner Cc: Mathieu Desnoyers , Tycho Andersen , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, Jens Axboe Subject: Re: [RFC 1/3] pidfd: allow pidfd_open() on non-thread-group leaders References: <20231130163946.277502-1-tycho@tycho.pizza> <874jh3t7e9.fsf@oldenburg.str.redhat.com> <87ttp3rprd.fsf@oldenburg.str.redhat.com> <20231207-entdecken-selektiert-d5ce6dca6a80@brauner> <87wmtog7ht.fsf@oldenburg.str.redhat.com> <20231208-hitzig-charmant-6bbdc427bf7e@brauner> Date: Fri, 08 Dec 2023 14:58:03 +0100 In-Reply-To: <20231208-hitzig-charmant-6bbdc427bf7e@brauner> (Christian Brauner's message of "Fri, 8 Dec 2023 14:48:30 +0100") Message-ID: <87cyvgg5jo.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 05:58:21 -0800 (PST) * Christian Brauner: > On Fri, Dec 08, 2023 at 02:15:58PM +0100, Florian Weimer wrote: >> * Christian Brauner: >> >> > File descriptors are reachable for all processes/threads that share a >> > file descriptor table. Changing that means breaking core userspace >> > assumptions about how file descriptors work. That's not going to happen >> > as far as I'm concerned. >> >> It already has happened, though? Threads are free to call >> unshare(CLONE_FILES). I'm sure that we have applications out there that > > If you unshare a file descriptor table it will affect all file > descriptors of a given task. We don't allow hiding individual or ranges > of file descriptors from close/dup. That's akin to a partially shared > file descriptor table which is conceptually probably doable but just > plain weird and nasty to get right imho. > > This really is either LSM territory to block such operations or use > stuff like io_uring gives you. Sorry, I misunderstood. I'm imagining for something that doesn't share partial tables and relies on explicit action to make available a descriptor from a separate different table in another table, based on some unique identifier (that is a bit more random than a file descriptor). So a bit similar to the the existing systemd service, but not targeted at service restarts. Thanks, Florian