From c5418f070be300c4fe75d8fe038d36aa28d83ccd Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Sat, 14 May 2016 13:07:53 -0400 Subject: [PATCH] Pre-fill user buffers on passthrough commands Reported that user data may be shorter than the buffer length, and need to pad the data with a fixed byte value. Also requested that we provied a way to prefill data in buffers so we can know if a device is corrupting memory. Signed-off-by: Keith Busch --- Documentation/nvme-admin-passthru.1 | 12 +++++-- Documentation/nvme-admin-passthru.html | 48 ++++++++++++++++---------- Documentation/nvme-admin-passthru.txt | 9 +++++ Documentation/nvme-attach-ns.1 | 6 ++-- Documentation/nvme-compare.1 | 6 ++-- Documentation/nvme-create-ns.1 | 6 ++-- Documentation/nvme-delete-ns.1 | 6 ++-- Documentation/nvme-detach-ns.1 | 6 ++-- Documentation/nvme-dsm.1 | 6 ++-- Documentation/nvme-error-log.1 | 6 ++-- Documentation/nvme-flush.1 | 6 ++-- Documentation/nvme-format.1 | 6 ++-- Documentation/nvme-fw-activate.1 | 6 ++-- Documentation/nvme-fw-download.1 | 6 ++-- Documentation/nvme-fw-log.1 | 6 ++-- Documentation/nvme-get-feature.1 | 6 ++-- Documentation/nvme-get-log.1 | 6 ++-- Documentation/nvme-get-ns-id.1 | 6 ++-- Documentation/nvme-help.1 | 6 ++-- Documentation/nvme-id-ctrl.1 | 6 ++-- Documentation/nvme-id-ns.1 | 6 ++-- Documentation/nvme-io-passthru.1 | 12 +++++-- Documentation/nvme-io-passthru.html | 44 ++++++++++++++--------- Documentation/nvme-io-passthru.txt | 9 +++++ Documentation/nvme-list-ctrl.1 | 6 ++-- Documentation/nvme-list-ns.1 | 6 ++-- Documentation/nvme-list.1 | 6 ++-- Documentation/nvme-read.1 | 6 ++-- Documentation/nvme-reset.1 | 6 ++-- Documentation/nvme-resv-acquire.1 | 6 ++-- Documentation/nvme-resv-register.1 | 6 ++-- Documentation/nvme-resv-release.1 | 6 ++-- Documentation/nvme-resv-report.1 | 6 ++-- Documentation/nvme-security-recv.1 | 6 ++-- Documentation/nvme-security-recv.html | 24 +++++-------- Documentation/nvme-security-send.1 | 6 ++-- Documentation/nvme-set-feature.1 | 6 ++-- Documentation/nvme-show-regs.1 | 6 ++-- Documentation/nvme-smart-log.1 | 6 ++-- Documentation/nvme-subsystem-reset.1 | 6 ++-- Documentation/nvme-write-uncor.1 | 6 ++-- Documentation/nvme-write-zeroes.1 | 6 ++-- Documentation/nvme-write.1 | 6 ++-- Documentation/nvme.1 | 6 ++-- nvme.c | 7 ++++ 45 files changed, 219 insertions(+), 168 deletions(-) diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index 7be84bc..94c8b62 100644 --- a/Documentation/nvme-admin-passthru.1 +++ b/Documentation/nvme-admin-passthru.1 @@ -1,13 +1,13 @@ '\" t .\" Title: nvme-admin-passthru .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/26/2016 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 05/14/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "02/26/2016" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "05/14/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,6 +44,7 @@ nvme-admin-passthru \- Submit an arbitrary admin command, return results [\-\-timeout= | \-t ] [\-\-show\-command | \-\-dry\-run | \-s] [\-\-raw\-binary | \-b] + [\-\-prefill= | \-p ] .fi .SH "DESCRIPTION" .sp @@ -108,6 +109,11 @@ Do not actually send the command; print out the command that would be sent\&. .RS 4 Print the raw returned buffer to stdout if the command returns a structure\&. .RE +.PP +\-p, \-\-prefill +.RS 4 +Prefill the buffer with a predetermined byte value\&. Defaults to 0\&. This may be useful if the data you are writing is shorter than the required buffer, and you need to pad it with a known value\&. It may also be useful if you need to confirm if a device is overwriting a buffer for a data\-in command\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html index a955088..b42fd4f 100644 --- a/Documentation/nvme-admin-passthru.html +++ b/Documentation/nvme-admin-passthru.html @@ -3,7 +3,7 @@ - + nvme-admin-passthru(1)