Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5405442rwe; Tue, 18 Apr 2023 06:33:04 -0700 (PDT) X-Google-Smtp-Source: AKy350bwCst2l8UbG4gLDE/TNoYs33b4WYD3h3XZpjkKVMqWwg4m6UkUZ9saurFzVA71EqwrhMRK X-Received: by 2002:a05:6a20:4694:b0:dc:925f:62f1 with SMTP id el20-20020a056a20469400b000dc925f62f1mr15921801pzb.6.1681824783958; Tue, 18 Apr 2023 06:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681824783; cv=none; d=google.com; s=arc-20160816; b=pEdmGoxe2ZSXIji0huvmWl15ke5BU5AjV4LrYGwaWsy5xJHIw5EQqCDg5VnpcuA46n gaE/jG6qaNSq84G8I4zxGPIJuR6AjB1seHQErO3vDyDgnrFB0qoqSazYj53PN135MJqM 3ejQuVN+EMxvxiCpMtZCSzjQwjLP/SvQecg7xjNI7dl2PSAnvTJtXwkpNCZnT5Or4p3s N45qEynJXdspCCvFkk0BLx+wZB0s5GBbYNYCzNdCx5LQ/tdMU1N0UvHMWzrv0kpJUApI +SLA5Z+Pn9Ys9sEXlrIepBmcGpgOjJ8GIU6BBBFgiZEBqHpxDbt5HyqV3ilRVN6z1XH+ GoXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YrzSardH5I6JxMYMtrs5Mk59pkGZTxzDyEBIkchnMqA=; b=L2+mQsd33ZDhqk8CDXIpR1ZZx67aIemvO4/jl9c4RIS+BulutZpwTvM9UYfpBiH45P a1tOAhD5xAWVLzpqy/+MGQ0Jzt66Be19EDHAGKnItNZQiCwfLfW7qXvkUZcXDLffbKTu LrxFvkxDbsiakuyTSBqZniAfeC7XRMmR5hfLpvcN504nWCJXwonisPX2rXVUXgTbswz+ 8J01oS4NQYw7urUu666z6phhTez7t38lPk3Z/0GIPiXsueqpior5z4bQaSCpAADW/fW/ ijgpj09sVk7bhE6MOOvaT86vsFH54LTijGKaRy64B7m675Y/tN38rUxVIWUz2afxqf9W RXEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FvMQHu1F; 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 w8-20020a63f508000000b0051bb433f5d3si5305785pgh.862.2023.04.18.06.32.49; Tue, 18 Apr 2023 06:33:03 -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=FvMQHu1F; 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 S231995AbjDRNNX (ORCPT + 99 others); Tue, 18 Apr 2023 09:13:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231539AbjDRNNV (ORCPT ); Tue, 18 Apr 2023 09:13:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1778F125AD; Tue, 18 Apr 2023 06:13:20 -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 A71EE6344C; Tue, 18 Apr 2023 13:13:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B2DBC433EF; Tue, 18 Apr 2023 13:13:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681823599; bh=z2KVK0QvZVFf4nky69tbEO3E34ohX70wE/lgqNYQR9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FvMQHu1FX6nDPom7Sn0JK2nTIHdcBkVaUCJ4Ki7+w+LW2NgJ6iHh/Z4aFr0XVItuY 3f4TkhJMnDlbinczl4IlzdAnVp9mXV3E1+9vjbyn+Tdtmhvoo6t38p46npxm7V9wI0 H3AvSymNwXSgoVUXMF4iqlT5Oh51KvKeeSJjOKoOZAiifMkJR03qfuovhxYiedDd4h G0qRjyH1U4w82k+j0kWti/+FzPuLuVTRm18aAsqNckFDDHEXVKwOd7pX4q37U6DNJ7 oBrFDZBXBoQfG8lPcCuNR29wvJoAeQKRpfciLMmD4B5650PQ1OatnSR5zaSqhyKyXB PewXxVSd6WkrA== Date: Tue, 18 Apr 2023 15:13:07 +0200 From: Christian Brauner To: Alexander Mikhalitsyn Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, daniel@iogearbox.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Leon Romanovsky , David Ahern , Arnd Bergmann , Kees Cook , Kuniyuki Iwashima , Lennart Poettering , Luca Boccassi , linux-arch@vger.kernel.org Subject: Re: [PATCH net-next v4 3/4] net: core: add getsockopt SO_PEERPIDFD Message-ID: <20230418-zierlich-meistens-fdfe03914133@brauner> References: <20230413133355.350571-1-aleksandr.mikhalitsyn@canonical.com> <20230413133355.350571-4-aleksandr.mikhalitsyn@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230413133355.350571-4-aleksandr.mikhalitsyn@canonical.com> 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 Thu, Apr 13, 2023 at 03:33:54PM +0200, 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: linux-kernel@vger.kernel.org > Cc: netdev@vger.kernel.org > Cc: linux-arch@vger.kernel.org > Tested-by: Luca Boccassi > Signed-off-by: Alexander Mikhalitsyn > --- > v4: > - return -ESRCH if sk->sk_peer_pid is NULL from getsockopt() syscall > - return errors from pidfd_prepare() as it is from getsockopt() syscall I see no obvious issues anymore, Reviewed-by: Christian Brauner