summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorGaobin Huang <huanggaobin23@semi.ac.cn>2026-11-02 11:15:13 -0800
committerDave Jiang <dave.jiang@intel.com>2026-11-02 14:00:22 -0700
commita0481710d758d1d9c560a84551dbb61ea86d3299 (patch)
tree27ed997b96b23d2525a7c6fdca831a4148e99054 /scripts/Makefile.thinlto
parent70965c84446497a30177177a54b388d443fedf6e (diff)
downloadlinux-next-a0481710d758d1d9c560a84551dbb61ea86d3299.tar.gz
linux-next-a0481710d758d1d9c560a84551dbb61ea86d3299.zip
cxl/mbox: Treat unknown device return codes as errors
cxl_mbox_cmd_rc2errno() and cxl_mbox_cmd_rc2str() use the device's 16-bit return code to index cxl_mbox_cmd_rctable[]. A return code outside the table's range causes an out-of-bounds read, potentially allowing a failed command to be reported as successful. Check the return code against the table size. Report unknown codes as -ENXIO, the errno used for most device-reported errors, and describe them as "unknown return code". Found with a QEMU Type-3 device returning codes 001Fh and 0020h, which are defined in CXL 4.0 but not yet recognized by Linux [1]. [1] https://lore.kernel.org/linux-cxl/20260929060747.3550005-1-huanggaobin23@semi.ac.cn/ Fixes: 92fcc1abab09 ("cxl/mbox: Improve handling of mbox_cmd hw return codes") Cc: stable@vger.kernel.org Signed-off-by: Gaobin Huang <huanggaobin23@semi.ac.cn> Co-developed-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Li Ming <ming.li@zohomail.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Acked-by: Gaobin Huang <huanggaobin23@semi.ac.cn> Link: https://patch.msgid.link/1c822ac0361e7aecb318b73f0288ad1c862517ff.1793645996.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions