Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4626737iob; Sun, 8 May 2022 19:44:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvDlJh3oNuK2AuCz9qq2ZoUdsp8KNzCp6a4TW9ETQ0bxAmkspwgdo24jdykjranpx3ktOH X-Received: by 2002:a17:902:f70a:b0:153:88c7:774 with SMTP id h10-20020a170902f70a00b0015388c70774mr14327707plo.166.1652064271633; Sun, 08 May 2022 19:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652064271; cv=none; d=google.com; s=arc-20160816; b=ACMNg7DsvcDgF9tSQTHkTw7DFTclDYrrMVFTnighlPuebA8vyiPsJQoscsDEqoZ4wS vHAC4Fv7HmVP/ummnTUmeSo89XDmcaepwC5OI520c1cUN5db3hqE7zT7c+fyri79QRs5 +iRVsIdodQV8VrPbUpyE4/UgPBsw53pq9CICTzoPFapAVWETf2PZV+L5hjt9rWCi5GA2 fzoEYItvjRYfLtGovojGXJuk00Fwv6AmRlBwqJVUPiebewz+mymUn/7JBswxPjiJbHoj bZZdOzCiW4uijLvSYuv9H2q67UvbyFdLWhs2kMmNZEGi4xBWknlcWZ8C7xxQ1zD9N0B1 QGEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NAoAz+/NOez2wGCZnQTdc84GHGEoenuNAoJcJZeRVQQ=; b=gsRFYLUsdW84Vg8fKyTq8tJr/Ju/75syRtb+C2xmlpQ+85Z1JclQ/JWFqQgOyebaOv l3PuIzUcdI5gLeYzqKoKfmVXRlWk6P/n+IG48/TBpDDJWxWOjyq91V7rHdRiHS8wSVjq uB9YS1aXZzxHkOa3Hziv1XCGa6565UnM1usMhNBHFvAl1SdTaIZ6a7jgqSFzckmVXYNf g51+Nt8y0HGBeKYVNZY+wm63S6hQgneGdMz0jf6P9ugYt+L3B4iINNX+ZheYTHJeihJL TizQ72e54wHI/TLblLZlsZssWn/FadGxZBVobYlvcFzQyzccu3yWicQ4l8ql7KOQPBK2 15rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Az7pofcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mq9-20020a17090b380900b001dcc53646a2si14840517pjb.76.2022.05.08.19.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Az7pofcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 137217B136; Sun, 8 May 2022 19:44:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390835AbiEFKQA (ORCPT + 99 others); Fri, 6 May 2022 06:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345998AbiEFKP4 (ORCPT ); Fri, 6 May 2022 06:15:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B12CB50067; Fri, 6 May 2022 03:12:13 -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 D398CB834C4; Fri, 6 May 2022 10:12:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5933AC385AA; Fri, 6 May 2022 10:12:09 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Az7pofcI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1651831927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NAoAz+/NOez2wGCZnQTdc84GHGEoenuNAoJcJZeRVQQ=; b=Az7pofcI41WEDQEkaDFKsyK/l+H5K035XX1Zlw7cVmGSiWp1sw7iHY6RTHd0bXlluRFZ0S VP71J/0tLE6/dPmlFU3Wh3cel6YX/4H655NDAmEkqAy03x4QfKYUvBRHCg09dE76/d3hB2 VJDBa7Lz/XODxHu/OjVsqYI963BzDRs= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 0c0eb92d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 6 May 2022 10:12:07 +0000 (UTC) Date: Fri, 6 May 2022 12:12:04 +0200 From: "Jason A. Donenfeld" To: Thomas Gleixner Cc: kernel test robot , 0day robot , Arnd Bergmann , Theodore Ts'o , LKML , lkp@lists.01.org, linux-crypto@vger.kernel.org, nathan@kernel.org Subject: Re: [timekeeping] 3aeaac747d: PANIC:early_exception Message-ID: References: <20220506032023.GA23061@xsang-OptiPlex-9020> <8735hnhz1q.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8735hnhz1q.ffs@tglx> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Thomas, On Fri, May 06, 2022 at 09:59:13AM +0200, Thomas Gleixner wrote: > +/** > + * random_get_entropy_fallback - Returns the raw clock source value, > + * used by random.c for platforms with no valid random_get_entropy(). > + */ > +unsigned long random_get_entropy_fallback(void) > +{ > + struct tk_read_base *tkr = &tk_core.timekeeper.tkr_mono; > + struct clocksource *clock = READ_ONCE(tkr->clock); > + > + if (!timekeeping_suspended && clock) > + return clock->read(clock); > + return 0; > +} > +EXPORT_SYMBOL_GPL(random_get_entropy_fallback); I tried to address this already in , though yours looks better with the READ_ONCE() around clock, and I'll send a v8 doing it that way. I didn't realize that clock could become NULL again after becoming non-NULL. I'm not quite sure I understand the purpose of !timekeeping_suspended there, though. I'm not seeing the path where reading with it suspended negatively affects things. I'll take your word for it though. Jason