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:   Tue, 10 Jul 2018 13:16:30 -0700
From:   tip-bot for Sudeep Holla <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     marc.zyngier@....com, tglx@...utronix.de, mingo@...nel.org,
        sudeep.holla@....com, hpa@...or.com, mark.rutland@....com,
        khilman@...libre.com, martin.blumenstingl@...glemail.com,
        linux-kernel@...r.kernel.org
Subject: [tip:timers/urgent] clocksource: arm_arch_timer: Set arch_mem_timer
 cpumask to cpu_possible_mask

Commit-ID:  5e18e412973d6bb1804de1d4d30a891c774b006e
Gitweb:     https://git.kernel.org/tip/5e18e412973d6bb1804de1d4d30a891c774b006e
Author:     Sudeep Holla <sudeep.holla@....com>
AuthorDate: Mon, 9 Jul 2018 16:45:36 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 10 Jul 2018 22:12:47 +0200

clocksource: arm_arch_timer: Set arch_mem_timer cpumask to cpu_possible_mask

Currently, arch_mem_timer cpumask is set to cpu_all_mask which should be
fine. However, cpu_possible_mask is more accurate and if there are other
clockevent source in the system which are set to cpu_possible_mask, then
having cpu_all_mask may result in issue.

E.g. on a platform with arm,sp804 timer with rating 300 and
cpu_possible_mask and this arch_mem_timer timer with rating 400 and
cpu_all_mask, tick_check_preferred may choose both preferred as the
cpumasks are not equal though they must be.

This issue was root caused incorrectly initially and a fix was merged as
commit 1332a9055801 ("tick: Prefer a lower rating device only if it's CPU
local device").

Signed-off-by: Sudeep Holla <sudeep.holla@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Kevin Hilman <khilman@...libre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Mark Rutland <mark.rutland@....com>
Link: https://lkml.kernel.org/r/1531151136-18297-2-git-send-email-sudeep.holla@arm.com

---
 drivers/clocksource/arm_arch_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 57cb2f00fc07..d8c7f5750cdb 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -735,7 +735,7 @@ static void __arch_timer_setup(unsigned type,
 		clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
 		clk->name = "arch_mem_timer";
 		clk->rating = 400;
-		clk->cpumask = cpu_all_mask;
+		clk->cpumask = cpu_possible_mask;
 		if (arch_timer_mem_use_virtual) {
 			clk->set_state_shutdown = arch_timer_shutdown_virt_mem;
 			clk->set_state_oneshot_stopped = arch_timer_shutdown_virt_mem;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ