Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1665118ioo; Sun, 22 May 2022 23:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI61jKwJ1NIRLfDzSi9SPpdXofM2uAxr16x3JlIASeENEutRFNy/wRrAB/ON3di+7GbjVk X-Received: by 2002:a17:90b:3142:b0:1df:77f2:e169 with SMTP id ip2-20020a17090b314200b001df77f2e169mr24909742pjb.245.1653287737588; Sun, 22 May 2022 23:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287737; cv=none; d=google.com; s=arc-20160816; b=HhrAgOiHkqidhhIORmlI8gxtVV4FTdWR1eHJR452tO4LxYN8BLApuEPid0oNll6OWy u/Mtr+3YEXSZrgRZgcNtQUVDxSAaBZlJsQ+XE7+16wExuBr4x9lLy7azu21BzbgVJPFP WfT+JJqt0hYfZ4CHcdwEROgFvC/Nr5Ik90FGy8GxSYipySgTGiMsqui1hLI1WCC2OIy+ xhfIvFU8PZ6VqbLLpARlK2Sgvdan4jweMUmKgpaMJzPiU+Xq0JDoTFO8io3XIw8B3XFH o1xcFmlJdB55/fdO1+NzAizxth6kNiBGwOzsmZXiLV+LYsqUwe0K4WhlG37krZLHvUCq 91pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=50jb+lr+8bzs9LBIgH+1tS3BRiRPfRl1oUUzkOAyhsQ=; b=M9X0+r3y6X0pmnzY7DzTtIrNO+nGqBzcm4FwpgzGKrqb36lNsSGW3CoDvHTjBNUPYD 8FofqZf+t51mG3JhyrKfP5TDcOy2lE2NIxMmCrZP3z3S2WdeWGFT/pdyRqO/3ltFDJp7 pZHztCv/XB1Mh/gKZ5PMRBnRE5D5YfDrGDTqWn12y76zAJt9OxzcFVpnT21v717Qu5MC FMzuFMfjFktpuO12xZINzyXg6oSnz3tQotobLT9rGSvfbuXaZE+NPz0P8rqf/6xGilIz bZ9g99RWTgDebq8TAhoPmDS9+oO/Kp7oIS+F2Rfd3mWNir24NcYs8+H65Qkwnxpcnkn6 W8BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ilLrZyFc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 195-20020a6305cc000000b003dbb04363acsi8910417pgf.877.2022.05.22.23.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ilLrZyFc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 805BD344D6; Sun, 22 May 2022 23:10:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239908AbiESOnY (ORCPT + 99 others); Thu, 19 May 2022 10:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239910AbiESOnX (ORCPT ); Thu, 19 May 2022 10:43:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A432CD0295 for ; Thu, 19 May 2022 07:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652971401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=50jb+lr+8bzs9LBIgH+1tS3BRiRPfRl1oUUzkOAyhsQ=; b=ilLrZyFcENY94kKatLHTylWzhq1ERH8vBVCSI9moECYpE/lJsq9E30gnOq9L2OXNeK5QE8 mdkNYpR4CuWFIiBWO9NHjgPVY5+yj7Iud5W12Rg60yR4Tm/8stIbsSgt3sbp20chKRsCqE E68yr7Gaix/cpOS/ywuh0lsvizfT/T8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-445-R9QJfxKaOXWEcSiAtGftmA-1; Thu, 19 May 2022 10:43:17 -0400 X-MC-Unique: R9QJfxKaOXWEcSiAtGftmA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C3F080A0AD; Thu, 19 May 2022 14:43:16 +0000 (UTC) Received: from asgard.redhat.com (unknown [10.36.110.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 437942166B25; Thu, 19 May 2022 14:43:12 +0000 (UTC) Date: Thu, 19 May 2022 16:43:09 +0200 From: Eugene Syromiatnikov To: Andrii Nakryiko Cc: Jiri Olsa , Masami Hiramatsu , Steven Rostedt , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Networking , bpf , open list , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH bpf-next v3 4/4] bpf_trace: pass array of u64 values in kprobe_multi.addrs Message-ID: <20220519144309.GB22773@asgard.redhat.com> References: <6ef675aeeea442fa8fc168cd1cb4e4e474f65a3f.1652772731.git.esyr@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Wed, May 18, 2022 at 04:50:58PM -0700, Andrii Nakryiko wrote: > On Tue, May 17, 2022 at 12:37 AM Eugene Syromiatnikov wrote: > > > > With the interface as defined, it is impossible to pass 64-bit kernel > > addresses from a 32-bit userspace process in BPF_LINK_TYPE_KPROBE_MULTI, > > which severly limits the useability of the interface, change the ABI > > to accept an array of u64 values instead of (kernel? user?) longs. > > Interestingly, the rest of the libbpf infrastructure uses 64-bit values > > for kallsyms addresses already, so this patch also eliminates > > the sym_addr cast in tools/lib/bpf/libbpf.c:resolve_kprobe_multi_cb(). > > > > Fixes: 0dcac272540613d4 ("bpf: Add multi kprobe link") > > Fixes: 5117c26e877352bc ("libbpf: Add bpf_link_create support for multi kprobes") > > Fixes: ddc6b04989eb0993 ("libbpf: Add bpf_program__attach_kprobe_multi_opts function") > > Fixes: f7a11eeccb111854 ("selftests/bpf: Add kprobe_multi attach test") > > Fixes: 9271a0c7ae7a9147 ("selftests/bpf: Add attach test for bpf_program__attach_kprobe_multi_opts") > > Fixes: 2c6401c966ae1fbe ("selftests/bpf: Add kprobe_multi bpf_cookie test") > > Signed-off-by: Eugene Syromiatnikov > > --- > > kernel/trace/bpf_trace.c | 25 ++++++++++++++++++---- > > kernel changes should go into a separate patch Sure, they can be split, the only reason they are this way is to keep API/ABI in sync between the kernel code and the user space one. > (and seems like they > logically fit together with patch #3, no?) Patch #3 doesn't change the API/ABI, it only fixes the implementation in terms of compat handling (and it is more straightforward), that is why I decided to have it separately. The compat handling of addrs, on the other hand, can't be fixed without the ABI change. > > tools/lib/bpf/bpf.h | 2 +- > > tools/lib/bpf/libbpf.c | 8 +++---- > > tools/lib/bpf/libbpf.h | 2 +- > > .../testing/selftests/bpf/prog_tests/bpf_cookie.c | 2 +- > > .../selftests/bpf/prog_tests/kprobe_multi_test.c | 8 +++---- > > 6 files changed, 32 insertions(+), 15 deletions(-) > > > > [...] >