Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2114419rdb; Tue, 20 Feb 2024 18:46:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8XRqotiVIO54yT/3xLcemybZHFRQs3ljrh8hq4VmACaalD8XiMfOq+DCdRAkieXK7BRtB2Y/XxRBVNX5P71+MtL/Qdk3efmABNPPtRw== X-Google-Smtp-Source: AGHT+IGHKxUThuNTyC/Xy75kDOsSxbU3BFzv8ZBMIyH8I1rQAcJz4Eq2bkLshRENgjDIJJrqir1S X-Received: by 2002:a05:6a00:b31:b0:6e4:76b5:7dd3 with SMTP id f49-20020a056a000b3100b006e476b57dd3mr3646054pfu.26.1708483571870; Tue, 20 Feb 2024 18:46:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708483571; cv=pass; d=google.com; s=arc-20160816; b=bFkUHV6ARNukX7Hk02w+lxkPInMi9kjXOvjZjiwHltfUUq0BP9mlvenY2CQwU6CI03 Oys4yf2bALX5X/3/8djSerc+Q88/sn0wAJ1Y4WEQbpknxKy3Q4bS/WfFwbTYKeIJsuJc 1E+pGRKuGzAathWkbjwYGvmExL1x9MMQGn1Gkqzj+BWfg6GuO8hn2L3BuxShq9kAoljD WWuLzVpWO25PJUmfPEX425mBVc7tZWtoWWFVnU7a+82qk6CcbugosjatpMQQvS+Gbz42 yLUeSKff712mQHHEhbxR3BL85/exyZ/jtRb4ZJYB9zgYzhVywHAnn9nUIUHzi5Mp+MSN FPjw== 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=ve1P36IQxgQSH5e/j0CQ97PbRHxGM/0Cwkl/MH1SMuI=; fh=fnNv2YzUhKDce+G6QuXUnV5XWM590G2jxaYoLBa5lMo=; b=X8GITKjA8MpL3KqA3Fpz/blLkmr3kklhjnx/JQqCjJ2NijeMgtwVzcHDAaq4Fz7N1Q 6xFxOmGzmjM4c+eu7t5g0Wf7hG9Nd0HmBMGPL4S49yohlxLP/XpMI12rymQmsSMu3rqJ MD2KplNdDsiopzMtmym0PrTH9g/PYWupjyYBX03Ew9F1u2ZgDdzQ/uTkesz80oeXF/ZS 1MXiaH9EwjitH0JQcXhQzPYV3yx7JHyeS2zAjllOoSk8HmaQBfb0qkzn57/1qW0+xLaA 2fcSl5jq8uV/7MfMRZoX8ykirHFbArKDNKrJ7PZPFLGkYCQdNRju30YmXgqiKztXQ1b2 yecw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=eY+mcvmr; 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-73976-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q5-20020a632a05000000b005dc957fe128si6932426pgq.74.2024.02.20.18.46.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 18:46:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73976-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=eY+mcvmr; 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-73976-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73976-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 904FC285B70 for ; Wed, 21 Feb 2024 02:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4C7A2F36; Wed, 21 Feb 2024 02:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="eY+mcvmr" 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 7648F25632 for ; Wed, 21 Feb 2024 02:45:59 +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=1708483561; cv=none; b=QmDjyU/q7JRQeM2y0XhRbTf0rrnykyv17tgwxKoaQjyiIP/Kn0GoRiXB8MJsRAsOGeIRllsq9eIq26Yv/KgBfp9S/mDpO/3kh0xnzB1VPALG4VHa//74A5VS3Ed6VoAC/JZD1CPvB9qh5M+OPV4Xfvmlyi/Qb50vp4+pz5ybEoA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708483561; c=relaxed/simple; bh=ve1P36IQxgQSH5e/j0CQ97PbRHxGM/0Cwkl/MH1SMuI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=F77s3kJLoBqL7EnwhF3FoTiEX7Xj+bEa2rU6TQAI5MXaOJI4N0YJKi7dUQ0OnFesMgt05yRhBKb+YVC+ZMIjXev1YufxwfIEyMGyfLjBpstAOZEemklLo6Sj6nBoSnJ2UVMrO1KCwhXxVSXI9v2VwJBrcGgEhC4xRiteIOV0HVU= 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=eY+mcvmr; 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-5dca1efad59so5691584a12.2 for ; Tue, 20 Feb 2024 18:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1708483559; x=1709088359; 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=ve1P36IQxgQSH5e/j0CQ97PbRHxGM/0Cwkl/MH1SMuI=; b=eY+mcvmrLFndy3vMd8abbvvdkULPrS9j/rbHuiS6BpOmmsCTwnlklWp6M+wxwAdgeN UfoXCNMgSyr5wD1t0VfJ/nMZvzlUdWEoo3e9O6+/v4f32pq7c8hJZ6LYGE17SdTBXkEj dRg70wiXqBwr4B3w77PZLgPkW8N0tWg6vRSrytbCzsL1e4enAjTMxJbQ5Eg2QIMEARVQ Da5+Iyty92uH2Np1ZUyWQ2X2NhtHK8SN9oDQHOLc+TRCKfj5qtrmTgMBaoJUlPpqV2zB RB7capCvii6EPMsLb5g+m23QkBLccOm+NdTIDL2hXEna+MSiUfRgQ+HsXk/0IgJ80vla rRYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708483559; x=1709088359; 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=ve1P36IQxgQSH5e/j0CQ97PbRHxGM/0Cwkl/MH1SMuI=; b=lvY7AL+kSPFnnnlo1ffsueEXtLZxfnPJ9PEcXcMTwyT9huwSs13Z6GpyWuf+VDPkTl u49PqH3lM+D+dza9NDee9XOccvjCQnQQeghnZlrPxZQDJ9/dsUmjHSryzEQNardeSuWV YA3lfxqrf2lWNDCOVAgIOlu2PP91VGuUXekqAVRPpHyxUVqklkBfb/+cTdj/xohwpRr9 QvTRTUNbdjU8hJsjj0hhx3WzdLgODxH9Wc/OF2EWSQbATDdOOTTaBGXYnBG8iZYpfRej qcPt4Gczwx9e3YrVWM47jya+IDDaUer6GxkbFH3m0kYZR7LxwJorU8vYMmKoPWfEGKlf PjMg== X-Forwarded-Encrypted: i=1; AJvYcCXdZTsuA923hCbUt40qW5Ol2FwTwZYwu0ipZ4hGKtzyk6JwR5gx0uqh0O3me+1zyaQYaJPwLxJlZk1YbxDKWZNa/9EpA3u5a/1LmiQR X-Gm-Message-State: AOJu0YyvOjxu+ekZtXprZkcPiBfeRa3QiSQM/aU6C1tB9B8C+qvxkl6U Rl1mxdVGnW/s4jydjn5xV7dfyVwbR5Ehxe7IAsv6PsMVcY48Is171JnHM4XAMRj71YFCbDEEGeT 41IkOCPbAAtTlb0/dOerGF0d/sXDEd4TQbSUsbQ== X-Received: by 2002:a17:90b:1281:b0:299:6848:28c1 with SMTP id fw1-20020a17090b128100b00299684828c1mr7815650pjb.26.1708483558766; Tue, 20 Feb 2024 18:45:58 -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:45:47 +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 On Wed, Feb 21, 2024 at 10:35=E2=80=AFAM =E6=A2=A6=E9=BE=99=E8=91=A3 wrote: > > 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= to > > > be attached to multiple hooks, and we have to create a BPF program fo= r > > > each kernel function, for which we want to trace, even through all th= e > > > program have the same (or similar) logic. This can consume extra memo= ry, > > > and make the program loading slow if we have plenty of kernel functio= n 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. > Should I introduce the multi link for tracing first, then this series? (Furthermore, this series seems not necessary.) > Thanks! > Menglong Dong