summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/lowcore.h
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2012-03-11 11:59:38 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 11:59:30 -0400
commitf5bfa159d20c9a25c44a7f848c70d4156f78ba64 (patch)
tree78751be113b5a47f2b53e19036834f1ed912c0e6 /arch/s390/include/asm/lowcore.h
parent25e2cf1c1ac52d5078cf8cc3fd2f2ad084669ddd (diff)
downloadlinux-f5bfa159d20c9a25c44a7f848c70d4156f78ba64.tar.bz2
[S390] Ensure that vmcore_info pointer is never accessed directly
Because the vmcore_info pointer is not 8 byte aligned it never should not be accessed directly. The reason is that the compiler assumes that 64 bit pointer are always double word aligned. To ensure save access, the vmcore_info type in struct lowcore is changed from u64 to an u8[8] array and a comment is added. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/lowcore.h')
-rw-r--r--arch/s390/include/asm/lowcore.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index a47c6e221a95..47853debb3b9 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -302,7 +302,12 @@ struct _lowcore {
*/
__u64 ipib; /* 0x0e00 */
__u32 ipib_checksum; /* 0x0e08 */
- __u64 vmcore_info; /* 0x0e0c */
+ /*
+ * Because the vmcore_info pointer is not 8 byte aligned it never
+ * should not be accessed directly. For accessing the pointer, first
+ * copy it to a local pointer variable.
+ */
+ __u8 vmcore_info[8]; /* 0x0e0c */
__u8 pad_0x0e14[0x0e18-0x0e14]; /* 0x0e14 */
__u64 os_info; /* 0x0e18 */
__u8 pad_0x0e20[0x0f00-0x0e20]; /* 0x0e20 */