Skip to contentSkip to conversation

Documentation: siphash: formatting fixes

PATCH RESEND Applied Bagas Sanjaya 2 participants 4 messages Apr 17, 2022 – Apr 20, 2022 Documentation

lore
Share & tools
lore
#0 lore raw

cover Documentation: siphash: formatting fixes

Formatting fixes for Documentation/security/siphash.rst. The shortlog should be self-explanatory. Resend of [1].

[1]: https://lore.kernel.org/linux-doc/[email protected]/

Cc Jonathan Corbet <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>

Bagas Sanjaya (2):
Documentation: siphash: convert danger note to warning for HalfSipHash
Documentation: siphash: enclose HalfSipHash usage example in the
literal block

 Documentation/security/siphash.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

base-commit: f443e374ae131c168a065ea1748feac6b2e76613

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH RESEND 1/2 Documentation: siphash: convert danger note to warning for HalfSipHash

Render danger paragraph into warning block for emphasization.

Cc Jonathan Corbet <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 Documentation/security/siphash.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/security/siphash.rst +6 -6
index bd9363025fcbc1..42794a7e052f1e 100644
@@ -121,12 +121,12 @@ even scarier, uses an easily brute-forcable 64-bit key (with a 32-bit output)
 instead of SipHash's 128-bit key. However, this may appeal to some
 high-performance `jhash` users.
 
-Danger!
-
-Do not ever use HalfSipHash except for as a hashtable key function, and only
-then when you can be absolutely certain that the outputs will never be
-transmitted out of the kernel. This is only remotely useful over `jhash` as a
-means of mitigating hashtable flooding denial of service attacks.
+.. warning::
+   Do not ever use HalfSipHash except for as a hashtable key function, and
+   only then when you can be absolutely certain that the outputs will never
+   be transmitted out of the kernel. This is only remotely useful over
+   `jhash` as a means of mitigating hashtable flooding denial of service
+   attacks.
 
 Generating a HalfSipHash key
 ============================
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw

PATCH RESEND 2/2 Documentation: siphash: enclose HalfSipHash usage example in the literal block

In reply to Bagas Sanjaya

Render usage example of HalfSipHash function as code block by using literal block syntax.

Cc Jonathan Corbet <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 Documentation/security/siphash.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/security/siphash.rst +3 -3
index 42794a7e052f1e..06d793e680869c 100644
@@ -132,10 +132,10 @@ Generating a HalfSipHash key
 ============================
 
 Keys should always be generated from a cryptographically secure source of
-random numbers, either using get_random_bytes or get_random_once:
+random numbers, either using get_random_bytes or get_random_once::
 
-hsiphash_key_t key;
-get_random_bytes(&key, sizeof(key));
+        hsiphash_key_t key;
+        get_random_bytes(&key, sizeof(key));
 
 If you're not deriving your key from here, you're doing it wrong.
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer Applied
#3 lore raw
In reply to Bagas Sanjaya
Quoted 11 lines · Bagas Sanjaya

Formatting fixes for Documentation/security/siphash.rst. The shortlog should be self-explanatory. Resend of [1].

[1]: https://lore.kernel.org/linux-doc/[email protected]/

Cc Jonathan Corbet <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Quoted 7 lines

Bagas Sanjaya (2):
Documentation: siphash: convert danger note to warning for HalfSipHash
Documentation: siphash: enclose HalfSipHash usage example in the
literal block

 Documentation/security/siphash.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Applied, thanks.

jon