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]
Date:	Thu, 10 Jan 2013 15:15:19 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Shuah Khan <shuahkhan@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.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, Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is not enough ram for it

Yinghai Lu <yinghai@...nel.org> writes:

> On Wed, Jan 9, 2013 at 1:15 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>> On Wed, Jan 9, 2013 at 1:00 PM, Eric W. Biederman <ebiederm@...ssion.com> wrote:
>>> Yinghai Lu <yinghai@...nel.org> writes:
>>>
>>>> please check updated attached. It should address all your request.
>>>
>>> There is one significant bug that I can see.
>>>
>>> swiotlb_print_info tests no_iotlb_memory but no_iotlb_memory is set
>>> after swiotlb_init_with_tlb returns.
>>
>> there is another swiotlb_print_info calling from
>> pci_swiotlb_late_init
>>
>> void __init pci_swiotlb_late_init(void)
>> {
>>         /* An IOMMU turned us off. */
>>         if (!swiotlb)
>>                 swiotlb_free();
>>         else {
>>                 printk(KERN_INFO "PCI-DMA: "
>>                        "Using software bounce buffering for IO (SWIOTLB)\n");
>>                 swiotlb_print_info();
>>         }
>> }
>>
>> so we need that checking when swiotlb == 1, but actually we can not
>> allocate that before.
>
> Eric, so the code is right to put checking in swiotlb_print_info ?

My biggest question was really why you didn't set no_iotlb
sooner.  But shrug I didn't see any real issue with the code except
for it being silly.

Certainly since we are calling swiotlb_print_info from outside swiotlb.c
the check is needed.

> I'd like to post the whole patchset again and ask HPA to put them in tip/next
> to catch -v3.9 merging window.

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