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:	Tue, 02 Oct 2007 20:10:23 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	akepner@....com
Cc:	grundler@...isc-linux.org, jbarnes@...tuousgeek.org, jes@....com,
	randy.dunlap@...cle.com, rdreier@...co.com,
	James.Bottomley@...eleye.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] infiniband: add "dmabarrier" argument to
 ib_umem_get()

From: akepner@....com
Date: Tue, 2 Oct 2007 19:49:06 -0700

> 
> Pass a "dmabarrier" argument to ib_umem_get() and use the new 
> argument to control setting the DMA_BARRIER_ATTR attribute on 
> the memory that ib_umem_get() maps for DMA.
> 
> Signed-off-by: Arthur Kepner <akepner@....com>

Acked-by: David S. Miller <davem@...emloft.net>

However I'm a little unhappy with how IA64 achieves this.

The last argument for dma_map_foo() is an enum not an int,
every platform other than IA64 properly defines the last
argument as "enum dma_data_direction".  It can take one
of several distinct values, it is not a mask.

This hijacking of the DMA direction argument is hokey at
best, and at worst is type bypassing which is going to
explode subtly for someone in the future and result in
a long painful debugging session.

Adding another argument could be painful to do this cleanly, but at
least with inline functions and macros it could just evaluate to
nothing on platforms that don't need it.

Either that, or we should turn the thing into an integer "flags"
across the board and audit every DMA mapping implementation so that it
can handle multiple bits being set.  But that's really ugly and
invites mistakes as I detailed above.

-
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