From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CD53C07E9B for ; Tue, 20 Jul 2021 04:19:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F12D061003 for ; Tue, 20 Jul 2021 04:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345685AbhGTDib (ORCPT ); Mon, 19 Jul 2021 23:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245445AbhGTDgz (ORCPT ); Mon, 19 Jul 2021 23:36:55 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4276DC0613DF for ; Mon, 19 Jul 2021 21:16:34 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id a7so18037154iln.6 for ; Mon, 19 Jul 2021 21:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:mime-version:message-id:in-reply-to:references:date:from :to:cc:subject; bh=0tQss4tGfn4OQIzt1lN20MAOzzsntRq7ZNCJXJ/tuZM=; b=Z8cveZ6SpzniE8rU45nsU6Yr+p7sUDcnDdhdNQjF6f6JJPzZmP59lSsUD71/9qp5OM lOVvTY+k5XSk9WNrdWk9Nl1WqRE1U55gTJPykJRbrwsleq1+b9lnXhM4+gqixRsZYQtA lpRluc5gcmY8JL2xbRsyN8kgCjQbjLY5vyIKTFr6tHe824dshqd9tnKo7n1YDUuYrtp4 zghYUm1llYfhMIRPGBxIcVdJ590i82de3fOU8oSxDh8Bci14q7qM9BBqgRXoBOKxZYRa 6nZuj0+BL9kf2xPObmrku+DAoJ0WlBYvSDMSL2jxgO8EDfdcqcB9MSifoCkfMEav/rTg 8XaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:mime-version:message-id:in-reply-to :references:date:from:to:cc:subject; bh=0tQss4tGfn4OQIzt1lN20MAOzzsntRq7ZNCJXJ/tuZM=; b=XYEZH2IfAFZmkPBCnDMUhUhkhoPKLxbgUsn1aeJUB8EvxMGdHhmlFkA2nqu9ErpAnj lRAs2NMcTxzSYWOXJDTWRllpnjO3dD0945lCC9cAFZRuVVbR9YT//fnz6ljPMQtdmPIV 4aaCpAK2eJ+zYfiGMi5ClJfw6GwcpC7rZe9yhEetl9msgc6H7AumxHbwbt+aonGUMvrr hZuG2zTRYzZhvKRN8HRCrthJ3ik6UlSCanuyKkzfBYcGIqGwGC6+ifCAbhdtWeNjzbvY Hgr6CgvoBzhuOS6Xq628rFsyCqNS40/+3JlwwFp+bpdJvD4heD8YlFHoiOrn8qA6B2lL wQHw== X-Gm-Message-State: AOAM533doJjui4MgMjNh8YoKmBMK9w5W/XFHmS76KnXNjU4WxIsi6Vm/ n31c4SG/T7AoMBmUdNIhKA== X-Google-Smtp-Source: ABdhPJyc5ixekBI9ZX0KWnyy2nTb78YBclc5UNGVsQwxvbaegUzayMZue5p1IKNxXqMQjbm6zKgzMg== X-Received: by 2002:a92:7303:: with SMTP id o3mr19641340ilc.36.1626754593717; Mon, 19 Jul 2021 21:16:33 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id w21sm11343024iol.52.2021.07.19.21.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 21:16:33 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 47F9C27C0054; Tue, 20 Jul 2021 00:16:32 -0400 (EDT) Received: from imap10 ([10.202.2.60]) by compute3.internal (MEProxy); Tue, 20 Jul 2021 00:16:32 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedugdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpedftfgrfhgr vghlucffrghvihguucfvihhnohgtohdfuceorhgrfhgrvghlughtihhnohgtohesghhmrg hilhdrtghomheqnecuggftrfgrthhtvghrnhepledtteelfeekjeelvdelieejfefhkeeu ffeitedutdelueefkefhvedtffeigeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprhgrfhgrvghlughtihhnohgtohdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqudduvdehieehledtgedqvdehheekjeelfeeiqdhrrg hfrggvlhguthhinhhotghopeepghhmrghilhdrtghomhesuddvfehmrghilhdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id DCC064E00F5; Tue, 20 Jul 2021 00:16:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-533-gf73e617b8a-fm-20210712.002-gf73e617b Mime-Version: 1.0 Message-Id: <0487b7af-bd8c-4a83-94ed-eb26cca90fb9@www.fastmail.com> In-Reply-To: References: <20210625044459.1249282-1-rafaeldtinoco@gmail.com> <701c5dea-2db9-4df8-888b-9e10c854afc3@www.fastmail.com> Date: Tue, 20 Jul 2021 01:16:11 -0300 From: "Rafael David Tinoco" To: "Andrii Nakryiko" Cc: bpf Subject: =?UTF-8?Q?Re:_[PATCH_bpf-next_v3]_libbpf:_introduce_legacy_kprobe_events?= =?UTF-8?Q?_support?= Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org > > plink = (struct bpf_link *const *) link; > > kplink = container_of(plink, struct bpf_link_kprobe, link); > > Did you check if this works? Also how that could ever even work for > non-kprobe but perf_event-based cases, like tracepoint? And why are we > even discussing these "alternatives"? What's wrong with the way I > proposed earlier? For container_of() to work you have to do it the way > I described in my previous email with one struct being embedded in > another one. Nevermind. Sorry for the noise. I'll do the container encapsulation like you said so. I was being lazy and trying to find a way to change just the kprobes path instead of thinking in the overall project. Sorry again, will come up with what you said in the first place.