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
| ||
|
Date: Fri, 4 Jan 2013 14:34:28 -0800 From: Yinghai Lu <yinghai@...nel.org> To: Shuah Khan <shuahkhan@...il.com> Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>, "Eric W. Biederman" <ebiederm@...ssion.com>, Andrew Morton <akpm@...ux-foundation.org>, Borislav Petkov <bp@...en8.de>, Jan Kiszka <jan.kiszka@....de>, Jason Wessel <jason.wessel@...driver.com>, linux-kernel@...r.kernel.org, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, Joerg Roedel <joro@...tes.org> Subject: Re: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is not enough ram for it On Fri, Jan 4, 2013 at 2:26 PM, Shuah Khan <shuahkhan@...il.com> wrote: > However, I think regression on existing behavior with a > panic is a bit of a big hammer. Thie change causes panic on systems > even when kdump is not enabled, if I understand it correctly. I don't think so. +static bool __init enough_mem_for_swiotlb(void) +{ + /* do we have less than 1M RAM under 4G ? */ + return memblock_mem_size(1ULL<<(32-PAGE_SHIFT)) > (1ULL<<20); +} enough_mem_for_swiotlb could return false for them? and int __init pci_swiotlb_detect_override(void) { - int use_swiotlb = swiotlb | swiotlb_force; - if (swiotlb_force) swiotlb = 1; + else if (!enough_mem_for_swiotlb()) + swiotlb = 0; - return use_swiotlb; + return swiotlb; } it only disable swiotlb when there is less 1M mem under 4G. -- 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