arm64 arch_timer fixes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
dann frazier | ||
Zesty |
Fix Released
|
Undecided
|
dann frazier |
Bug Description
[Impact]
This bug captures a few issues with the ARM arch_timer driver:
1) Some arm64 systems have hardware defects in their architected timer implementations that require errata, which we workaround in the kernel. However, it's possible that this workaround will not be applied if the timer was reset w/ the user access bit set.
2) The Juno board fails to initialize a timer at boot:
arch_timer: Unable to map frame @ 0x0000000000000000
arch_timer: Frame missing phys irq.
Failed to initialize '/timer@2a810000': -22
3) Possible boot warning from arch_timer_
'Trying to vfree() nonexistent vm area'
4) There's a theoretical problem where the first frame of a timer could be used even though a better suited timer frame is available.
5) An infinite recursion loop will occur when enabling the function tracer in builds with CONFIG_
[Test Case]
I've regression tested this on both a system w/ an errata workaround (HiSilicon D05) and one that is not (Cavium ThunderX CRB1S). In both cases the timer was initialized correctly. Verified by looking at the boot messages:
dannf@d05-3:~$ dmesg | grep arch_timer
[ 0.000000] arch_timer: Enabling global workaround for HiSilicon erratum 161010101
[ 0.000000] arch_timer: CPU0: Trapping CNTVCT access
[ 0.000000] arch_timer: cp15 timer(s) running at 50.00MHz (phys).
[ 0.194241] arch_timer: CPU1: Trapping CNTVCT access
[ 0.197305] arch_timer: CPU2: Trapping CNTVCT access
<.....>
[ 0.396228] arch_timer: CPU62: Trapping CNTVCT access
[ 0.399752] arch_timer: CPU63: Trapping CNTVCT access
ubuntu@grotrian:~$ dmesg | grep arch_timer
[ 0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[Regression Risk]
The regression risk is restricted to ARM systems, as this driver only applies there. Regressions could lead to a timer failing to initialize, or a system that requires errata not having the appropriate workaround applied. (Which are also the conditions that the suggested backports are attempting to fix).
CVE References
Changed in linux (Ubuntu Zesty): | |
status: | New → Confirmed |
description: | updated |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
description: | updated |
description: | updated |
Changed in linux (Ubuntu): | |
assignee: | nobody → dann frazier (dannf) |
Changed in linux (Ubuntu Zesty): | |
assignee: | nobody → dann frazier (dannf) |
Changed in linux (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in linux (Ubuntu Zesty): | |
status: | Confirmed → In Progress |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1713821
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.