linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] handle init errors more gracefully in amd_iommu
@ 2019-06-12 21:52 Kevin Mitchell
  2019-06-12 21:52 ` [PATCH 1/3] iommu/amd: make iommu_disable safer Kevin Mitchell
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kevin Mitchell @ 2019-06-12 21:52 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Kevin Mitchell

This series makes error handling more robust in the amd_iommu init
code. It was initially motivated by problematic firmware that does not
set up the physical address of the iommu. This led to a NULL dereference
panic when iommu_disable was called during cleanup.

While the first patch is sufficient to avoid the panic, the subsequent
two move the cleanup closer to the actual error and avoid calling the
cleanup code twice when amd_iommu=off is specified on the command line.

I have tested this series on a variety of AMD CPUs with firmware
exhibiting the issue. I have additionally tested on platforms where the
firmware has been fixed. I tried both with and without amd_iommu=off. I
have also tested on older CPUs where no IOMMU is detected and even one
where the GART driver ends up running.

Thanks,

Kevin

Kevin Mitchell (3):
  iommu/amd: make iommu_disable safer
  iommu/amd: move gart fallback to amd_iommu_init
  iommu/amd: only free resources once on init error

 drivers/iommu/amd_iommu_init.c | 45 ++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 21 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/3] handle init errors more gracefully in amd_iommu
@ 2019-05-28 18:29 Kevin Mitchell
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Mitchell @ 2019-05-28 18:29 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Kevin Mitchell

This series makes error handling more robust in the amd_iommu init
code. It was initially motivated by problematic firmware that does not
set up the physical address of the iommu. This led to a NULL dereference
panic when iommu_disable was called during cleanup.

While the first patch is sufficient to avoid the panic, the subsequent
two move the cleanup closer to the actual error and avoid calling the
cleanup code twice when amd_iommu=off is specified on the command line.

I have tested this series on a variety of AMD CPUs with firmware
exhibiting the issue. I have additionally tested on platforms where the
firmware has been fixed. I tried both with and without amd_iommu=off. I
have also tested on older CPUs where no IOMMU is detected and even one
where the GART driver ends up running.

Thanks,

Kevin

Kevin Mitchell (3):
  iommu/amd: make iommu_disable safer
  iommu/amd: move gart fallback to amd_iommu_init
  iommu/amd: only free resources once on init error

 drivers/iommu/amd_iommu_init.c | 45 ++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 21 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/3] handle init errors more gracefully in amd_iommu
@ 2019-05-17  0:52 Kevin Mitchell
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Mitchell @ 2019-05-17  0:52 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Kevin Mitchell

This series makes error handling more robust in the amd_iommu init
code. It was initially motivated by problematic firmware that does not
set up the physical address of the iommu. This led to a NULL dereference
panic when iommu_disable was called during cleanup.

While the first patch is sufficient to avoid the panic, the subsequent
two move the cleanup closer to the actual error and avoid calling the
cleanup code twice when amd_iommu=off is specified on the command line.

I have tested this series on a variety of AMD CPUs with firmware
exhibiting the issue. I have additionally tested on platforms where the
firmware has been fixed. I tried both with and without amd_iommu=off. I
have also tested on older CPUs where no IOMMU is detected and even one
where the GART driver ends up running.

Thanks,

Kevin

Kevin Mitchell (3):
  iommu/amd: make iommu_disable safer
  iommu/amd: move gart fallback to amd_iommu_init
  iommu/amd: only free resources once on init error

 drivers/iommu/amd_iommu_init.c | 45 ++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 21 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-01 11:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 21:52 [PATCH 0/3] handle init errors more gracefully in amd_iommu Kevin Mitchell
2019-06-12 21:52 ` [PATCH 1/3] iommu/amd: make iommu_disable safer Kevin Mitchell
2019-06-12 21:52 ` [PATCH 2/3] iommu/amd: move gart fallback to amd_iommu_init Kevin Mitchell
2019-06-12 21:52 ` [PATCH 3/3] iommu/amd: only free resources once on init error Kevin Mitchell
2019-07-01 11:54 ` [PATCH 0/3] handle init errors more gracefully in amd_iommu Joerg Roedel
  -- strict thread matches above, loose matches on Subject: below --
2019-05-28 18:29 Kevin Mitchell
2019-05-17  0:52 Kevin Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).