Skip to content

Commit

Permalink
s390/pci: add extra padding to function measurement block
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Apr 1, 2016
1 parent b707c65 commit 9d89d9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/s390/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ struct zpci_fmb {
u64 rpcit_ops;
u64 dma_rbytes;
u64 dma_wbytes;
} __packed __aligned(64);
u64 pad[2];
} __packed __aligned(128);

enum zpci_state {
ZPCI_FN_STATE_RESERVED,
Expand Down

0 comments on commit 9d89d9e

Please sign in to comment.