Re: [iproute PATCH] lib/bpf: Fix bytecode-file parsing

2017-09-04 Thread Stephen Hemminger
On Tue, 29 Aug 2017 17:09:45 +0200 Phil Sutter wrote: > The signedness of char type is implementation dependent, and there are > architectures on which it is unsigned by default. In that case, the > check whether fgetc() returned EOF failed because the return value was > assigned an (unsigned) ch

Re: [iproute PATCH] lib/bpf: Fix bytecode-file parsing

2017-09-01 Thread Daniel Borkmann
On 08/30/2017 04:11 PM, Phil Sutter wrote: On Wed, Aug 30, 2017 at 03:53:59PM +0200, Daniel Borkmann wrote: On 08/29/2017 05:09 PM, Phil Sutter wrote: [...] I don't really have a strong opinion on this, but the logic for normalizing here is getting a bit convoluted. Is your use case for makin

Re: [iproute PATCH] lib/bpf: Fix bytecode-file parsing

2017-08-30 Thread Phil Sutter
Hi Daniel, On Wed, Aug 30, 2017 at 03:53:59PM +0200, Daniel Borkmann wrote: > On 08/29/2017 05:09 PM, Phil Sutter wrote: [...] > > @@ -228,18 +229,20 @@ static int bpf_parse_string(char *arg, bool > > from_file, __u16 *bpf_len, > > case '\n': > > if

Re: [iproute PATCH] lib/bpf: Fix bytecode-file parsing

2017-08-30 Thread Daniel Borkmann
On 08/29/2017 05:09 PM, Phil Sutter wrote: The signedness of char type is implementation dependent, and there are architectures on which it is unsigned by default. In that case, the check whether fgetc() returned EOF failed because the return value was assigned an (unsigned) char variable prior t