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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48205B0D.70202@seznam.cz>
Date:	Tue, 06 May 2008 15:20:13 +0200
From:	Michal Simek <monstr@...nam.cz>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Michal Simek <monstr@...nam.cz>,
	John Williams <john.williams@...alogix.com>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	stephen.neuendorffer@...inx.com, John.Linn@...inx.com,
	matthew@....cx, will.newton@...il.com, drepper@...hat.com,
	microblaze-uclinux@...e.uq.edu.au, grant.likely@...retlab.ca
Subject: Re: [PATCH 36/56] microblaze_v2: dma support

Hi all,

here is proposed struct.

struct scatterlist {
      dma_addr_t      	dma_address;
      unsigned long	page_link;
#ifdef CONFIG_DEBUG_SG
      unsigned long	sg_magic;
#endif
      unsigned int    	length;
      unsigned int    	offset;
};

Is it OK now?

Michal


>>> struct scatterlist {
>>>       unsigned long page_link;
>>>       unsigned int    offset;
>>>       unsigned int    length;
>>>       dma_addr_t      dma_address;
>>> };
>> If unsigned long is 32-bit but dma_addr_t is 64-bit, there may be a gap
>> between length and dma_address.
>>
> 
> But moving dma_address to the front only has the effect to create implicit
> padding at the end of struct scatterlist, so you don't gain anything
> either way.
> 
> It's only an internal definition that can be changed at any time without
> breaking applications, so I wouldn't worry about it, and better leave
> it identical to the other architectures.
> 
> The one thing that should indeed be changed is the addition of
> 'unsigned long sg_magic' that is needed for CONFIG_DEBUG_SG.
> 
> 	Arnd <><

--
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