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:   Mon, 2 Jan 2017 13:01:54 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Frederic Weisbecker <fweisbec@...il.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Borislav Petkov <bp@...en8.de>,
        Wanpeng Li <wanpeng.li@...mail.com>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] x86/apic: Implement set_state_oneshot_stopped() callback

On 29-12-16, 17:45, Frederic Weisbecker wrote:
> When clock_event_device::set_state_oneshot_stopped() is not implemented,
> hrtimer_cancel() can't stop the clock when there is no more timer in
> the queue. So the ghost of the freshly cancelled hrtimer haunts us back
> later with an extra interrupt:
> 
>           <idle>-0     [002] d..2  2248.557659: hrtimer_cancel: hrtimer=ffff88021fa92d80
>           <idle>-0     [002] d.h1  2249.303659: local_timer_entry: vector=239
> 
> So let's implement this missing callback for the lapic clock. This
> consist in calling its set_state_shutdown() callback. There don't seem
> to be a lighter way to stop the clock. Simply writing 0 to APIC_TMICT
> won't be enough to stop the clock and avoid the extra interrupt, as
> opposed to what is specified in the specs. We must also mask the
> timer interrupt in the device.
> 
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Wanpeng Li <wanpeng.li@...mail.com>
> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> ---
>  arch/x86/kernel/apic/apic.c | 25 +++++++++++++------------
>  1 file changed, 13 insertions(+), 12 deletions(-)

I didn't try updating anything other than the ARM subsystem as I was afraid of
getting crushed by Thomas :)

Though, I do remember from one of the email (from Thomas), where he mentioned
that disabling the timer on some platforms may have bigger penalties. Perhaps
its fast enough for apic..

Reviewed-by: Viresh Kumar <viresh.kumar@...aro.org>

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ