All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net,
	Andrey Ignatov <rdna@fb.com>,
	oss-drivers@netronome.com, netdev@vger.kernel.org
Subject: Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray
Date: Fri, 13 Jul 2018 17:07:58 -0700	[thread overview]
Message-ID: <20180713170758.66b01079@cakuba.lan> (raw)
In-Reply-To: <20180713235305.GA2779@roeck-us.net>

On Fri, 13 Jul 2018 16:53:05 -0700, Guenter Roeck wrote:
> Hi,
> 
> On Tue, Jul 10, 2018 at 02:43:05PM -0700, Jakub Kicinski wrote:
> > reallocarray() is a safer variant of realloc which checks for
> > multiplication overflow in case of array allocation.  Since it's
> > not available in Glibc < 2.26 import kernel's overflow.h and
> > add a static inline implementation when needed.  Use feature
> > detection to probe for existence of reallocarray.
> >   
> 
> This probe doesn't work on my system (Ubuntu 16.04).
> 
> libbpf.c: In function ‘bpf_object__add_program’:
> libbpf.c:326:10: error: implicit declaration of function ‘reallocarray’

No way :( :(  Maybe you have to clean the build directory hard?  
Maybe you have old feature check results or some such?

# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial
# rm -rf /tmp/bpftool
# mkdir /tmp/bpftool
# make -C tools/bpf/bpftool/ O=/tmp/bpftool
make: Entering directory '/tmp/linux/tools/bpf/bpftool'

Auto-detecting system features:
...                        libbfd: [ OFF ]
...        disassembler-four-args: [ OFF ]

  CC       /tmp/bpftool/map_perf_ring.o
  CC       /tmp/bpftool/xlated_dumper.o
  CC       /tmp/bpftool/perf.o
  CC       /tmp/bpftool/prog.o
  CC       /tmp/bpftool/common.o
  CC       /tmp/bpftool/cgroup.o
  CC       /tmp/bpftool/main.o
  CC       /tmp/bpftool/json_writer.o
  CC       /tmp/bpftool/cfg.o
  CC       /tmp/bpftool/map.o
  CC       /tmp/bpftool/jit_disasm.o
  CC       /tmp/bpftool/disasm.o
make[1]: Entering directory '/tmp/linux/tools/lib/bpf'

Auto-detecting system features:
...                        libelf: [ on  ]
...                           bpf: [ on  ]

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
  CC       /tmp/bpftool/libbpf.o
  CC       /tmp/bpftool/bpf.o
  CC       /tmp/bpftool/nlattr.o
  CC       /tmp/bpftool/btf.o
  CC       /tmp/bpftool/libbpf_errno.o
  LD       /tmp/bpftool/libbpf-in.o
  LINK     /tmp/bpftool/libbpf.a
make[1]: Leaving directory '/tmp/linux/tools/lib/bpf'
  LINK     /tmp/bpftool/bpftool
make: Leaving directory '/tmp/linux/tools/bpf/bpftool'

  reply	other threads:[~2018-07-14  0:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 21:42 [PATCH bpf-next v3 00/13] tools: bpf: extend bpftool prog load Jakub Kicinski
2018-07-10 21:42 ` [PATCH bpf-next v3 01/13] selftests/bpf: remove duplicated word from test offloads Jakub Kicinski
2018-07-10 21:42 ` [PATCH bpf-next v3 02/13] selftests/bpf: add Error: prefix in check_extack helper Jakub Kicinski
2018-07-10 21:42 ` [PATCH bpf-next v3 03/13] tools: bpftool: refactor argument parsing for prog load Jakub Kicinski
2018-07-10 21:42 ` [PATCH bpf-next v3 04/13] tools: bpftool: add support for loading programs for offload Jakub Kicinski
2018-07-10 21:42 ` [PATCH bpf-next v3 05/13] tools: libbpf: expose the prog type guessing from section name logic Jakub Kicinski
2018-07-11  3:01   ` Andrey Ignatov
2018-07-10 21:43 ` [PATCH bpf-next v3 06/13] tools: bpftool: allow users to specify program type for prog load Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 07/13] tools: libbpf: recognize offload neutral maps Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 08/13] tools: libbpf: add extended attributes version of bpf_object__open() Jakub Kicinski
2018-07-11  3:03   ` Andrey Ignatov
2018-07-10 21:43 ` [PATCH bpf-next v3 09/13] tools: bpftool: reimplement bpf_prog_load() for prog load Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 10/13] tools: libbpf: move library error code into a separate file Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 11/13] tools: bpf: make use of reallocarray Jakub Kicinski
2018-07-13 23:53   ` [bpf-next,v3,11/13] " Guenter Roeck
2018-07-14  0:07     ` Jakub Kicinski [this message]
2018-07-14  0:31       ` Guenter Roeck
2018-07-14  1:16         ` Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 12/13] tools: libbpf: allow map reuse Jakub Kicinski
2018-07-11  3:45   ` Andrey Ignatov
2018-07-11  4:53     ` Jakub Kicinski
2018-07-10 21:43 ` [PATCH bpf-next v3 13/13] tools: bpftool: allow reuse of maps with bpftool prog load Jakub Kicinski
2018-07-11 20:18 ` [PATCH bpf-next v3 00/13] tools: bpf: extend " Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180713170758.66b01079@cakuba.lan \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=rdna@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.