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]
Message-ID: <m18w94l9c9.fsf@fess.ebiederm.org>
Date:	Sat, 03 Apr 2010 10:44:22 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Joerg Roedel <joro@...tes.org>
Cc:	Chris Wright <chrisw@...s-sol.org>,
	Joerg Roedel <joerg.roedel@....com>, nhorman@...hat.com,
	nhorman@...driver.com, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org, hbabu@...ibm.com,
	iommu@...ts.linux-foundation.org, vgoyal@...hat.com
Subject: Re: [PATCH 3/4] Revert "x86: disable IOMMUs on kernel crash"

Joerg Roedel <joro@...tes.org> writes:

> On Fri, Apr 02, 2010 at 06:27:54PM -0700, Chris Wright wrote:
>> This effectively reverts commit 61d047be99757fd9b0af900d7abce9a13a337488.
>> 
>> Disabling the IOMMU can potetially allow DMA transactions to
>> complete without being translated.  Leave it enabled, and allow
>> crash kernel to do the IOMMU reinitialization properly.
>> 
>> Cc: Joerg Roedel <joerg.roedel@....com>
>> Cc: Eric Biederman <ebiederm@...ssion.com>
>> Cc: Neil Horman <nhorman@...driver.com>
>> Cc: Vivek Goyal <vgoyal@...hat.com>
>> Signed-off-by: Chris Wright <chrisw@...s-sol.org>
>> ---
>>  arch/x86/kernel/crash.c |    6 ------
>>  1 file changed, 6 deletions(-)
>> 
>> --- a/arch/x86/kernel/crash.c
>> +++ b/arch/x86/kernel/crash.c
>> @@ -27,7 +27,6 @@
>>  #include <asm/cpu.h>
>>  #include <asm/reboot.h>
>>  #include <asm/virtext.h>
>> -#include <asm/x86_init.h>
>>  
>>  #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
>>  
>> @@ -103,10 +102,5 @@ void native_machine_crash_shutdown(struc
>>  #ifdef CONFIG_HPET_TIMER
>>  	hpet_disable();
>>  #endif
>> -
>> -#ifdef CONFIG_X86_64
>> -	x86_platform.iommu_shutdown();
>> -#endif
>> -
>>  	crash_save_cpu(regs, safe_smp_processor_id());
>
> Hmm, I think for this we need to change the gart code too and disable
> the gart before its initialization runs to not re-introduce issues fixed
> in commit bc2cea6a34fdb30f118ec75db39a46a191870607, no?

That is a different code path with a different set of assumptions and
restrictions.  On a normal kexec of course we want to do an orderly shutdown.

For the gart with a little luck we can just ignore it on kexec on
panic.  Unlike a virtualization capable iommu it doesn't prevent access
to devices, when it is enabled.   Worst case is that we have to start
including iommu=off for gart systems. The best case is that we can
figure out how to have the gart code reinitialize itself sanely,
starting from some arbitrary point.

machine_crash_shutdown is about doing those things that we can not do
in any other way.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ