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]
Message-Id: <529DCB3C0200007800109502@nat28.tlf.novell.com>
Date:	Tue, 03 Dec 2013 11:14:52 +0000
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Roger Pau Monne" <roger.pau@...rix.com>
Cc:	"David Vrabel" <david.vrabel@...rix.com>,
	"Stefano Stabellini" <stefano.stabellini@...citrix.com>,
	"Julien Grall" <julien.grall@...aro.org>,
	<xen-devel@...ts.xenproject.org>,
	"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [Xen-devel] [PATCH RFC] xen-block: correctly define
 structures in public headers

>>> On 03.12.13 at 11:57, Roger Pau Monne <roger.pau@...rix.com> wrote:
>  struct blkif_request_rw {
>  	uint8_t        nr_segments;  /* number of segments                   */
>  	blkif_vdev_t   handle;       /* only for read/write requests         */
> -#ifdef CONFIG_X86_64
> -	uint32_t       _pad1;	     /* offsetof(blkif_request,u.rw.id) == 8 */
> -#endif
>  	uint64_t       id;           /* private guest value, echoed in resp  */
>  	blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
>  	struct blkif_request_segment {
> @@ -157,47 +154,36 @@ struct blkif_request_rw {
>  		/* @last_sect: last sector in frame to transfer (inclusive).     */
>  		uint8_t     first_sect, last_sect;
>  	} seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
> -} __attribute__((__packed__));
> +};

Removing the packed attribute here and below is not possible
as long as the defined structures get used in struct blkif_request
as the second field after a uint8_t one, and as long as the
individual fields here aren't natively aligned.

Jan

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