[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190402173927.pvqprcbjk42km3mc@ast-mbp.dhcp.thefacebook.com>
Date: Tue, 2 Apr 2019 10:39:29 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Paul Chaignon <paul.chaignon@...nge.com>,
Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org,
bpf@...r.kernel.org, Xiao Han <xiao.han@...nge.com>,
paul.chaignon@...il.com, Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH bpf] bpf: report verifier bugs as warnings
On Tue, Apr 02, 2019 at 04:37:19PM +0200, Daniel Borkmann wrote:
> On 04/02/2019 01:58 PM, Paul Chaignon wrote:
> > Three checks for verifier bugs were introduced in commit f4d7e40 ("bpf:
> > introduce function calls (verification)"). The bugs were reported as
> > incorrect programs instead of kernel warnings as the present patch
> > implements.
> >
> > Signed-off-by: Paul Chaignon <paul.chaignon@...nge.com>
>
> Thanks for the patch, I think these WARN_ONCE() are a bit out of context though,
> meaning it lacks additional information about the program in kernel log once we
> actually manage to trigger it which we'd otherwise would potentially have had with
> the verbose() log. And from a program debugging pov, it makes it harder after this
> patch when verification log would suggest that all is fine. Looks like we already
> have a few WARN_ONCE() in verifier, they should probably be converted to verbose()
> as well to be consistent. If we really want to have a kernel warn, then lets add a
> helper macro verbose_and_warn(...) which will trigger a one-time warning, but keeps
> the verbose log intact as well.
I think they should stay as verbose() messages and some of the WARN_ON
should be converted to verbose().
I don't think there is a need for verbose_and_warn().
Powered by blists - more mailing lists