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=-3.6 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, URIBL_BLOCKED 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 D3CAEC433E1 for ; Wed, 19 Aug 2020 01:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5B2420829 for ; Wed, 19 Aug 2020 01:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rqnlagxk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbgHSBZU (ORCPT ); Tue, 18 Aug 2020 21:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbgHSBZR (ORCPT ); Tue, 18 Aug 2020 21:25:17 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BBF3C061389; Tue, 18 Aug 2020 18:25:17 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id g6so23489508ljn.11; Tue, 18 Aug 2020 18:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AidZcby2UmdfSc8qIr6w6RsJ0Rgc1buvH2/EryuFxlA=; b=rqnlagxkUJSYix8O9vAfpy78GGR+ec7IT0OfVRNTpdgccRsYb7cassEzuVgNkFX33G Xm3n2ThXFeF+GlHg8Cw3QUH5XVlG5S/Iuskh1X/GisKSOOwF+c3VJQCuFNKqY5CDmjSK 7Kk8FLXhzpmPFxkT3E4pQE282xaPMmne9CzG6EJIMDjJDz7z3IwMcUkNKGxtaqzySmRR AwhdjenRAgSxUTxTt0rfWidMMZx4YK3fTROysE+e4KglZ1i8NEnkrV/o5ZFIRNsDZFyK Jc/We/ZHyjyRzW8m2T9FG60NN8um3FzwwGtaiDDtlvGf7P+MwOdL9HVHjf8C28z3bh0C sojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AidZcby2UmdfSc8qIr6w6RsJ0Rgc1buvH2/EryuFxlA=; b=BywpBtN7cb8XNtFkJELZxjg1eqiGxtagkntoPDKyMeKe8r7xEy5LWTkXIPMJ7aDKBA kp4TZgqDUrKGTu+TzOdz62K13ol1OEA1hJTTZ/CA6/bN/i4bflMCzfJod/4AUWokTPze UK2CCLE7WUAGorbuzlVFME4ia4pXEBAVgsLwRvu0Uk5RPqIjd73MdU5BnZw2z/ePuqH0 xQgl4DFjx+SeIbkaOdA11yX8ixt9DNKP9sjZV8YEkUOD1fVfX6Vnnrzx0TtCqQ65+5xv tGCMFLp+GTXKbjs5W5tXhlPL3a8x4no6neT8BTFourGL6hR2WDEdICRHMggCnazEbnJ0 Lvrg== X-Gm-Message-State: AOAM5329+0JPdSmPWLpoN6M5Mun6/HWZj5MCoX0+C2EZWTneEiVHXa1B d3MaUP7rpucltRZj4//p0w+uKMzS9DY9LvkGvF4+ho1O X-Google-Smtp-Source: ABdhPJx7reXIpg8jEN3+lbL9q5zKWg3Vcn/V9Eij5FuxW+l0EP5y4XbGuoKBKcO7+2IXaTQ0MZq2DObhRm9hBYyVd50= X-Received: by 2002:a2e:4e09:: with SMTP id c9mr11453397ljb.283.1597800315671; Tue, 18 Aug 2020 18:25:15 -0700 (PDT) MIME-Version: 1.0 References: <20200819012156.3525852-1-andriin@fb.com> In-Reply-To: <20200819012156.3525852-1-andriin@fb.com> From: Alexei Starovoitov Date: Tue, 18 Aug 2020 18:25:03 -0700 Message-ID: Subject: Re: [PATCH v2 bpf-next 0/4] libbpf: minimize feature detection (reallocarray, libelf-mmap) To: Andrii Nakryiko Cc: bpf , Network Development , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Aug 18, 2020 at 6:24 PM Andrii Nakryiko wrote: > > Get rid of two feature detectors: reallocarray and libelf-mmap. Optional > feature detections complicate libbpf Makefile and cause more troubles for > various applications that want to integrate libbpf as part of their build. > > Patch #1 replaces all reallocarray() uses into libbpf-internal reallocarray() > implementation. Patches #2 and #3 makes sure we won't re-introduce > reallocarray() accidentally. Patch #2 also removes last use of > libbpf_internal.h header inside bpftool. There is still nlattr.h that's used > by both libbpf and bpftool, but that's left for a follow up patch to split. > Patch #4 removed libelf-mmap feature detector and all its uses, as it's > trivial to handle missing mmap support in libbpf, the way objtool has been > doing it for a while. > > v1->v2: > - rebase to latest bpf-next (Alexei). still no good. pls rebase again.