Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4384645pxa; Mon, 10 Aug 2020 07:57:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynpfsU+ChVfahvFAKrVztir/4P8M/TfLRKrEibpwUQgwovnojTwjDzdNOQbCOZvR/d7UhX X-Received: by 2002:a05:6402:1ac8:: with SMTP id ba8mr20682345edb.316.1597071432926; Mon, 10 Aug 2020 07:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597071432; cv=none; d=google.com; s=arc-20160816; b=sTAOVqjUqSdVTkUY7467pmQUKxsZrEVLWKoehe3eRJlxXuNkS5Naa1/VQ8EgpfAny5 eQav4aAyHPMCfja+Hijriwy6I/Z6FJueixkTqpdWypGfOUXUf3dszUThr1O61i2oKA9z 4NDn+YGz9SChhOPx4tH4wVUt5T1OdzeKQiy+jiNhXoFOVJsNMg1Be+jPSBBXW77mYEtp Z5j/Jjji/KdPtQfVMtiLfpmomye1v50DxXVnbGU9kN6efGBpInT9DeLCWhsrtVScwWp/ EdBj/g3sfTjSWj8o5Mpz5xCXX0J8vMioyXBwiOVWXTshiup9j3kIgpCqx68H6KfQ9YXF S1Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ewxZsA2sOKsYvtVwAS6LdLqeVgx5AXOVS7mYEisKyOo=; b=vN+/Qk3XaUc0LZkm/TI3soXmbPnEnHU7Dl49a4+Bxq57xgNKJJ83E085ozmR/EGAAV ci4hdZARvlk4GbvWWMKsjJaFzLU1LpLzirY2IhMUnqiV6tsBLypLOxV6f/ivAK/RD495 Fc+AgriA1ez+IDYy6W3VyaDY+Wtu7mmbUFmn4XShhmQ8+RP9qGJapGUuKlh/TtO7VCdq czlSStjWKxUMKD7Mj8cy7zYEov8m1HOIIk1kCgErE/9KvmjBgQEl73QyXz1gtmmZ1AwX VlJ7NsQmad6v5CIM8dqe/+fjckDRKD2Wm9fr3c2t+qo1Zb/NVYSawXbvqISjBi36nY10 JdVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TcjsJ2Mn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si10667876edq.584.2020.08.10.07.56.49; Mon, 10 Aug 2020 07:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TcjsJ2Mn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727104AbgHJO4M (ORCPT + 99 others); Mon, 10 Aug 2020 10:56:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbgHJO4L (ORCPT ); Mon, 10 Aug 2020 10:56:11 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4E2C061756; Mon, 10 Aug 2020 07:56:11 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id k13so4990704plk.13; Mon, 10 Aug 2020 07:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ewxZsA2sOKsYvtVwAS6LdLqeVgx5AXOVS7mYEisKyOo=; b=TcjsJ2MnNMsEBg3Tm7czoe3hzZLz8q9xyHzKW1xxJOG/99Gje2jsohx2Eos6AFSsfj MkKEgG9f1yciUHnN2cs3WkibpmTTRGdR1qL8RQTytz1CdkycyBAUwlobys0gkeKu7RgJ UD3ywrx1HmYJKAwUhXyIfHb34s8li2nqXGMIfy4mC2XLoaoUImo1RoH1IbqqYlFKRW4A nOXGkfXooupWbLdROt3IhtANCH7Z20KV7CEs0QmkJSH6psEuDvZPcXm4KMNEKqMX2nJc oYvi/MtOlrhb1Sv86YpYOToFsBxCYeMwzolzRNN/2+LN6DHlNlaNBegYrwPitL3tJ3U9 R8tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ewxZsA2sOKsYvtVwAS6LdLqeVgx5AXOVS7mYEisKyOo=; b=jADACSWHR2WJR4IYYBHLJKvS2N7PB5zF/oKFr72p7xtSlsUCJN5ARVFG3bHJaNAu7/ gh6bgT1ffOZZdTuegph9wZIz4j2zKxs0h+SJXnuM2tUWuvhrXzpEWgL0iQkX9lkLKkT9 PnY2Ug7/hhWfQBo+r2h6k8vHcmo28AquKWwv7DQk/aCKr0J6wkoFGtk6PO7e1fq7OZ47 mMKwrkpBIyD2VlVrX2kHfzHmvUjWeHCKrPwV+iyBRtLYlMo4QLyTydmeka6zMCh3v3Q5 t5Fa1QWeWcSdyHhMWWwza7A87pO5PrcBKlAehM3ll9IGct3JsVOjvkEVdj/Q7cQR7z39 KOpg== X-Gm-Message-State: AOAM532BEJoa21gcPoA163EHvcaBVrQe8iZMP7QkJQG8Y0wyduS8c5F7 nmw+ytuQRGQ5hH35dh0GoXE= X-Received: by 2002:a17:90a:8589:: with SMTP id m9mr28316923pjn.109.1597071371386; Mon, 10 Aug 2020 07:56:11 -0700 (PDT) Received: from [10.1.10.11] (c-73-241-150-58.hsd1.ca.comcast.net. [73.241.150.58]) by smtp.gmail.com with ESMTPSA id 3sm19857146pjo.40.2020.08.10.07.56.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2020 07:56:10 -0700 (PDT) Subject: Re: [PATCH] bpf: Add bpf_skb_get_sock_comm() helper To: Jiang Yu , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Eric Dumazet , Jakub Sitnicki , zhanglin , Kees Cook , Andrey Ignatov , Quentin Monnet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: opensource.kernel@vivo.com References: <20200810131014.12057-1-jyu.jiang@vivo.com> From: Eric Dumazet Message-ID: <315a12d8-abd9-f9d3-a1b2-bcec8598a984@gmail.com> Date: Mon, 10 Aug 2020 07:56:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200810131014.12057-1-jyu.jiang@vivo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/10/20 6:09 AM, Jiang Yu wrote: > skb distinguished by uid can only recorded to user who consume them. > in many case, skb should been recorded more specific to process who > consume them. E.g, the unexpected large data traffic of illegal process > in metered network. > > this helper is used in tracing task comm of the sock to which a skb > belongs. > > Signed-off-by: Jiang Yu fd can be passed from one process to another.