diff options
| author | Shao Mingyin <shao.mingyin@zte.com.cn> | 2026-11-06 23:00:19 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-11-06 10:38:46 -0800 |
| commit | ad606ae5635b68e324005aaa06421be752619dab (patch) | |
| tree | 18ddb2b0a87ca6c7fa4a85c02e6a9560157361c6 /tools/perf/scripts/python | |
| parent | f3c20e42ff5628b93ed0084154cf62082a2157b2 (diff) | |
nvmet: zero the entire Get Log Page transfer buffer
Several fixed-size Get Log Page handlers copy only the log structure
and leave the rest of the host buffer untouched. The transport buffers
are not zeroed, so a host requesting more bytes than the structure
receives stale kernel memory.
Zero the entire transfer length before filling the buffer in the
Supported Log Pages, Commands Supported and Effects, Supported
Features, Endurance Group, Rotational Media Information and Reservation
handlers. For the Error log, also clamp the ring walk to the requested
length and propagate copy failures instead of completing with success.
The Rotational Media Information handler now accepts a buffer larger
than its fixed structure.
Fixes: 11ad507784ed ("nvmet: add error log page cmd handler")
Fixes: 83acb24e6de7 ("nvmet: implement supported log pages")
Fixes: 0866bf0c3778 ("nvmet: add commands supported and effects log page")
Fixes: e973c91727d4 ("nvmet: implement supported features log")
Fixes: 266b652c65b4 ("nvmet: implement endurance groups")
Fixes: 5fd075cdaf36 ("nvmet: implement rotational media information log")
Fixes: 5a47c2080a73 ("nvmet: support reservation feature")
Cc: stable@vger.kernel.org
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
