diff options
| author | Vaibhav Jain <[email protected]> | 2019-09-27 11:50:02 +0530 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2019-10-10 20:15:53 +1100 |
| commit | 612ee81b9461475b5a5612c2e8d71559dd3c7920 (patch) | |
| tree | 36eeb3aeaaa1b767b2fe786d0b8b1dc74591d509 /tools/perf/scripts/python | |
| parent | da0c9ea146cbe92b832f1b0f694840ea8eb33cce (diff) | |
powerpc/papr_scm: Fix an off-by-one check in papr_scm_meta_{get, set}
A validation check to prevent out of bounds read/write inside
functions papr_scm_meta_{get,set}() is off-by-one that prevent reads
and writes to the last byte of the label area.
This bug manifests as a failure to probe a dimm when libnvdimm is
unable to read the entire config-area as advertised by
ND_CMD_GET_CONFIG_SIZE. This usually happens when there are large
number of namespaces created in the region backed by the dimm and the
label-index spans max possible config-area. An error of the form below
usually reported in the kernel logs:
[ 255.293912] nvdimm: probe of nmem0 failed with error -22
The patch fixes these validation checks there by letting libnvdimm
access the entire config-area.
Fixes: 53e80bd042773('powerpc/nvdimm: Add support for multibyte read/write for metadata')
Signed-off-by: Vaibhav Jain <[email protected]>
Reviewed-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions