Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5290766rwd; Mon, 12 Jun 2023 02:56:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LZV1KMseP6yeO4h+rJQF1qARLBn+ctev48wi2+1bddqiH7PtceDlRbG+nKmDOkeOdL/72 X-Received: by 2002:a05:6a20:244c:b0:113:fd97:d470 with SMTP id t12-20020a056a20244c00b00113fd97d470mr14437769pzc.17.1686563806704; Mon, 12 Jun 2023 02:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686563806; cv=none; d=google.com; s=arc-20160816; b=fLshNe+2cRKGtcMx8BPup1ARGD0JAKcol/yJxkEnXLCS25YxcDEweStWzybhdDdS8g VoPoD3UAvqWifPWoqEeiAodYV/XOCwxw/4wQvFjTGcyeJi2pvxmO7KUWhV+y8K2kq4KA mS200Xg2kgBBuMD42XPTpZyEEjb8ilOK4tTwgLzGzjFU3w8SrjcQgLxLFOE4fiuNngcP yIuDcvijYRhNkeIlhcTMonkbCx3IwDZtal1p3crt1TCTYR+vNWHInmGvVbyi1NL7eUpv XuZ0cILubXRLlii9Tl63gYsd43Fj0kZQkakeWH0nvGYpTrzkuI/ucHZzMJTSPE/dUZNd lkHg== 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=y1dwKlQl3ch+rjWH3WakkZnRUyhMTlzScusDmgGxFrg=; b=rsCVyhvI/2fI2tPkc+kTIGE5QLXVZWaVmYxBCiTmxwjE67tsgRPL4dWlxAVk28f6gL 3GYXP9bGfwNr2/RNxE9LcUSW2jl5TXMPM8i+u1vYn/SPAtc8gAWq1xjrKNNiuOu8gDlb YNJuynMQwmV35wYWQ4dHngJ3cp8qwPvxWsydoCqe9NPsacVfzB/xmqaDlahIK9IHJZHY AE+YSysCpHBH+9UxLjcM9kHnfXKhQML6HtxhpLeoRcMY2IyScO3Eoig8ArY0kXOMqzuh KU2kKQFZRtEDnI830ZiffA4MjfpeWn2KozlWDqe9yopzQAUcKllsRsqtKCGFgyKaC697 t2VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=7wUiTG0M; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63734a000000b005347aba7376si6655412pgn.297.2023.06.12.02.56.29; Mon, 12 Jun 2023 02:56:46 -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=@google.com header.s=20221208 header.b=7wUiTG0M; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbjFLJ2t (ORCPT + 99 others); Mon, 12 Jun 2023 05:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbjFLJ2M (ORCPT ); Mon, 12 Jun 2023 05:28:12 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34DE4C09 for ; Mon, 12 Jun 2023 02:22:24 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-3f9a81da5d7so315391cf.0 for ; Mon, 12 Jun 2023 02:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686561744; x=1689153744; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=y1dwKlQl3ch+rjWH3WakkZnRUyhMTlzScusDmgGxFrg=; b=7wUiTG0MmA7y+2lEinSm8giFjQJ6k0IDdL+is2Qw8cH14kEFKpZyKzAPPtwqLt/xBz eR4ss+OnelXP6bltOJo8JCbhScmYimFC53jjp2maM6atl4VhalAajHvqTz+c7vJnSkjL ZSvBC5coCX+q2tryUXmvGRMTvCUkcQc1xppJ7C9bof++HL2Hty/nrzozzodMtDO8MYtz 9MBnl6xyZU4UTYrj+jDfey6Z5LMldODvWpWAlA0ArvaY0A/T1oI8EbSFV9L52cd8BjV2 cS+pUKjhRNV2OEqhIF3UmmbjHIG1qJB1ZwbuKK0Q47sdcaOY8yiYSTWe/P0EqOoRneah eazA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686561744; x=1689153744; 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=y1dwKlQl3ch+rjWH3WakkZnRUyhMTlzScusDmgGxFrg=; b=iRqdjOutM2HUW0vu6MvAwQIc5vl7joNBbudgGx/Sqm6gLi/ewyHxmAnPIhoZi8K6Eu /Grbuki3R9dvyQ304gjzv6ITlA6IFlPWQdwyRoBM4CJdKlRentUL3uiHrT+u2a/riee9 FHwt0eNP42XODiQPpOkv49lfWH7JaVL2qdynv7W8LxU808hLSKG/y7PEJGupE8xei2R0 BTRkBL8qE7I6vZQWSZWT/KjFakndX59NZj2ii4+a6WX7S1N3TFBBew1uHuxjc7ZCQpv+ ud/7mccHn8B+BqARljDd8JMxeqm5dQD9M93ZrxIYttXp/Vb+B0qU8OuZ4AE2v/RJtzen yzxA== X-Gm-Message-State: AC+VfDyCbykeVbEqnZ3T4MQNQUufoVqsjAbOkdrwuGhEiA1ZBgWtWX5i sFPTzeEC8wiLGQPA3FtiuCAVx7wc+uT/mA1UAYEeUg== X-Received: by 2002:a05:622a:1899:b0:3f9:a770:7279 with SMTP id v25-20020a05622a189900b003f9a7707279mr235109qtc.9.1686561743953; Mon, 12 Jun 2023 02:22:23 -0700 (PDT) MIME-Version: 1.0 References: <20230608202628.837772-1-aleksandr.mikhalitsyn@canonical.com> <20230608202628.837772-3-aleksandr.mikhalitsyn@canonical.com> In-Reply-To: <20230608202628.837772-3-aleksandr.mikhalitsyn@canonical.com> From: Eric Dumazet Date: Mon, 12 Jun 2023 11:22:12 +0200 Message-ID: Subject: Re: [PATCH net-next v7 2/4] net: core: add getsockopt SO_PEERPIDFD To: Alexander Mikhalitsyn Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jakub Kicinski , Paolo Abeni , Leon Romanovsky , David Ahern , Arnd Bergmann , Kees Cook , Christian Brauner , Kuniyuki Iwashima , Lennart Poettering , Luca Boccassi , Daniel Borkmann , Stanislav Fomichev , bpf@vger.kernel.org, linux-arch@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Thu, Jun 8, 2023 at 10:26=E2=80=AFPM Alexander Mikhalitsyn wrote: > > Add SO_PEERPIDFD which allows to get pidfd of peer socket holder pidfd. > This thing is direct analog of SO_PEERCRED which allows to get plain PID. > > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Jakub Kicinski > Cc: Paolo Abeni > Cc: Leon Romanovsky > Cc: David Ahern > Cc: Arnd Bergmann > Cc: Kees Cook > Cc: Christian Brauner > Cc: Kuniyuki Iwashima > Cc: Lennart Poettering > Cc: Luca Boccassi > Cc: Daniel Borkmann > Cc: Stanislav Fomichev > Cc: bpf@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: netdev@vger.kernel.org > Cc: linux-arch@vger.kernel.org > Reviewed-by: Christian Brauner > Acked-by: Stanislav Fomichev > Tested-by: Luca Boccassi > Signed-off-by: Alexander Mikhalitsyn > Reviewed-by: Eric Dumazet