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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E096CC19F2C for ; Tue, 16 Aug 2022 06:21:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229753AbiHPGVx convert rfc822-to-8bit (ORCPT ); Tue, 16 Aug 2022 02:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbiHPGVa (ORCPT ); Tue, 16 Aug 2022 02:21:30 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F92DCD523 for ; Mon, 15 Aug 2022 17:14:03 -0700 (PDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27FIbxJu010563 for ; Mon, 15 Aug 2022 17:14:02 -0700 Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3hx9pypbks-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 15 Aug 2022 17:14:02 -0700 Received: from twshared6447.05.prn5.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 15 Aug 2022 17:14:01 -0700 Received: by devbig019.vll3.facebook.com (Postfix, from userid 137359) id 1DF691DAC778A; Mon, 15 Aug 2022 17:13:49 -0700 (PDT) From: Andrii Nakryiko To: , , CC: , Subject: [PATCH bpf-next 0/4] Preparatory libbpf fixes and clean ups Date: Mon, 15 Aug 2022 17:13:48 -0700 Message-ID: <20220816001348.347435-1-andrii@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: ooEBwdsMLW1gRiYGAYkhbjmQ5ZsaaY8A X-Proofpoint-ORIG-GUID: ooEBwdsMLW1gRiYGAYkhbjmQ5ZsaaY8A X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-15_08,2022-08-15_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Few fixes and clean up in preparation for finalizing libbpf 1.0. Main change is switching libbpf to initializing only relevant portions of union bpf_attr for any given BPF command. This has been on a wishlist for a while, so finally this is done. While cleaning this up, I've also cleaned up few other placed were we didn't use explicit memset() with kernel UAPI structs (perf_event_attr, bpf_map_info, bpf_prog_info, etc). Also few fixes to test_progs that came up while testing selftests in release mode. Andrii Nakryiko (4): libbpf: fix potential NULL dereference when parsing ELF libbpf: streamline bpf_attr and perf_event_attr initialization libbpf: clean up deprecated and legacy aliases selftests/bpf: few fixes for selftests/bpf built in release mode tools/lib/bpf/bpf.c | 178 ++++++++++-------- tools/lib/bpf/btf.c | 2 - tools/lib/bpf/btf.h | 1 - tools/lib/bpf/libbpf.c | 47 +++-- tools/lib/bpf/libbpf_legacy.h | 2 + tools/lib/bpf/netlink.c | 3 +- tools/lib/bpf/skel_internal.h | 10 +- .../selftests/bpf/prog_tests/attach_probe.c | 6 +- .../selftests/bpf/prog_tests/bpf_cookie.c | 2 +- .../selftests/bpf/prog_tests/task_pt_regs.c | 2 +- tools/testing/selftests/bpf/xskxceiver.c | 2 +- 11 files changed, 147 insertions(+), 108 deletions(-) -- 2.30.2