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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLWg38K9gUK0RJdgNkU4KvwvvYK-8Zjb43NDQO7w1MNQmA@mail.gmail.com>
Date:   Tue, 6 Sep 2016 23:17:40 -0700
From:   John Stultz <john.stultz@...aro.org>
To:     Baolin Wang <baolin.wang@...aro.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mark Brown <broonie@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer

On Tue, Sep 6, 2016 at 11:06 PM, Baolin Wang <baolin.wang@...aro.org> wrote:
> For system debugging, we sometimes want to know who sets one
> alarm timer, the time of the timer, when the timer started and
> fired and so on. Thus adding tracepoints can help us trace the
> alarmtimer information.
>
> For example, when we debug the system supend/resume, if the
> system is always resumed by RTC alarm, we can find out which
> process set the alarm timer to resume system by below trace log:
>
> ......
> Binder:2976_6-3473  [005] d..2  1076.587732: alarmtimer_start:
> process:Binder:2976_6
> alarmtimer type:ALARM_BOOTTIME expires:1234154000000 time: 1970-1-1
> 0:20:35
>
> Binder:2976_7-3480  [002] d..2  1076.592707: alarmtimer_cancel:
> process:Binder:2976_7
> alarmtimer type:ALARM_BOOTTIME expires:1325463060000000000 time:
> 2012-1-2 0:11:0
>
> Binder:2976_7-3480  [002] d..2  1076.592731: alarmtimer_start:
> process:Binder:2976_7
> alarmtimer type:ALARM_BOOTTIME expires:1325378040000000000 time:
> 2012-1-1 0:34:0
>
> system_server-2976  [003] d..2  1076.605587: alarmtimer_cancel:
> process:system_server
> alarmtimer type:ALARM_BOOTTIME expires:1234154000000 time: 1970-1-1
> 0:20:35
>
> system_server-2976  [003] d..2  1076.605608: alarmtimer_start:
> process:system_server
> alarmtimer type:ALARM_BOOTTIME expires:1234155000000 time: 1970-1-1
> 0:20:35
>
> system_server-3000  [002] ...1  1087.737565: alarmtimer_suspend:
> alarmtimer type:ALARM_BOOTTIME
> expires time: 2012-1-1 0:34:0
> ......
>
> From the trace log, we can find out the 'Binder:2976_7' process
> set one alarm timer which resumes the system.
>
> Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
> Acked-by: Steven Rostedt <rostedt@...dmis.org>
> ---
> Changes since v3:
>  - Fix the build error on S390.

Since the original change is already applied to tip/timers/core, can
you provide an incremental patch (a patch against tip/timers/core)
that fixes the issue, rather then resending the entire patch?

Also, the "#ifdef CONFIG_RTC_LIB" solution I proposed was sort of a
hack, so I'd hope to see something better.

One better solution would be to add a dummy static inline
implementation of rtc_ktime_to_tm() in include/linux/rtc.h.

ie something like:
#ifdef CONFIG_RTC_LIB
struct rtc_time rtc_ktime_to_tm(ktime_t kt);
#else
static inline rtc_time rtc_ktime_to_tm(ktime_t kt)
{
    struct rt_time ret;
    memset(&ret, 0,  sizeof(struct rt_time));
    return ret;
}
#endif

thanks
-john

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ