Re: [PATCH net] bpf: fix byte order test in test_verifier

2017-08-04 Thread David Miller
From: Daniel Borkmann Date: Fri, 4 Aug 2017 22:24:41 +0200 > We really must check with #if __BYTE_ORDER == XYZ instead of > just presence of #ifdef __LITTLE_ENDIAN. I noticed that when > actually running this on big endian machine, the latter test > resolves to true for

Re: [PATCH net] bpf: fix byte order test in test_verifier

2017-08-04 Thread Yonghong Song
On 8/4/17 1:24 PM, Daniel Borkmann wrote: We really must check with #if __BYTE_ORDER == XYZ instead of just presence of #ifdef __LITTLE_ENDIAN. I noticed that when actually running this on big endian machine, the latter test resolves to true for user space, same for #ifdef __BIG_ENDIAN. E.g.,

[PATCH net] bpf: fix byte order test in test_verifier

2017-08-04 Thread Daniel Borkmann
We really must check with #if __BYTE_ORDER == XYZ instead of just presence of #ifdef __LITTLE_ENDIAN. I noticed that when actually running this on big endian machine, the latter test resolves to true for user space, same for #ifdef __BIG_ENDIAN. E.g., looking at endian.h from libc, both are also