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: <d4b0cf45-67ab-47ce-9acf-1dc934dcc50e@stanley.mountain>
Date: Wed, 15 Jan 2025 14:12:13 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Costa Shulyupin <costa.shul@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	Daniel Bristot de Oliveira <bristot@...nel.org>,
	John Kacur <jkacur@...hat.com>,
	"Luis Claudio R. Goncalves" <lgoncalv@...hat.com>,
	Eder Zulian <ezulian@...hat.com>, Tomas Glozar <tglozar@...hat.com>,
	Gabriele Monaco <gmonaco@...hat.com>,
	linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] Fix bug and add osnoise_trace_is_off()

On Wed, Jan 15, 2025 at 10:09:56AM +0200, Costa Shulyupin wrote:
> diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c
> index 245e9344932bc..20275642a74cd 100644
> --- a/tools/tracing/rtla/src/osnoise.c
> +++ b/tools/tracing/rtla/src/osnoise.c
> @@ -1079,6 +1079,25 @@ struct osnoise_tool *osnoise_init_trace_tool(char *tracer)
>  	return NULL;
>  }
>  
> +int osnoise_trace_is_off(struct osnoise_tool *tool, struct osnoise_tool *record)
> +{
> +	/*
> +	 * The tool instance is always present, it is the one used to collect
> +	 * data.
> +	 */
> +	if (!tracefs_trace_is_on(tool->trace.inst))
> +		return 1;
> +
> +	/*
> +	 * The trace record instance is only enabled when -t is set. IOW, when the system
> +	 * is tracing.
> +	 */
> +	if (record && !tracefs_trace_is_on(record->trace.inst))
> +		return 1;
> +
> +	return 0;
> +}

Also this function should be declared as type bool and return true/false
instead of 1/0.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ