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: <4C01058B.8020808@redhat.com>
Date:	Sat, 29 May 2010 15:16:11 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Tom Lyon <pugs@...co.com>, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, chrisw@...s-sol.org, joro@...tes.org,
	hjk@...utronix.de, mst@...hat.com, gregkh@...e.de,
	aafabbri@...co.com, scofeldm@...co.com
Subject: Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

On 05/29/2010 02:55 PM, Arnd Bergmann wrote:
> On Saturday 29 May 2010, Tom Lyon wrote:
>    
>> +/*
>> + * Structure for DMA mapping of user buffers
>> + * vaddr, dmaaddr, and size must all be page aligned
>> + * buffer may only be larger than 1 page if (a) there is
>> + * an iommu in the system, or (b) buffer is part of a huge page
>> + */
>> +struct vfio_dma_map {
>> +       __u64   vaddr;          /* process virtual addr */
>> +       __u64   dmaaddr;        /* desired and/or returned dma address */
>> +       __u64   size;           /* size in bytes */
>> +       int     rdwr;           /* bool: 0 for r/o; 1 for r/w */
>> +};
>>      
> Please add a 32 bit padding word at the end of this, otherwise the
> size of the data structure is incompatible between 32 x86 applications
> and 64 bit kernels.
>    

Might as well call it 'flags' and reserve a bit more space (keeping 
64-bit aligned size) for future expansion.

rdwr can be folded into it.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

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