Skip to content

Commit 9d89d9e

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
s390/pci: add extra padding to function measurement block
Newer machines might use a different (larger) format for function measurement blocks. To ensure that we comply with the alignment requirement on these machines and prevent memory corruption (when firmware writes more data than we expect) add 16 padding bytes at the end of the fmb. Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent b707c65 commit 9d89d9e

File tree

1 file changed

+2
-1
lines changed
  • arch/s390/include/asm

1 file changed

+2
-1
lines changed

arch/s390/include/asm/pci.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ struct zpci_fmb {
4444
u64 rpcit_ops;
4545
u64 dma_rbytes;
4646
u64 dma_wbytes;
47-
} __packed __aligned(64);
47+
u64 pad[2];
48+
} __packed __aligned(128);
4849

4950
enum zpci_state {
5051
ZPCI_FN_STATE_RESERVED,

0 commit comments

Comments
 (0)