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, 23 Jan 2014 23:46:29 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Santosh Shilimkar <santosh.shilimkar@...com>
Cc:	Dave Hansen <dave.hansen@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	Grygorii Strashko <grygorii.strashko@...com>,
	Linux-MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Panic on 8-node system in memblock_virt_alloc_try_nid()

On Thu, Jan 23, 2014 at 11:22 PM, Santosh Shilimkar
<santosh.shilimkar@...com> wrote:
> On Friday 24 January 2014 02:04 AM, Yinghai Lu wrote:
>> On Thu, Jan 23, 2014 at 10:56 PM, Santosh Shilimkar
>> <santosh.shilimkar@...com> wrote:
>>> On Friday 24 January 2014 01:38 AM, Santosh Shilimkar wrote:
>>
>>> The patch which is now commit 457ff1d {lib/swiotlb.c: use
>>> memblock apis for early memory allocations} was the breaking the
>>> boot on Andrew's machine. Now if I look back the patch, based on your
>>> above description, I believe below hunk waS/is the culprit.
>>>
>>> @@ -172,8 +172,9 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
>>>         /*
>>>          * Get the overflow emergency buffer
>>>          */
>>> -       v_overflow_buffer = alloc_bootmem_low_pages_nopanic(
>>> -                                               PAGE_ALIGN(io_tlb_overflow));
>>> +       v_overflow_buffer = memblock_virt_alloc_nopanic(
>>> +                                               PAGE_ALIGN(io_tlb_overflow),
>>> +                                               PAGE_SIZE);
>>>         if (!v_overflow_buffer)
>>>                 return -ENOMEM;
>>>
>>>
>>> Looks like 'v_overflow_buffer' must be allocated from low memory in this
>>> case. Is that correct ?
>>
>> yes.
>>
>> but should the change like following
>>
>> commit 457ff1de2d247d9b8917c4664c2325321a35e313
>> Author: Santosh Shilimkar <santosh.shilimkar@...com>
>> Date:   Tue Jan 21 15:50:30 2014 -0800
>>
>>     lib/swiotlb.c: use memblock apis for early memory allocations
>>
>>
>> @@ -215,13 +220,13 @@ swiotlb_init(int verbose)
>>         bytes = io_tlb_nslabs << IO_TLB_SHIFT;
>>
>>         /* Get IO TLB memory from the low pages */
>> -       vstart = alloc_bootmem_low_pages_nopanic(PAGE_ALIGN(bytes));
>> +       vstart = memblock_virt_alloc_nopanic(PAGE_ALIGN(bytes), PAGE_SIZE);
>>         if (vstart && !swiotlb_init_with_tbl(vstart, io_tlb_nslabs, verbose))
>>                 return;
>>
> OK. So we need '__alloc_bootmem_low()' equivalent memblock API. We will try
> to come up with a patch for the same. Thanks for inputs.

Yes,

Andrew, can you try attached two patches in your setup?

Assume your system does not have intel iommu support?

Thanks

Yinghai

View attachment "fix_numa_x.patch" of type "text/x-patch" (1868 bytes)

View attachment "revert_memblock_swiotlb_change.patch" of type "text/x-patch" (3479 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ