Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5593039rwd; Wed, 24 May 2023 04:15:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VABU85oayg0H+BhaCHaMm0Q8+GY22znr5bagT1app+tmubcnfwhNTD4W05gieGXkJAD/I X-Received: by 2002:a05:6a21:6d9f:b0:10b:646f:d9f1 with SMTP id wl31-20020a056a216d9f00b0010b646fd9f1mr12809296pzb.5.1684926956707; Wed, 24 May 2023 04:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684926956; cv=none; d=google.com; s=arc-20160816; b=EKTsHNL090is/GReNVPg7fEn98G1DuQgID37mmqpMxBKjTZHulP9LNyUaNV1F02ph4 Au56H43xIjKNJNmun4cRzs7NHVC7yt46QQhN+AqNrY4eG94ydfxse42l2kKOPJE+AQlH BJLy1h8PZrik4SG77XmGaRDNOvCXeuXMsdXNGm7ctVgUmoZ69uWGXjLatZyGsLOrAZci lJ9BN8mf97cW4jtO+QafmXFdLBtwqfubDe0c142fqsgO+3tJ9GjlKHgpyqY9EHVu8/RJ 0VdMPU/NiSDF7ByHWE8C7DXlL4BRvRQ9vJLIpbrzioV90rQwx4xTp/0ddbSn7FzMdSVH HYdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VcR2dM9dZkrtIAYuc+uEYt6q6RFFCfHdSpmFwxj+wQM=; b=OK7CMsye419vcXLIrIru/13uOtbnv22OSnGz8snRfIM9GIGN+eiHXQBuT8nqGOM1py pbYyViKVyjfMv6ZSYVA4+RNlo4dYPwjjXLck4fUMUyl7Dxn3Nv0srov/yuFDAxEYrRu2 qEZrOCMqcPQ1V/CtKbizjwOIqYUqT3i0joSKYcaKkF8H+huPoB1gryBlcsa+lZ9Trb1S h+Cq1mkL0F2TjLUTemUMp8mjBoa6RtXIjZ39Petd4X1F06nT8Pp+QZhJFF+HBk+wcQj2 i46WeyFaPvc//v1/YSuDN9K2U/0Hq1w6b91RZ3NkNyNzVokOFVm4nyFiJWgbts2EwEWt fhxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ICYhzP3a; 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=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a637545000000b00524d6d12581si3179410pgn.691.2023.05.24.04.15.42; Wed, 24 May 2023 04:15:56 -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=@canonical.com header.s=20210705 header.b=ICYhzP3a; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjEXKn4 (ORCPT + 99 others); Wed, 24 May 2023 06:43:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232616AbjEXKny (ORCPT ); Wed, 24 May 2023 06:43:54 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DBBA98 for ; Wed, 24 May 2023 03:43:53 -0700 (PDT) Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4C5D844298 for ; Wed, 24 May 2023 10:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1684925028; bh=VcR2dM9dZkrtIAYuc+uEYt6q6RFFCfHdSpmFwxj+wQM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ICYhzP3alsOukQOEQWvvrws87UFBIOwILO305wzr8xWUwsG1L4ZC9c0oKite3wrPL EseAWN1gLDwCqoX3G1/6Z8nMAfkDgMAPmA4HdaANqOUc7IlhRJsf+ZlnL3qXx8dKOT 9IuEpcRvvkymZJigK9A5WSkegXUrLgYF0YGQhSvn+RVQEMhmipANGe1WOoLhiOo6qK HFnthkYPVbRSjYMocf5lqIbMy1ST66igp5lJXNyT2z7xUfmFcdb1jQOOI2VqKbahpi rKzNsvbY31qL/+0z+2KTWUfYO+UFEU45GTtC6mykSut3tXiSaJ/0Rqcwj/bh/+nW0d 4mYdjt8HJCEYA== Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-5655d99d636so18132577b3.2 for ; Wed, 24 May 2023 03:43:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684925027; x=1687517027; h=content-transfer-encoding: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=VcR2dM9dZkrtIAYuc+uEYt6q6RFFCfHdSpmFwxj+wQM=; b=SjFZXe9+00f8NKaMpYEyIFrYDXIEL7esuIimaMYW+NI6hcIYddwNEzDBkuV1v3FgQi LfCQeKzHUZ0mqX6K4jcqFVRLfCHmTRpbPPzb34OjVVvqe+oGSNTkAcbV50D99PPtg9Vo aulztg48h6h1lwG9/HAKh2LcPsG5axMQGm7uB4AlfoUHE/+iokW/Jkc39D1DPmvQHmPz ujt0PF65MGnXcqY8AJYZohAQ8vb2e9WxyzbcBAzCUQjIZbOSTwNpJ/qEp8LrNe24JTPz /b+U++FU6kupPFedZqAf/Iq1UgA4mba2IMrenekimbVUnHaPw0eRmmRUMxpwAqtZngLG vD/w== X-Gm-Message-State: AC+VfDzeG6sXfG2T3JiBD3qtXZfAHMsaDQeREAq+tVyyBTY25SFGeFgM j29D0N+mK3V8lsdg2Zug4e4RYCTxMjYQjTD0q6/MAogbjdxgjloJj06XLN1yiyngZ/ctqQVB5Wk mdVTUyRhFWqU2srbq7kwzFMmQeDbp1Cemi1Jj67HczJF7BVyqnWvE877J9w== X-Received: by 2002:a81:ab50:0:b0:561:179b:1276 with SMTP id d16-20020a81ab50000000b00561179b1276mr16277647ywk.26.1684925027357; Wed, 24 May 2023 03:43:47 -0700 (PDT) X-Received: by 2002:a81:ab50:0:b0:561:179b:1276 with SMTP id d16-20020a81ab50000000b00561179b1276mr16277633ywk.26.1684925027137; Wed, 24 May 2023 03:43:47 -0700 (PDT) MIME-Version: 1.0 References: <20230522132439.634031-1-aleksandr.mikhalitsyn@canonical.com> <20230522132439.634031-2-aleksandr.mikhalitsyn@canonical.com> <20230522133409.5c6e839a@kernel.org> <20230523-flechten-ortsschild-e5724ecc4ed0@brauner> <20230523140844.5895d645@kernel.org> In-Reply-To: <20230523140844.5895d645@kernel.org> From: Aleksandr Mikhalitsyn Date: Wed, 24 May 2023 12:43:36 +0200 Message-ID: Subject: Re: [PATCH net-next v6 1/3] scm: add SO_PASSPIDFD and SCM_PIDFD To: Jakub Kicinski Cc: Luca Boccassi , Christian Brauner , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 23, 2023 at 11:08=E2=80=AFPM Jakub Kicinski w= rote: > > 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 some= one > > > 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) && defin= ed(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=3Dy, 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 =3Dy 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=3Dm, 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. Dear Jakub, Thanks for your attention to these patch series! I'm ready to prepare/send a patch to make CONFIG_UNIX bool. I will send SO_PEERPIDFD as an independent patch too, because it doesn't require this change with CONFIG_UNIX and we can avoid waiting until CONFIG_UNIX change will be merged. I've a feeling that the discussion around making CONFIG_UNIX to be a boolean won't be easy and fast ;-) Kind regards, Alex