lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46440aba-be3f-a3d2-9f39-b7c2446ba50b@roeck-us.net>
Date:   Fri, 13 Jul 2018 17:31:34 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     alexei.starovoitov@...il.com, daniel@...earbox.net,
        Andrey Ignatov <rdna@...com>, oss-drivers@...ronome.com,
        netdev@...r.kernel.org
Subject: Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray

On 07/13/2018 05:07 PM, Jakub Kicinski wrote:
> 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?
> 

Unlikely. This is seen by my test builders which always start from a clean state.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ git describe
next-20180713
$ git clean -d -x -f -q
$ make allmodconfig
$ make tools/perf
...
libbpf.c: In function ‘bpf_object__add_program’:
libbpf.c:326:10: error: implicit declaration of function ‘reallocarray’

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ