From nobody Mon May 11 02:55:31 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF61EC433EF for ; Sun, 17 Apr 2022 07:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233584AbiDQHyI (ORCPT ); Sun, 17 Apr 2022 03:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233580AbiDQHyC (ORCPT ); Sun, 17 Apr 2022 03:54:02 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1996140C8; Sun, 17 Apr 2022 00:51:28 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id u5-20020a17090a6a8500b001d0b95031ebso4685327pjj.3; Sun, 17 Apr 2022 00:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iDv+72tnbPCd3DSLzaLYf0PTI9YrKoCtiTHll5hbSxo=; b=l9TSM5rIIdgg6hhq4yRiWKbiyGwRrsh08FYQp1e0a4Gh9uCI43lmrJtJNfvv5bSiAM hS8h9Y0bYG7zWRdic5jopsntpN/o7c4uvFFeODluZ7jJrX1A0dZUA2a3is/61/ZLnpA8 UWeAA27JffjZs6C7qaKKdQgkPrz5Sdm3syumZQlh4c3iCydb7F4Ue5fkSpO3HlkLvLhM x6sDDrtJPpCB0lBvpSr3gHgWibfJf3trE4IldeyQn4MJNE9Zv86VcyTOxODnxGg6dRBW qf6OTyub9zZrvBy7qxlytI6kpvfWjF3YbvqSoGF0P0aiS8n2+vmC12saitMk1TSTJ8I+ QPdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iDv+72tnbPCd3DSLzaLYf0PTI9YrKoCtiTHll5hbSxo=; b=EvejQgnVIvPrZ7KswRuesvDzjxJhGtPzIBGb3kSS0I58xV4s7ps7synh7nYaKKUJSj u+m7grQAICT9uGaA+z46GD1M1B3SzGwUqPOuFnoV8NyGQi5karzQjyw5g4OwVNL3XOYQ f0vHbz8ycVlyzyAWm6jUy7023CPymYHD5/u/0IuR/1oaZ+fCTG9vPCSJex5uVRT7s/bh o0Y5u1fY0IuLTOnS82LPpu3zgQkASb43zdBT5cElmGODnl2+ZjZODxFHE6UsHW7docS4 gn+qV6yLMxF1aMqtazqGJ1pmQ18eSXjqAabrh468aoSDvA7s4eJ0BVzPuRnor+jaLxoM Mp5g== X-Gm-Message-State: AOAM530hUnhcKXftHDpiHNYGV67v0Lp/I+w4dZdZZd72ViUlFwSoWptK yKIO2vKhXYzBYXIevQ0yjC0qFAwGivhJRQ== X-Google-Smtp-Source: ABdhPJydfLIkyr+VnJKc+uA5K5+9ktJSXyZJl04Kn8voy8PCMICi3r3VxQ1H1lvFzvFbfZ1KPwJBsg== X-Received: by 2002:a17:903:2d1:b0:156:7ceb:b56f with SMTP id s17-20020a17090302d100b001567cebb56fmr6265640plk.11.1650181887904; Sun, 17 Apr 2022 00:51:27 -0700 (PDT) Received: from debian.me (subs02-180-214-232-74.three.co.id. [180.214.232.74]) by smtp.gmail.com with ESMTPSA id m21-20020a17090a7f9500b001c97c6bcaf4sm13558356pjl.39.2022.04.17.00.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 00:51:27 -0700 (PDT) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Bagas Sanjaya , Jonathan Corbet , Eric Biggers , Herbert Xu , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH RESEND 1/2] Documentation: siphash: convert danger note to warning for HalfSipHash Date: Sun, 17 Apr 2022 14:50:57 +0700 Message-Id: <20220417075057.127865-2-bagasdotme@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220417075057.127865-1-bagasdotme@gmail.com> References: <20220417075057.127865-1-bagasdotme@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Render danger paragraph into warning block for emphasization. Cc: Jonathan Corbet Cc: Eric Biggers Cc: Herbert Xu Cc: Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya --- Documentation/security/siphash.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/security/siphash.rst b/Documentation/security/si= phash.rst index bd9363025fcbc1..42794a7e052f1e 100644 --- a/Documentation/security/siphash.rst +++ b/Documentation/security/siphash.rst @@ -121,12 +121,12 @@ even scarier, uses an easily brute-forcable 64-bit ke= y (with a 32-bit output) instead of SipHash's 128-bit key. However, this may appeal to some high-performance `jhash` users. =20 -Danger! - -Do not ever use HalfSipHash except for as a hashtable key function, and on= ly -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` a= s 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. =20 Generating a HalfSipHash key =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D --=20 An old man doll... just what I always wanted! - Clara From nobody Mon May 11 02:55:31 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0BE7C433EF for ; Sun, 17 Apr 2022 07:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233601AbiDQHyN (ORCPT ); Sun, 17 Apr 2022 03:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbiDQHyF (ORCPT ); Sun, 17 Apr 2022 03:54:05 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC24140D1; Sun, 17 Apr 2022 00:51:31 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id u5-20020a17090a6a8500b001d0b95031ebso4685360pjj.3; Sun, 17 Apr 2022 00:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MoKiGu5hYYcfsxqQHX2Q84Bhs0fRLBU9UCfGUfeAlqU=; b=HF8LwImncW0D1JtKhI+cq2dt3nB//pzEAk7tRBQrnEySTSmm/MDQHQzvYorITSuz2R ouw1Rc5wdNnwbFRCPngNRvpHKiu9zaTrOd6uEyTlEOFYu8K4KPYz/qKG42oH0Bhei64r cK3DbzifnAzF9qLWZjOqlIpLIQHD00Gdm5sSqa/l5S4wayRpk1WbOodvI+dZ1UCWLMf6 h66uACfhaB7miPIAk93SiGO9Cu6mIPpqIri0cO6b6dWEHn+gHAusvvkXDgCMe64ETQly hXaAntqSLcogJFrGDB20RVST/rRd0/5svij5jXynnfvwKSOkAGaLpcTwVXYzYIWNu15A W6iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MoKiGu5hYYcfsxqQHX2Q84Bhs0fRLBU9UCfGUfeAlqU=; b=nC4OoyspbMMdKBHAlWcCu00aSZfZyN2xohwc1dfQ99ItLzegpchuUL18TUKpKW0SsM Qt0gOWrw7oMuBuMHP2h2Etk+PAoQ1E8ynOlXQffQ0SeHElQfIA4Dh5oELYB2UyONyaIX 222dMFBs3sOK0fosew64Il8WlT4EA2kg7G4punCT9DNluwdTg7VojEv3PJolWia4dLYi mkLukur0AgoOxTV9Ey484TOISrzkrRrVvX6mHgbBu40HfVk/PM94v1/Ga/2YpPrwIh3y srPH4lroBjHGsiZam1fCOltn2nwhRGJGlsn7kax6KEOJvQmP4n13ysk1C1WsjVVwmWnK z2wg== X-Gm-Message-State: AOAM532/WhW0tSkm4w0v45/S6UAuqCGid09t+Rzvu8mNv+Ah+Mzzb8bM cQt387secxq+Ur70LPhXjBNYgu4tzjrkww== X-Google-Smtp-Source: ABdhPJwEM8DJm74QIZFhmFv4M6dyT8c3GvHa7PUfPI7/TCab213391jBRaPDx72DZH0VxJVBYSaRVg== X-Received: by 2002:a17:902:cf05:b0:156:9d:ca01 with SMTP id i5-20020a170902cf0500b00156009dca01mr6264769plg.111.1650181890860; Sun, 17 Apr 2022 00:51:30 -0700 (PDT) Received: from debian.me (subs02-180-214-232-74.three.co.id. [180.214.232.74]) by smtp.gmail.com with ESMTPSA id m21-20020a17090a7f9500b001c97c6bcaf4sm13558356pjl.39.2022.04.17.00.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 00:51:30 -0700 (PDT) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Bagas Sanjaya , Jonathan Corbet , Eric Biggers , Herbert Xu , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/2] Documentation: siphash: enclose HalfSipHash usage example in the literal block Date: Sun, 17 Apr 2022 14:50:58 +0700 Message-Id: <20220417075057.127865-3-bagasdotme@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220417075057.127865-1-bagasdotme@gmail.com> References: <20220417075057.127865-1-bagasdotme@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Render usage example of HalfSipHash function as code block by using literal block syntax. Cc: Jonathan Corbet Cc: Eric Biggers Cc: Herbert Xu Cc: Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya --- Documentation/security/siphash.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/security/siphash.rst b/Documentation/security/si= phash.rst index 42794a7e052f1e..06d793e680869c 100644 --- a/Documentation/security/siphash.rst +++ b/Documentation/security/siphash.rst @@ -132,10 +132,10 @@ Generating a HalfSipHash key =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 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:: =20 -hsiphash_key_t key; -get_random_bytes(&key, sizeof(key)); + hsiphash_key_t key; + get_random_bytes(&key, sizeof(key)); =20 If you're not deriving your key from here, you're doing it wrong. =20 --=20 An old man doll... just what I always wanted! - Clara