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] [day] [month] [year] [list]
Message-ID: <15be97c9-b287-4376-9fc1-9d574cb23d82@oracle.com>
Date: Tue, 2 Dec 2025 09:49:07 -0600
From: Dave Kleikamp <dave.kleikamp@...cle.com>
To: Robin Murphy <robin.murphy@....com>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma/pool: eliminate alloc_pages warning in
 atomic_pool_expand

On 12/2/25 9:47AM, Robin Murphy wrote:
> On 2025-12-02 3:28 pm, Dave Kleikamp wrote:
>> atomic_pool_expand iterately tries the allocation while decrementing the
> 
> "iteratively"?

Oops.

> 
>> page order. There is no need to issue a warning if an attempted
>> allocation fails.
>>
>> Signed-off-by: Dave Kleikamp <dave.kleikamp@...cle.com>
>> ---
>>   kernel/dma/pool.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
>> index ee45dee33d49..26392badc36b 100644
>> --- a/kernel/dma/pool.c
>> +++ b/kernel/dma/pool.c
>> @@ -93,7 +93,7 @@ static int atomic_pool_expand(struct gen_pool *pool, 
>> size_t pool_size,
>>               page = dma_alloc_from_contiguous(NULL, 1 << order,
>>                                order, false);
>>           if (!page)
>> -            page = alloc_pages(gfp, order);
>> +            page = alloc_pages(gfp | __GFP_NOWARN, order);
> 
> Might be nice to keep some kind of warning if we entirely fail all the 
> way down to order 0, although I guess if it matters it would show up via 
> the warning on dma_alloc_from_pool() failure soon enough anyway...
> 
> Either way it certainly makes sense in general;
> 
> Reviewed-by: Robin Murphy <robin.murphy@....com>

Thanks

> 
>>       } while (!page && order-- > 0);
>>       if (!page)
>>           goto out;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ