mbox series

[0/2] cxl: Fix oversized LSA write payload due to header

Message ID 20220815154044.24733-1-Jonathan.Cameron@huawei.com
Headers show
Series cxl: Fix oversized LSA write payload due to header | expand

Message

Jonathan Cameron Aug. 15, 2022, 3:40 p.m. UTC
Fix the bug by claiming the payload is smaller by 8 bytes for both
reads and writes. Also add a defensive check to aid catching similar
bugs in future.

Note that two issues also found in QEMU code whilst looking at this
bug. I'll send out fixes for those shortly.

Note that even with these
ndctl create-namespace fails.  More debugging underway.

Jonathan Cameron (2):
  cxl/mbox: Add a check on input payload size
  cxl/pmem: Fix failure to account for 8 byte header for writes to the
    device LSA.

 drivers/cxl/core/mbox.c | 2 +-
 drivers/cxl/pmem.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)