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: <Pine.LNX.4.64.0706041504150.3644@localhost.localdomain>
Date:	Mon, 4 Jun 2007 15:07:27 -0400 (EDT)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Christoph Lameter <clameter@....com>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: __get_free_pages:  can GFP_DMA omit GFP_KERNEL and GFP_ATOMIC?

On Mon, 4 Jun 2007, Christoph Lameter wrote:

> On Mon, 4 Jun 2007, Robert P. J. Day wrote:
>
> > all right, then some of those __get_free_pages() calls would translate
> > to calls of the form __get_dma_pages(0, ...) -- is that what you're
> > saying?  or would it be equivalent and preferable to put GFP_ATOMIC in
> > there just so it looks not so weird?
>
> Put GFP_ATOMIC in there so that it does not look weird.
>
> GFP_ATOMIC & ~__GFP_HIGH == GFP_NOWAIT
>
> So these should have GFP_NOWAIT as far as I can tell?

beats me.  just FYI, it's not like this would be a massive change --
here's the entire collection of candidates for conversion over to
__get_dma_pages():

$ grep -r "get_free.*GFP_DMA" *
arch/s390/kernel/smp.c:                 __get_free_pages(GFP_KERNEL | GFP_DMA,
drivers/net/arm/ep93xx_eth.c:           page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
drivers/net/arm/ep93xx_eth.c:           page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
drivers/s390/net/qeth_main.c:                   ptr = (void *) __get_free_page(GFP_KERNEL|GFP_DMA);
drivers/s390/net/claw.c:                        (void *)__get_free_pages(__GFP_DMA,
drivers/s390/net/claw.c:                        (void *)__get_free_pages(__GFP_DMA,
drivers/s390/net/claw.c:                   p_buff=(void *)__get_free_pages(__GFP_DMA,
drivers/s390/net/claw.c:                        (void *)__get_free_pages(__GFP_DMA,
drivers/s390/net/claw.c:                        p_buff = (void *)__get_free_pages(__GFP_DMA,
drivers/s390/block/dasd.c:      device->ccw_mem = (void *) __get_free_pages(GFP_ATOMIC | GFP_DMA, 1);
drivers/s390/char/tty3270.c:                    __get_free_pages(GFP_KERNEL|GFP_DMA, 0);
drivers/s390/char/sclp_cpi.c:   sccb = (struct cpi_sccb *) __get_free_page(GFP_KERNEL | GFP_DMA);
drivers/s390/cio/cmf.c:         mem = (void*)__get_free_pages(GFP_KERNEL | GFP_DMA,
lib/swiotlb.c:          io_tlb_start = (char *)__get_free_pages(GFP_DMA | __GFP_NOWARN,
lib/swiotlb.c:  io_tlb_overflow_buffer = (void *)__get_free_pages(GFP_DMA,
sound/oss/sscape.c:             start_addr = (char *) __get_free_pages(GFP_ATOMIC|GFP_DMA, sz);
sound/oss/hal2.c:       codec->buffer = (unsigned char *)__get_free_pages(GFP_KERNEL | GFP_DMA,
sound/oss/dmabuf.c:             start_addr = (char *) __get_free_pages(GFP_ATOMIC|GFP_DMA|__GFP_NOWARN, sz);

  and, obviously, it's not worth doing anything under sound/.  so
we're not talking enormous cleanup or anything.

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