5.4 kernel: when iommu is on crashdump fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Ioanna Alifieraki |
Bug Description
[IMPACT]
When iommu is enabled crashdump fails to be collected because crash-kernel crashes
with following trace [1].
Commits that address it :
1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
96d170f3b1a6 iommu/vt-d: Remove deferred_
a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_
034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
1d4615978f52 iommu/vt-d: Add attach_deferred() helper
1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
[TEST CASE]
Install a 5.4 kernel, add intel_iommu=on and iommu=pt to grub cmdline
and trigger a crash.
The crash kernel that boots will crash with trace [1].
[REGRESSION POTENTIAL]
1) 1ee0186b9a12 iommu/vt-d: Refactor find_domain() helper
Refactors find_domain() into two helpers: 1) find_domain()
only returns the domain in use; 2) deferred_
the deferred domain attachment if required and return the domain
in use.
2) 1d4615978f52 iommu/vt-d: Add attach_deferred() helper
Add helper function to check if a device's attach process is deffered.
Before this commit, this check was done with "dev->archdata.
This commit wraps it into a function.
Fixes (1).
3) 034d98cc0cdc iommu/vt-d: Move deferred device attachment into helper function
Takes the code that does the deffered attachment from deferred_
and places it in new do_deferred_
Fixes (1).
4) a11bfde9c77d iommu/vt-d: Do deferred attachment in iommu_need_
This one actually fixes the bug.
Attachement of devive needs to happen before checking if device is identity mapped.
Fixes (1).
5) 96d170f3b1a6 iommu/vt-d: Remove deferred_
Code cleanup, removes deferred_
find_domain and calls directly find_domain from caller sites.
Fixes (1).
6) 1ddb32da4a62 iommu/vt-d: Simplify check in identity_mapping()
Code cleanup.
Fixes (1).
Commits 2,3,5, and 6 are code movements/cleanups so little regression potential.
Commit 1 is the intial code refactroring ( the rest of commits fix it) and commit
3 fixes the bug.
So far testing has not revealed any regression. Any possible regression will regard
device deffered attachment.
[OTHER]
Kernel affected 5.4.
CVE References
Changed in linux (Ubuntu Focal): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Ioanna Alifieraki (joalif) |
description: | updated |
description: | updated |
tags: | added: bot-stop-nagging |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Incomplete → Invalid |
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 1922738
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.