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:   Fri, 24 May 2019 10:53:31 +0100
From:   Marc Zyngier <marc.zyngier@....com>
To:     Julien Thierry <julien.thierry@....com>,
        linux-arm-kernel@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, Mark Rutland <mark.rutland@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] clocksource/arm_arch_timer: Don't trace count reader
 functions

On 24/05/2019 10:10, Julien Thierry wrote:
> With v5.2-rc1, The ftrace functions_graph tracer locks up whenever it is
> enabled on arm64.
> 
> Since commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use
> arch_timer_read_counter to access stable counters") a function pointer
> is consistently used to read the counter instead of potentially
> referencing an inlinable function.
> 
> The graph tacers relies on accessing the timer counters to compute the

nit: tracers

> time spent in functions which causes the lockup when attempting to trace
> these code paths.
> 
> Annontate the arm arch timer counter accessors as notrace.

nit: Annotate

> 
> Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use
>        arch_timer_read_counter to access stable counters")
> Signed-off-by: Julien Thierry <julien.thierry@....com>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> ---
>  drivers/clocksource/arm_arch_timer.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index b2a951a..5c69c9a 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg,
>  	return val;
>  }
>  
> -static u64 arch_counter_get_cntpct_stable(void)
> +static notrace u64 arch_counter_get_cntpct_stable(void)
>  {
>  	return __arch_counter_get_cntpct_stable();
>  }
>  
> -static u64 arch_counter_get_cntpct(void)
> +static notrace u64 arch_counter_get_cntpct(void)
>  {
>  	return __arch_counter_get_cntpct();
>  }
>  
> -static u64 arch_counter_get_cntvct_stable(void)
> +static notrace u64 arch_counter_get_cntvct_stable(void)
>  {
>  	return __arch_counter_get_cntvct_stable();
>  }
>  
> -static u64 arch_counter_get_cntvct(void)
> +static notrace u64 arch_counter_get_cntvct(void)
>  {
>  	return __arch_counter_get_cntvct();
>  }
> 

Well spotted, thanks Julien.

Acked-by: Marc Zyngier <marc.zyngier@....com>

Daniel, can you please pick this up for the next batch of clocksource fixes?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ