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:	Mon, 1 Mar 2010 15:05:48 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	davem@...emloft.net
Cc:	fujita.tomonori@....ntt.co.jp, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sparc: use asm-generic/scatterlist.h

On Fri, 26 Feb 2010 04:35:36 -0800 (PST)
David Miller <davem@...emloft.net> wrote:

> From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> Date: Fri, 26 Feb 2010 09:43:51 +0900
> 
> > sparc's scatterlist structure is identical to the generic one.
> > 
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> 
> Applied, thank you.

Thanks,

> BTW, the conditional sg_dma_len() definition cpp games done
> in asm-generic/scatterlist.h might be superfluous these days.

You are referring to the following code (I guess that this hack came
from x86)?

#if __BITS_PER_LONG == 64
#define sg_dma_len(sg)		((sg)->dma_length)
#else
#define sg_dma_len(sg)		((sg)->length)
#endif /* 64 bit */

if so, seems that you are right. we could simply have:

#define sg_dma_len(sg)		((sg)->dma_length)

The current users of asm-generic/scatterlist.h are microblaze, s390,
score, sh, and x86.

The first three users don't support DMA so sg_dma_len doesn't matter
for them.

sh and x86_32 use sg->length, x86_64 uses sg->dma_length. However, sh
and x86_32 sets dma_length in dma_map_sg() so they can use
sg->dma_length.

I'll clean up this in the next merge window.
--
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