Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-03 Thread Dan Carpenter
I'm afraid Roman's patch doesn't fix the bug. On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote: > On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > > begining then the "duration" is uninitialized

Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-01 Thread Alexei Starovoitov
On Sat, Dec 01, 2018 at 08:12:34PM +, Roman Gushchin wrote: > > From dc70ddb39c2f8d87d64b8d0fd71f4baa956d5f50 Mon Sep 17 00:00:00 2001 > From: Roman Gushchin > Date: Sat, 1 Dec 2018 10:39:44 -0800 > Subject: [PATCH v2 bpf] bpf: refactor bpf_test_run() to separate own failures > and test prog

Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-01 Thread Roman Gushchin
On Sat, Dec 01, 2018 at 11:28:46AM -0800, Alexei Starovoitov wrote: > On Sat, Dec 01, 2018 at 07:13:50PM +, Roman Gushchin wrote: > > On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote: > > > On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > > > > Smatch complains

Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-01 Thread Alexei Starovoitov
On Sat, Dec 01, 2018 at 07:13:50PM +, Roman Gushchin wrote: > On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote: > > On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > > > begining then the "d

Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-01 Thread Roman Gushchin
On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote: > On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > > begining then the "duration" is uninitialized. We then copy the > > unintialized variables

Re: [PATCH net] bpf: uninitialized variables in test code

2018-11-30 Thread Alexei Starovoitov
On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > begining then the "duration" is uninitialized. We then copy the > unintialized variables to the user inside the bpf_test_finish() > function. The functions require

Re: [PATCH net] bpf: uninitialized variables in test code

2018-11-30 Thread Song Liu
On Thu, Nov 29, 2018 at 2:28 AM Dan Carpenter wrote: > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > begining then the "duration" is uninitialized. We then copy the > unintialized variables to the user inside the bpf_test_finish() > function. The functions require CAP_SYS

[PATCH net] bpf: uninitialized variables in test code

2018-11-29 Thread Dan Carpenter
Smatch complains that if bpf_test_run() fails with -ENOMEM at the begining then the "duration" is uninitialized. We then copy the unintialized variables to the user inside the bpf_test_finish() function. The functions require CAP_SYS_ADMIN so it's not really an information leak. Fixes: 1cf1cae96