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:	Wed, 6 Jun 2007 03:18:06 -0400 (EDT)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] lib:  Replace calls to __get_free_pages() with
 __get_dma_pages().

On Tue, 5 Jun 2007, Andrew Morton wrote:

> On Tue, 5 Jun 2007 16:58:57 -0400 (EDT)
> "Robert P. J. Day" <rpjday@...dspring.com> wrote:
>
> > Replace a couple calls to __get_free_pages() with the corresponding
> > calls to __get_dma_pages().
> >
> > Signed-off-by: Robert P. J. Day <rpjday@...dspring.com>
> >
> > ---
> >
> >   that's the lot of them.
> >
> > diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> > index 10c13ad..8fc38dc 100644
> > --- a/lib/swiotlb.c
> > +++ b/lib/swiotlb.c
> > @@ -201,8 +201,7 @@ swiotlb_late_init_with_default_size(size_t default_size)
> >  	bytes = io_tlb_nslabs << IO_TLB_SHIFT;
> >
> >  	while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) {
> > -		io_tlb_start = (char *)__get_free_pages(GFP_DMA | __GFP_NOWARN,
> > -		                                        order);
> > +		io_tlb_start = (char *)__get_dma_pages(__GFP_NOWARN, order);
>
> __get_dma_pages() is just pointless obfuscation.  I think it'd be better to
> go the other way: open-code the GFP_DMA at all callsites then send
> __get_dma_pages() bitbucketwards.

i have no objection to that.  it just seemed silly to have some calls
using one form and some using the other.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
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