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]
Message-Id: <20190703172033.7b575566e6e2f269bcc93cc5@kernel.org>
Date:   Wed, 3 Jul 2019 17:20:33 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     shuah <shuah@...nel.org>, Po-Hsu Lin <po-hsu.lin@...onical.com>,
        mingo@...hat.com, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/ftrace: skip ftrace test if FTRACE was not
 enabled

On Tue, 2 Jul 2019 23:18:08 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Wed, 3 Jul 2019 12:09:53 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > > Would something like that work?  
> > 
> > For older kernel, I think we'd better try to mount debugfs first.
> 
> Sure, that's pretty trivial to do. Or what I was thinking, try it if it
> fails:
> 
>  	if [ -z "$TRACING_DIR" ]; then
>  	  save_err=$err_ret
>  	  err_ret=$err_skip
> 	  if mount -t tracefs nodev /sys/kernel/tracing; then
>  	    TRACING_DIR="/sys/kernel/tracing"
> 	  elif mount -t debugfs nodev /sys/kernel/debug; then
>  	    TRACING_DIR="/sys/kernel/debug/tracing"
> 	  else
> 	    errexit "debugfs is not configured in this kernel"
> 	  fi
> 	  if [ ! -d "$TRACING_DIR" ]; then
> 	    errexit "ftrace is not configured in this kernel"
> 	  fi
>  	  err_ret=$save_err
>  	fi

This looks good to me :)

Thank you,

> 
> -- Steve


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ