aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLukas Wunner <[email protected]>2023-03-11 14:40:04 +0000
committerDan Williams <[email protected]>2023-04-03 23:16:49 +0000
commit4fe2c13d59d849be3b45371e3913ec5dc77fc0fb (patch)
tree50323597540ddc1ac7f92e2047bfcadef83ce3a8 /tools/perf/scripts/python
parentcxl/pci: Handle truncated CDAT entries (diff)
downloadkernel-4fe2c13d59d849be3b45371e3913ec5dc77fc0fb.tar.gz
kernel-4fe2c13d59d849be3b45371e3913ec5dc77fc0fb.zip
cxl/pci: Handle excessive CDAT length
If the length in the CDAT header is larger than the concatenation of the header and all table entries, then the CDAT exposed to user space contains trailing null bytes. Not every consumer may be able to handle that. Per Postel's robustness principle, "be liberal in what you accept" and silently reduce the cached length to avoid exposing those null bytes. Fixes: c97006046c79 ("cxl/port: Read CDAT table") Tested-by: Ira Weiny <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Cc: [email protected] # v6.0+ Link: https://lore.kernel.org/r/6d98b3c7da5343172bd3ccabfabbc1f31c079d74.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions