Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2111678rdb; Tue, 20 Feb 2024 18:37:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsoNE+E5/ewIt5JGzfN6+CVGDTOxU8udkDGlhXg+cvOmzf4okjWrcaJozn+hZQ82a3M0KjYmCMwuCL/IVl7JXmCPjG/oYNAuA1mADXVw== X-Google-Smtp-Source: AGHT+IEG2tb+Mg6YHA2DUTaCr7+iB4OtX7p9EytVzGSUIzyAkz/2kBpdEhEwAE8GjXzYZ4URO318 X-Received: by 2002:a54:4111:0:b0:3bd:e31a:c46 with SMTP id l17-20020a544111000000b003bde31a0c46mr15674395oic.13.1708483034977; Tue, 20 Feb 2024 18:37:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708483034; cv=pass; d=google.com; s=arc-20160816; b=Ji5lU8G22DpEd5LRkLQKI7A/NmgCA9KwiwbHWV7L8NQosIdihyIdtmJx8qclOVRqsA fnFX1uRVGbO0eayHKLSxGV2fF72t/EvmFRQAdEK8912TzqBiS4FD3hiVfKG+wV2H00Pr CamOm3uN7yJifgizR+Q8RXwYNybJKSKWpGFMaRIfijZRtUVSLrdtPWufdf0WvGgRL3Ng mLY35fcO2RY2fisIUHFn0QiiYpK708bAcDKK1Yljk0qNvW0S7fNTZ9xIhwEtbOZmcFc5 h8D2t96xEflExhg6i5lh0wGGD2igy6Kc3/piXgLmKBJDvwV9dToAuc9yH9D4Zuuj2YrL ClYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=p9KaH1kG3VIAPvn6SehcGM/nl6oCx50robP1zVqyyiY=; fh=MIiMI2rKcsxf7k0TKni5Ky7khVurF242QdGmmqLixdw=; b=Kf0RlMwy+REnbxt4Tux97DrC7196zZLGO7+uE5CYiX6375Q0FkSN1Iw406xP3SkmXd XJDc79erpY1HKpVUNb6wuZq5Cm/oGIoEj5gyQIplgphI2SpEiyhTHauqd3Z5hvYqettW 3C1orjQIN4NwnXnm0vxB4SMnLTEU3lbNEKaqVhnQ9yMLctLsYu0dJ8zETS7Fqf51AqJi HEqwRTrVUap/+SEUjE+/4BqBVvxkPWRH2zad3P8uIp644RkxavxJ5HuSaThk5CwfOPRU b0+9ITIpzcHv3d1R6RGcxcOXbfk75CBVtBWdmeZCWNTlziMjJIXRdYeIiUKB+ZebgT8/ ATVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Knc4WKsL; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-73959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id cg20-20020a056a00291400b006e0f4907ebasi7209254pfb.113.2024.02.20.18.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 18:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Knc4WKsL; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-73959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7C48BB24242 for ; Wed, 21 Feb 2024 02:36:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA54425632; Wed, 21 Feb 2024 02:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Knc4WKsL" Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E30818643 for ; Wed, 21 Feb 2024 02:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708482948; cv=none; b=ZnJ5xIxm1TghKhX4uzlA826R5ih7wTpaaMbH5o1mJnFzwlDW+ldoiL6d/EPpBZ14PJK9HpN2zRP4Wmu6PJY44GiuBJ0GADHKMnt1YeEoe12S9wnLyS8LSUgT79Erux4QkIia1rHvQ6YK6IqJdxVSYWJ4+Db+pgsqfpJvCGwi9W8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708482948; c=relaxed/simple; bh=p9KaH1kG3VIAPvn6SehcGM/nl6oCx50robP1zVqyyiY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cxlrCTslD4Kg5gKCxzzXcqqGlLPISJukMsIdyYRC17FmoGr3RowNYAiGOwMgS1qL3rKfZE2CX51euNMebw6l2d+TQ2tEX08aJtwam4MseDoS+PLwF/Vg8t2elAPQ5hfNw49DD5pI+DuMeEQosqnnVcx27g4hkgLTFwv06fLHrKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Knc4WKsL; arc=none smtp.client-ip=209.85.215.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso5080862a12.0 for ; Tue, 20 Feb 2024 18:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1708482946; x=1709087746; darn=vger.kernel.org; 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=p9KaH1kG3VIAPvn6SehcGM/nl6oCx50robP1zVqyyiY=; b=Knc4WKsLbxXXhhybJwmLWgSyt/SdRfHGPu/1RlvyOD/bm135Tozsb+xXYWj/1shIva TAVJm/g4jzYZT/M/TSl3ktqZNgR6yi2oDfcYnQmDwqB6pgPPD4ULaOlauugsCEpAeMUw KuNYWZhM6PkZxPcZpLCSDbV43uOE8MPaFUpHXJxWX400hHc//v/JaKZnyAcYXh0mW2bi feh7Gzy3c9faRCvBkRak6v4yi8F7UCU2NxFOTmEs5b5RCpN+Oh3/P8kIPZ/F055t5T/6 mTM955odnTsWZc3zxDPqnRzX4HhwM2cgVqaY7JQOzD8+iekn9G/lG8HPbTnYY+9YtV9v lQnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708482946; x=1709087746; 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=p9KaH1kG3VIAPvn6SehcGM/nl6oCx50robP1zVqyyiY=; b=HgW+k7+QL6+Qb1KmXhCYEvY8egqcaJuhYLUBt8NXaQVuLI7jqinAlCsN2i5uMEWoU/ ZGvx6wpoRmMFM1MfWpd4Vt6vkYiYe7+a3QeZB3GrdUto3zzwKXJhaZ8mFa8HN7H39bYW upKghuFWYyb7H0SzpC6tp6XQ7dAFYRFcAGMd0waaxrnfXDC4gGx1MQftl48XiwkkaEXo x8ESwXZ3je0e4kfbEvYvjTiIcif2DZ2CYkNzDsJyfvpx/aRApIwfxAjdotJSl+1uUNRr ohZqCToHVzjs6cCXRgJCL4bhhH+1Tw03PVI7jkYPNZF5XMjgohvJ9R8z0XGoIha2hI+8 uw8A== X-Forwarded-Encrypted: i=1; AJvYcCXvjVZI1JCyKa08aU8Gd0Qx8z15rPKWI78GIxwUG/mEcjAMLF7co5mvKCgBLKi+mc1c2v6bc6TIy35ojjbHXblTokP9RRwah75Am0Do X-Gm-Message-State: AOJu0Ywv3lvBOVn3/WWe4UyQLeq05VsMCYrJKMUBGH4HTqJvA4kUTqy8 0uWJBwLt4U/btexuMyUStjFlu2btyxy/VMg7/9s5t8Q0REI50cmsmyBLZfoSIVwVp9zaMXDrYv+ PHhmF42Z9VIHFSa3l1HAXw2zyVswZadRESEmTSg== X-Received: by 2002:a17:90b:1bc1:b0:299:6717:e54d with SMTP id oa1-20020a17090b1bc100b002996717e54dmr8268880pjb.36.1708482945724; Tue, 20 Feb 2024 18:35:45 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240220035105.34626-1-dongmenglong.8@bytedance.com> In-Reply-To: From: =?UTF-8?B?5qKm6b6Z6JGj?= Date: Wed, 21 Feb 2024 10:35:34 +0800 Message-ID: Subject: Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach To: Alexei Starovoitov Cc: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Eddy Z , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, Kui-Feng Lee , Feng Zhou , Dave Marchevsky , Daniel Xu , LKML , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, On Wed, Feb 21, 2024 at 9:24=E2=80=AFAM Alexei Starovoitov wrote: > > On Mon, Feb 19, 2024 at 7:51=E2=80=AFPM Menglong Dong > wrote: > > > > For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed t= o > > be attached to multiple hooks, and we have to create a BPF program for > > each kernel function, for which we want to trace, even through all the > > program have the same (or similar) logic. This can consume extra memory= , > > and make the program loading slow if we have plenty of kernel function = to > > trace. > > Should this be combined with multi link ? > (As was recently done for kprobe_multi and uprobe_multi). > Loading fentry prog once and attaching it through many bpf_links > to multiple places is a nice addition, > but we should probably add a multi link right away too. I was planning to implement the multi link for tracing after this series in another series. I can do it together with this series if you prefer. Thanks! Menglong Dong