From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756018AbeD3UIF (ORCPT ); Mon, 30 Apr 2018 16:08:05 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:37267 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754652AbeD3UID (ORCPT ); Mon, 30 Apr 2018 16:08:03 -0400 X-Google-Smtp-Source: AB8JxZqNdDyChj0xP/u0knCNyB6jRWmtDuoJ75K7kV/xvf925SyNy+yuj5yi1JUR4Ay7EBeatdtq6BS9c70Scfqylr0= MIME-Version: 1.0 References: <20180430124135.0cce92e3@gandalf.local.home> In-Reply-To: From: Linus Torvalds Date: Mon, 30 Apr 2018 20:07:52 +0000 Message-ID: Subject: Re: Hashed pointer issues To: Kees Cook Cc: tcharding , "Theodore Ts'o" , Steven Rostedt , Anna-Maria Gleixner , Linux Kernel Mailing List , "Jason A. Donenfeld" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 1:01 PM Linus Torvalds < torvalds@linux-foundation.org> wrote: > But if there are no actual users of get_random_bytes_arch(), maybe we can > just remove the fallback to the non-arch code, and add that return value > (and the __must_check()). Hmm. It is exported, so maybe there is some crazy module out there. Also, I have to admit that I hate the idea of people using that function for a "fast random number generator". I think it's fine for this kind of "initialize hashing state" thing, but I would hate for somebody to actually use "get_random_bytes_arch()" as an actual source of random bytes. Even when the "real" random number generator uses it, at least it washes the result through chacha20 and has other sources or entropy mixed in too. So let's rename it regardless. Both to see if any external module actually uses that get_random_bytes_arch() function, and to discourage people to use it as direct random data. Maybe call it something like "get_seed_bytes_arch()" or something. And maybe I'm just being silly. Linus