Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp465916lfb; Mon, 2 May 2022 10:19:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLvBqCeOgW6Z/FaqZsn5ebsxQ50W0DsTzTJYCFdyJrC++fBAKzY5tlbEw+7lY6jk93P9wB X-Received: by 2002:a05:6512:1398:b0:448:bda0:99f2 with SMTP id p24-20020a056512139800b00448bda099f2mr9214916lfa.681.1651511995026; Mon, 02 May 2022 10:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651511995; cv=none; d=google.com; s=arc-20160816; b=PSoRXTmGRKsNWtz05Ali5BlfWc/qSD8Spa2zsKiEN9/4RNQZT0d0EW8Q5aexZ/8ha6 Y+3sOE4UaaOTkVXjYNzJLsAkd+f1cLL1F3n1rV/KPKiJl73AUdtuM3AYHnQTxJ7TS63C pQ6zxXav1P/dssjNTz5O+LWCIeIu/80QkXmVxCXrtwKWfC3vR8YBp9kILi37PZgYxEUx 1EP7VlaO7HamvdJFkyBypbJXS6nZOO9gjIvih9uY/TJZPo/gp9Fmop0FiXgj71Wepxty OCYMtIDGRKOlFub3ia0EqOiTWKRZ2YJtVxg4enaB4tHwwARIQ2uTpN4tt7KplaqKuJYc 5Kvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=jYGGwnXeFPcIOHQmhzSCBgH4HMwEO9aRAXTxvIySbxU=; b=ogab5vtoJnKJAPTFocKkm97cBK2jTX4nUxlNImw/T4YLXTgSDdh6HU2AMfA4Yp2NIZ Toz7FurvjI+HoqpVsgUrdJA3RO23ZuNZ8MGA3292ct+5GXlKrzvUxNU2XzC8/0NmzAG2 f4D40HxkjpZiLQMv7pMOQFioBGtMWFIaSQlyZ+zC0HVT45jkUDF8HsRl6WBv+IBZ9zoo 3VpM6oCowkhN1EObkMeus4ZOS9RCQxHsTP3eWi7DmjkS6/uUDrRbrSlkgciK9IJHhayP Vt1DeX8UZo3jug3Nhp6ejqD4dzB0Q5Y/WLbDPaZgbIYs4nENR7gyuq7hO0WQvVHjUz7k zdew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xRWWMcx6; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a05651c014500b0024b01d56415si14259746ljd.381.2022.05.02.10.19.28; Mon, 02 May 2022 10:19:55 -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=@linutronix.de header.s=2020 header.b=xRWWMcx6; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384337AbiEBJob (ORCPT + 99 others); Mon, 2 May 2022 05:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384402AbiEBJn6 (ORCPT ); Mon, 2 May 2022 05:43:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A03A111D; Mon, 2 May 2022 02:40:30 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651484429; 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=jYGGwnXeFPcIOHQmhzSCBgH4HMwEO9aRAXTxvIySbxU=; b=xRWWMcx6q1hFZvKKcNEOiGEFpsCUiKlY3VDrrJdA8NHIq54CXy7UgGxYIgzdrLUKPVauf0 WSQlkGf1n6FdJbu4X74JyfeuhB9d+ZwAQNEmSxp1+MyX+kkH3q6zKnRPbOXiXjYoth8uDD sAV576M4VAGOoMYcjo1+6PVJVxCvHQQjHZRYBES853/sY3GVU3pFSbI3f72cKVIgGsmGDn mMFdpXX/e5b6df01EgTZSHHQ8LHWsWKsp2Az2u5dChqNNJqNiJQOLKM/DTSUJGZvrooQgX 9Xr8hWfvLEUOC5/+pUe9Sso7X7doWNQiKXxg4xKte2TWxeElwlW3ZCQBQout0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651484429; 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=jYGGwnXeFPcIOHQmhzSCBgH4HMwEO9aRAXTxvIySbxU=; b=dOSkoFARma2uJzbg6ynhp4U13J6hLMTQeSZWPMHb9PQQCFgpLOuL3PitpqCpKJt9Ievkw+ VKQ03GE9hEn4MmBw== To: "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, bp@alien8.de Cc: "Jason A. Donenfeld" , Arnd Bergmann , x86@kernel.org Subject: Re: [PATCH v7 13/17] x86/asm: use fallback for random_get_entropy() instead of zero In-Reply-To: <20220426083301.816458-1-Jason@zx2c4.com> References: <20220426083301.816458-1-Jason@zx2c4.com> Date: Mon, 02 May 2022 11:40:28 +0200 Message-ID: <87v8uomfw3.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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, Apr 26 2022 at 10:33, Jason A. Donenfeld wrote: Subject: x86/tsc: Use ..... This has absolutely nothing to do with ASM and the sentence after the colon starts with an uppercase letter. > In the event that random_get_entropy() can't access a cycle counter or > similar, falling back to returning 0 is suboptimal. Instead, fallback > to calling random_get_entropy_fallback(), which isn't extremely high > precision or guaranteed to be entropic, but is certainly better than > returning zero all the time. > > If CONFIG_X86_TSC=n, then it's possible for the kernel to run on systems > without RDTSC, such as 486 and certain 586, so the fallback code is only > required for that case. > > As well, fix up both the new function and the get_cycles() function from > which it was derived to use cpu_feature_enabled() rather than > boot_cpu_has(), and use !IS_ENABLED() instead of #ifndef. > > Cc: Thomas Gleixner > Cc: Arnd Bergmann > Cc: Borislav Petkov > Cc: x86@kernel.org Same comments vs. Cc's > Signed-off-by: Jason A. Donenfeld > --- > Changes v6->v7: > - Adjust commit subject and body to match tip commit style. Mostly ... :) With that fixed: Reviewed-by: Thomas Gleixner