From: Arnd Bergmann <arnd@arndb.de>
To: haver@linux.vnet.ibm.com
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, cody@linux.vnet.ibm.com,
schwidefsky@de.ibm.com, utz.bacher@de.ibm.com, mmarek@suse.cz,
rmallon@gmail.com, jsvogt@de.ibm.com, MIJUNG@de.ibm.com,
cascardo@linux.vnet.ibm.com, michael@ibmra.de
Subject: Re: [PATCH 1/6] GenWQE PCI support, health monitoring and recovery
Date: Tue, 3 Dec 2013 16:05:38 +0100 [thread overview]
Message-ID: <201312031605.38972.arnd@arndb.de> (raw)
In-Reply-To: <1386082011.29309.2.camel@oc7383187364.ibm.com>
On Tuesday 03 December 2013, Frank Haverkamp wrote:
> Ohh, sorry __u64 of course:
>
> /* common struct for chip image exchange */
> struct genwqe_bitstream {
> __u64 data_addr; /* pointer to image data */
> __u32 size; /* size of image file */
> __u32 crc; /* crc of this image */
> __u8 partition; /* '0', '1', or 'v' */
> __u64 target_addr; /* starting address in Flash */
> __u8 uid; /* 1=host/x=dram */
>
> __u64 slu_id; /* informational/sim: SluID */
> __u64 app_id; /* informational/sim: AppID */
>
> __u16 retc; /* returned from processing */
> __u16 attn; /* attention code from
> processing */
> __u32 progress; /* progress code from processing
> */
> };
>
> and than I do in my userspace application:
>
> load.data_addr = (unsigned long)buf;
>
> Is that ok, or must I consider more?
>
I haven't followed the recent discussions, jumping into the middle here:
The structure above is not safe for a generic ioctl interface because it
has different padding on x86-32 and x86-64, where __u64 has different
alignment.
You can try to avoid the implicit padding by sorting the members by size,
by making some members larger or by adding explicit padding.
Arnd
next prev parent reply other threads:[~2013-12-03 15:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 12:45 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v7) Frank Haverkamp
2013-11-06 12:45 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-11-27 19:16 ` Greg KH
2013-12-03 13:35 ` Frank Haverkamp
2013-12-03 14:30 ` Greg KH
2013-12-03 14:46 ` Frank Haverkamp
2013-12-03 15:05 ` Arnd Bergmann [this message]
2013-12-04 9:59 ` Frank Haverkamp
2013-11-27 19:20 ` Greg KH
2013-12-03 13:49 ` Frank Haverkamp
2013-12-03 14:30 ` Greg KH
2013-11-06 12:45 ` [PATCH 2/6] GenWQE Character device and DDCB queue Frank Haverkamp
2013-11-06 12:45 ` [PATCH 3/6] GenWQE Utility functions Frank Haverkamp
2013-11-27 19:26 ` Greg KH
2013-12-03 13:21 ` Frank Haverkamp
2013-11-06 12:45 ` [PATCH 4/6] GenWQE Debugfs interfaces Frank Haverkamp
2013-11-06 12:45 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-11-27 19:22 ` Greg KH
2013-12-03 12:53 ` Frank Haverkamp
2013-12-03 14:28 ` Greg KH
2013-11-06 12:45 ` [PATCH 6/6] GenWQE Enable driver Frank Haverkamp
2013-11-22 13:37 ` [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v7) Frank Haverkamp
2013-11-22 16:52 ` Greg KH
2013-11-27 10:26 ` Frank Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2013-12-09 12:30 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v10) Frank Haverkamp
2013-12-09 12:30 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-05 14:15 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v9) Frank Haverkamp
2013-12-05 14:15 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-03 14:28 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v8) Frank Haverkamp
2013-12-03 14:28 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-04 10:02 ` Frank Haverkamp
2013-12-05 2:27 ` Arnd Bergmann
2013-12-05 12:44 ` Frank Haverkamp
2013-12-04 14:02 ` Frank Haverkamp
2013-12-05 2:38 ` Arnd Bergmann
2013-12-05 12:50 ` Frank Haverkamp
2013-12-05 20:31 ` Arnd Bergmann
2013-12-06 8:39 ` Frank Haverkamp
2013-12-09 12:34 ` Frank Haverkamp
2013-11-05 8:44 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v6) Frank Haverkamp
2013-11-05 8:44 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201312031605.38972.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=MIJUNG@de.ibm.com \
--cc=cascardo@linux.vnet.ibm.com \
--cc=cody@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=haver@linux.vnet.ibm.com \
--cc=jsvogt@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ibmra.de \
--cc=mmarek@suse.cz \
--cc=rmallon@gmail.com \
--cc=schwidefsky@de.ibm.com \
--cc=utz.bacher@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox