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]
Date:   Thu, 15 Oct 2020 09:16:29 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Tom Zanussi <zanussi@...nel.org>, axelrasmussen@...gle.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 7/7] selftests/ftrace: Add test case for synthetic
 event syntax errors

Hi Steve,

On Wed, 14 Oct 2020 13:32:15 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Wed, 14 Oct 2020 11:06:36 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > Hi Tom,
> > 
> > On Tue, 13 Oct 2020 09:17:58 -0500
> > Tom Zanussi <zanussi@...nel.org> wrote:
> > 
> > > Add a selftest that verifies that the syntax error messages and caret
> > > positions are correct for most of the possible synthetic event syntax
> > > error cases.
> > > 
> > > Signed-off-by: Tom Zanussi <zanussi@...nel.org>
> > > ---
> > >  .../trigger-synthetic_event_syntax_errors.tc  | 19 +++++++++++++++++++
> > >  1 file changed, 19 insertions(+)
> > >  create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc
> > > 
> > > diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc
> > > new file mode 100644
> > > index 000000000000..ada594fe16cb
> > > --- /dev/null
> > > +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc
> > > @@ -0,0 +1,19 @@
> > > +#!/bin/sh
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +# description: event trigger - test synthetic_events syntax parser errors
> > > +# requires: synthetic_events error_log  
> > 
> > This also requires dynamic strings support. So, its "requires" line should be
> > 
> > # requires: synthetic_events error_log "char name[]' >> synthetic_events":README
> > 
> > > +
> > > +check_error() { # command-with-error-pos-by-^
> > > +    ftrace_errlog_check 'synthetic_events' "$1" 'synthetic_events'
> > > +}
> > > +  
> > 
> > BTW, some errors looks a bit odd.
> > 
> > > +check_error 'myevent ^chr arg'			# INVALID_TYPE
> > > +check_error 'myevent ^char str[];; int v'	# INVALID_TYPE  
> > 
> > I think there is a wrong "void" argument between ";", instead of invalid type.
> > 
> > > +check_error 'myevent char ^str]; int v'		# INVALID_NAME
> > > +check_error 'myevent char ^str;[]'		# INVALID_NAME  
> > 
> > This is also not an invalid name but '[]' is an invalid type. 
> > 
> > > +check_error 'myevent ^char str[; int v'		# INVALID_TYPE
> > > +check_error '^mye;vent char str[]'		# BAD_NAME
> > > +check_error 'myevent char str[]; ^int'		# INVALID_FIELD  
> > 
> > Isn't it an incomplete command?
> > 
> > > +check_error '^myevent'				# INCOMPLETE_CMD
> > > +
> > > +exit 0  
> > 
> 
> Hi Masami,
> 
> I finished testing this series along with other patches (some from you),
> and I'm ready to push this to next, and hopefully soon to Linus. You have a
> "tested-by" for the entire series. Are you OK with this patch too? Can we
> push this forward and fix up any issues you have later?

I think this is OK to push at least for the upstream kernel (unless backporting).
The above issues can be fixed in another series :)

Thank you,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ