Skip to contentSkip to conversation

docs/secure-coding-practices: Describe how to use 'null-co' block driver

PATCH Applied Philippe Mathieu-Daudé 2 participants 2 messages Jun 1, 2021 – Jun 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 docs/secure-coding-practices: Describe how to use 'null-co' block driver

Document that security reports must use 'null-co,read-zeroes=on' because otherwise the memory is left uninitialized (which is an on-purpose performance feature).

---
v4: Fixed typo (Kevin)
v3: Simplified using Vladimir suggestion.

---
 docs/devel/secure-coding-practices.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
docs/devel/secure-coding-practices.rst +9 -0
index cbfc8af67e6..0454cc527e1 100644
@@ -104,3 +104,12 @@ structures and only process the local copy.  This prevents
 time-of-check-to-time-of-use (TOCTOU) race conditions that could cause QEMU to
 crash when a vCPU thread modifies guest RAM while device emulation is
 processing it.
+
+Use of null-co block drivers
+----------------------------
+
+The ``null-co`` block driver is designed for performance: its read accesses are
+not initialized by default. In case this driver has to be used for security
+research, it must be used with the ``read-zeroes=on`` option which fills read
+buffers with zeroes. Security issues reported with the default
+(``read-zeroes=off``) will be discarded.
Signature · 1 line
2.26.3
Applied
#1 lore raw

Am 01.06.2021 um 18:25 hat Philippe Mathieu-Daudé geschrieben:

Quoted 9 lines

Document that security reports must use 'null-co,read-zeroes=on' because otherwise the memory is left uninitialized (which is an on-purpose performance feature).

---
v4: Fixed typo (Kevin)
v3: Simplified using Vladimir suggestion.

Thanks, applied to the block branch.

Kevin