Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4893664rwd; Tue, 23 May 2023 14:25:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x0Jm6VAeVdDsJwSGM3l4f0AoSFJ83RmojJdEmTsxPvjVsI//GKspBdkkinJPg3zhMVmuM X-Received: by 2002:a05:6a21:100e:b0:ec:d7cf:bcf7 with SMTP id nk14-20020a056a21100e00b000ecd7cfbcf7mr15785544pzb.17.1684877125208; Tue, 23 May 2023 14:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684877125; cv=none; d=google.com; s=arc-20160816; b=GZ6r1kdmn4r4HzPUASwxXt9C+c+1Lmt96YJ6anJ3xbQqfnZqK7VHhpksxG1TTETPNZ wkMwCTU45J5m3COY211msWWz+5ilODkWcrtCUw+PmrxMX6s+VVqL7YsXwIGQK24Hk3te o297PG6LtiWasHZx3I+9W79ae5fpQiiUCptCLJ4/pZbuNbS+80z+lSFZg56GjOkYNwe2 sDWWZUurKtDLbUTr8KQNmaNY51Nl0DFUGvEXFqCl+wb+kOtEOnghuKLYikIt4tpbFLpW W+fuB8NrN5lV20jEh8LzXOCgJuNDZ4Bpca6rJRqYEAQn3gm41cft0yEolEwZABxL5DjS Ibmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=GugylfowXHnBZCFan8vdNsV06hAGijOrOKCQ3Y6jjYQ=; b=nwUS7kCarfV2d41v0pc9k30rv7x+wYPPQarrbTvGgNYUrSDgvFRF+V2hP/KiJLSOg2 PLoAXn3QQnFVdPDO+yqbbPMP6Tihwr4yN9ShKrlU9FY8gn//Gqej4zmNbRuSq4fsNEL2 6NXw0uP/i+1o/blLwgdHEgkaTw6Et8exBcYgU9MnFWe+hbYwYWlS6Bd1/JmwW6RmfSFc GxfXiuR7pO5ykFE0sgitKNLz8qEtEF2K9sy9VRHZ3qAjbssb86unfNIYY0a/VFZuUyTj VblwlNieHXCIC+rDRgsFNqq34S3p7LIP2kTHJDcb9ph7svPIr2+RrsziCKsVhiL4ISN9 1Hyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucDXjYVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a639216000000b005304a8af2a2si1626575pgd.404.2023.05.23.14.25.10; Tue, 23 May 2023 14:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucDXjYVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238054AbjEWVIt (ORCPT + 99 others); Tue, 23 May 2023 17:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjEWVIr (ORCPT ); Tue, 23 May 2023 17:08:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 141CEBB; Tue, 23 May 2023 14:08:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A4C4F61D80; Tue, 23 May 2023 21:08:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B732C433EF; Tue, 23 May 2023 21:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684876126; bh=t4leSM84mfYsgogyyDTg6ovfFaEJHHtHZJXOO19zbLs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ucDXjYViKyH2WU35ZLkIAGU/3peB1OBW0tLipFJolAd84E5J+l51ss5bL0x9W7k5N I9gLNb1xrKkiqEmPbtGz7tv2q9xj8E8f8VOL5ZpFtswDPFhbgaakPAD79m6Kcn3p7y DfdrvwuXoRBhTut4Xs/c5Z/zi2GbzoSfck7KK9nFyoIEPoJlDhNnOhOsPjAW8qFw31 hCRLi7M/TV7haEgMMEQ23HkpvyPN66iT4y9e9djI57Jc6ejIiWKIEDzMYMRsCZFr9V WLPs+i22UEw/hxO6qnuDIKkhAXyyV0ESeJLlLMzFU8K6X4cdJnWAKaE6ECIwXozxGs b3dFyJoeeq9VA== Date: Tue, 23 May 2023 14:08:44 -0700 From: Jakub Kicinski To: Luca Boccassi Cc: Christian Brauner , Alexander Mikhalitsyn , davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Eric Dumazet , Paolo Abeni , Leon Romanovsky , David Ahern , Arnd Bergmann , Kees Cook , Kuniyuki Iwashima , Lennart Poettering , linux-arch@vger.kernel.org Subject: Re: [PATCH net-next v6 1/3] scm: add SO_PASSPIDFD and SCM_PIDFD Message-ID: <20230523140844.5895d645@kernel.org> In-Reply-To: References: <20230522132439.634031-1-aleksandr.mikhalitsyn@canonical.com> <20230522132439.634031-2-aleksandr.mikhalitsyn@canonical.com> <20230522133409.5c6e839a@kernel.org> <20230523-flechten-ortsschild-e5724ecc4ed0@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 May 2023 11:44:01 +0100 Luca Boccassi wrote: > > I really would like to avoid that because it will just mean that someone > > else will abuse that function and then make an argument why we should > > export the other function. > > > > I think it would be ok if we required that unix support is built in > > because it's not unprecedented either and we're not breaking anything. > > Bpf has the same requirement: > > > > #if IS_BUILTIN(CONFIG_UNIX) && defined(CONFIG_BPF_SYSCALL) > > struct bpf_unix_iter_state { > > struct seq_net_private p; > > unsigned int cur_sk; > > unsigned int end_sk; > > unsigned int max_sk; > > struct sock **batch; > > bool st_bucket_done; > > }; > > > > and > > > > #if IS_BUILTIN(CONFIG_UNIX) && defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS) > > DEFINE_BPF_ITER_FUNC(unix, struct bpf_iter_meta *meta, > > struct unix_sock *unix_sk, uid_t uid) Don't think we should bring BPF into arguments about uAPI consistency :S > Some data points: Debian, Ubuntu, Fedora, RHEL, CentOS, Archlinux all > ship with CONFIG_UNIX=y, so a missing SCM_PIDFD in unlikely to have a > widespread impact, and if it does, it might encourage someone to > review their kconfig. IDK how you can argue that everyone sets UNIX to =y so hiding SCM_PIDFD is fine and at the same time not be okay with making UNIX a bool :S > As mentioned on the v5 thread, we are waiting for this API to get the > userspace side sorted (systemd/dbus/dbus-broker/polkit), so I'd be > really grateful if we could start with the simplest and most > conservative approach (which seems to be the current one in v6 to me), > and then eventually later decide whether to export more functions, or > to deprecate CONFIG_UNIX=m, or something else entirely, as that > doesn't really affect the shape of the UAPI, just the details of its > availability. Thank you. Just throw in a patch to make UNIX a bool and stop arguing then.