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: <c62985530910251727o23beafcco539870e4b2f84637@mail.gmail.com>
Date:	Mon, 26 Oct 2009 01:27:18 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Wu Zhangjin <wuzhangjin@...il.com>
Cc:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	rostedt@...dmis.org, Thomas Gleixner <tglx@...utronix.de>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Nicholas Mc Guire <der.herr@...r.at>,
	Richard Sandiford <rdsandiford@...glemail.com>,
	David Daney <ddaney@...iumnetworks.com>,
	Adam Nemet <anemet@...iumnetworks.com>,
	Patrik Kluba <kpajko79@...il.com>
Subject: Re: [PATCH -v5 08/11] tracing: not trace mips_timecounter_init() in 
	MIPS

2009/10/25 Wu Zhangjin <wuzhangjin@...il.com>:
> -static inline u64 mips_timecounter_read(void)
> +static inline u64 notrace mips_timecounter_read(void)


You don't need to set notrace functions, unless their addresses
are referenced somewhere, which unfortunately might happen
for some functions but this is rare.


>  {
>  #ifdef CONFIG_CSRC_R4K
>        return r4k_timecounter_read();
> diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
> index 4e7705f..0690bea 100644
> --- a/arch/mips/kernel/csrc-r4k.c
> +++ b/arch/mips/kernel/csrc-r4k.c
> @@ -42,7 +42,7 @@ static struct timecounter r4k_tc = {
>        .cc = NULL,
>  };
>
> -static cycle_t r4k_cc_read(const struct cyclecounter *cc)
> +static cycle_t notrace r4k_cc_read(const struct cyclecounter *cc)
>  {
>        return read_c0_count();
>  }
> @@ -66,7 +66,7 @@ int __init init_r4k_timecounter(void)
>        return 0;
>  }
>
> -u64 r4k_timecounter_read(void)
> +u64 notrace r4k_timecounter_read(void)
>  {
>        u64 clock;
>
> diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
> index 83d2fbd..2a02992 100644
> --- a/include/linux/clocksource.h
> +++ b/include/linux/clocksource.h
> @@ -73,7 +73,7 @@ struct timecounter {
>  * XXX - This could use some mult_lxl_ll() asm optimization. Same code
>  * as in cyc2ns, but with unsigned result.
>  */
> -static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
> +static inline u64 notrace cyclecounter_cyc2ns(const struct cyclecounter

ditto here.


*cc,
>                                      cycle_t cycles)
>  {
>        u64 ret = (u64)cycles;
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index 5e18c6a..9ce9d02 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -52,7 +52,7 @@ EXPORT_SYMBOL(timecounter_init);
>  * The first call to this function for a new time counter initializes
>  * the time tracking and returns an undefined result.
>  */
> -static u64 timecounter_read_delta(struct timecounter *tc)
> +static u64 notrace timecounter_read_delta(struct timecounter *tc)
>  {
>        cycle_t cycle_now, cycle_delta;
>        u64 ns_offset;
> @@ -72,7 +72,7 @@ static u64 timecounter_read_delta(struct timecounter


Hmm yeah this is not very nice to do that in core functions because
of a specific arch problem.
At least you have __notrace_funcgraph, this is a notrace
that only applies if CONFIG_FUNCTION_GRAPH_TRACER
so that it's still traceable by the function tracer in this case.

But I would rather see a __mips_notrace on these two core functions.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ