Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1777160iof; Tue, 7 Jun 2022 11:13:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT7gtHT/OpjOWKo0i4EhB3dOgCR3yIEmQAPObOVVxfvbpWNauMnFXQkDZEFxVVFUsi2yaV X-Received: by 2002:aa7:9217:0:b0:518:367d:fa85 with SMTP id 23-20020aa79217000000b00518367dfa85mr97132858pfo.9.1654625580520; Tue, 07 Jun 2022 11:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654625580; cv=none; d=google.com; s=arc-20160816; b=QibW+d0jbyLpbdR1yfoarMXcb5+p/p99JzlqjmGeQQ4nUyfV6QQM5x4QbMk4N9mZz4 8YJ9a0zsg3+QJ12blYxucFKgMe991WUK6+rEw3v6DN2LrxXkHO3vHPS/JAADSV3rDaZa Co88LEUCdPpLPIDChgOC2rhFdi48mzC1gOiWDOBcq+UQNlWfw0+3X2o1+fSf8T0g2xPY uagiji8sjGwLBxoWsPtdz3b87CCO+H9pLxJW1wPgzTOJGzvlX0njjcTu76fNk5+FobdV qRN2EVfgSu/yQqKjFDmbjgF/JsH5Lhlkk/Sa1M2+muK5UOnEuZY9iD/s2SuQcFKpT83I 96wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+ViRAfXAe9W+pLFYqjFQr2b/AEjKHxY3Y1+jWdYOufg=; b=KWWNgOyvvdVqEpcR3kfvzajWEomVCq/YPh037D+5BwDuLqN+xldXEmDxWwS4hcKiM+ UhRiH02lPV0vmCgBrrkBhhiEFrva9AgbG3nQXDvZYA+4iwm24dnQezAvQBQr+GM03+5W RYkZMiBcTnhYTKfG3dA4X+W21uuWtE7oYZJkL+Ha4yguSyAmriVRkpx6dGBnHLGOYVvB rIuFkTf5UgHuemorGqbG2L9WmQsozOMlPD4Fu+pzU1DgE2/B/Hz/8yOFbnjMMOyWXLNn aWHqWeLFMjuyQEwBG8K+otYCUy6+xSL38rA1mxef8i2Wp7JipIk9BZXdpI2e0jGmcTp+ nWEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqOU2pPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j33-20020a632321000000b003fc64b118b9si14219238pgj.450.2022.06.07.11.12.40; Tue, 07 Jun 2022 11:13:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqOU2pPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243345AbiFGMDt (ORCPT + 99 others); Tue, 7 Jun 2022 08:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232955AbiFGMDq (ORCPT ); Tue, 7 Jun 2022 08:03:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D176464D02 for ; Tue, 7 Jun 2022 05:03:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8B792B80DB1 for ; Tue, 7 Jun 2022 12:03:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D5C6C36AFE for ; Tue, 7 Jun 2022 12:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654603422; bh=+ViRAfXAe9W+pLFYqjFQr2b/AEjKHxY3Y1+jWdYOufg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pqOU2pPhklQwJz0Z/EoBa0lQrrDHdoki9xPpyrdpmzoXyynoAlHNBw1w4SxSYHh02 Fqq3wdHGuZzg681gww7k/isQs1kIuREIAB5FcQNlhMpBzn/W6MM4u5v06ArFTB1KFT 6SXJqu+xgdVr9TlDF6TKOz/mJ7dufoho43HUoSKD7Mdf70bJX90x9namivlvhq21on bZNEMJaxfjzvhKysdY75eV1utwAFwCsBDIIe1wR+AZFTmHocdvmPmdnHXkKkXaUA2W LVjqL06Y6gOam7w7yl2F1ZdGgQUCGPrZj81+C7m71YbhDS/w1/gwTWgjDLlSXRLgnE XXzVraXkrTjGg== Received: by mail-oi1-f180.google.com with SMTP id q184so6652886oia.1 for ; Tue, 07 Jun 2022 05:03:42 -0700 (PDT) X-Gm-Message-State: AOAM530VGqW5yqDnm25pIrFsz6S2Dd2y9mxSlHkTR8BAXcI8t4jNpwYn +DmrtpqqIDobQmtYgoxmLtS2FCvCI0DN6sKHk5s= X-Received: by 2002:a05:6808:f88:b0:32b:d10f:cc6b with SMTP id o8-20020a0568080f8800b0032bd10fcc6bmr31929999oiw.228.1654603421508; Tue, 07 Jun 2022 05:03:41 -0700 (PDT) MIME-Version: 1.0 References: <20220607100210.683136-1-Jason@zx2c4.com> In-Reply-To: From: Ard Biesheuvel Date: Tue, 7 Jun 2022 14:03:28 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] random: do not use jump labels before they are initialized To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Boyd , Catalin Marinas , Russell King , Arnd Bergmann , Phil Elwell Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Jun 2022 at 13:35, Jason A. Donenfeld wrote: > > Hi Ard, > > On Tue, Jun 07, 2022 at 01:10:52PM +0200, Ard Biesheuvel wrote: > > Fair enough. What I would like is to remove the need to play around > > with the placement of jump_label_init() across architectures. Jump > > labels are fundamentally a performance optimization, so unless you can > > explain how setting it as early as possible makes a material > > difference, performance or otherwise, I really think we should pursue > > a solution that does the static key manipulation at some later time. > > Alright. It sounds like Catalin also prefers the same. This seems simple > enough with minimal downsides: https://lore.kernel.org/lkml/20220607113238.769088-1-Jason@zx2c4.com/ > That looks simple enough. Do we risk causing any boot stalls due to the crediting being deferred? Or new warnings about randomness being used before CRNG is ready? > So maybe we should just go that route. > It is not my preferred approach, but I can live with it.