From patchwork Fri Jun 16 08:36:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 10877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1180892vqr; Fri, 16 Jun 2023 01:52:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7OuYXWp4c+3dTdk8pZ8NnSb+x1/IjbQ0jyF5Rx7DElEGiNUBeL2krlva2cX6jmPzJXxWyB X-Received: by 2002:a17:902:e541:b0:1b0:46af:7f15 with SMTP id n1-20020a170902e54100b001b046af7f15mr1101736plf.64.1686905565922; Fri, 16 Jun 2023 01:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686905565; cv=none; d=google.com; s=arc-20160816; b=n2RveDZfSR3XYLffCPQXi5YtQGgKbkPfnx1aQZMwmkcTx9cIn8AHGsMZuLtKhRgwd3 /HyUP8FEfUxZMApbJQRJRxFkttB5PiZBqBJSUK7K8NAwiKclT5/BYlT/J0mUoy17Tl36 c8e6ZcMx6MLij3+tdg3Cqzu4t3jKPnTqaFQFTXK5Z1apGVyRM9fqiNrChgR9vhkkumLu +Ea5g4G2poY4hFIX30O1f5qE45Q8YpQieSb0DHIyJRggvLUGHELd1rFt9jxcg8QdBRdT krvzfBUoEqpEE7pKXh7CAkFDikIaerC1qQBzBTZTDEAbI+8VPO5Gr8s/fJC1dzj9pBfq jhCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Bdsi7GFOH/UvLxSVMksKEO0ecjMzwDFwbSnDgZiBt3s=; b=EBp+iWKTiMXUkHugjutcOB3u7aYulRXhaUdX+kR9r4BsF3qG95cS6XIcs8S5bi0Rw2 uYNpvQWpGOib5TB1ljmVxKds/zOEHFt2AMJw4tAE41pTzXATLdbRQVO4lrsYkXDJbtcy Tk0Y02BRAqwd+XB7dCjSBQeeyvkV1pnB9zz8eKbtrmiSbDppbhjrnntTjGVZKxUI1iE+ 4c6YifYcFLx1q+3vhR/D9vZLixvEwC8ymthR7usmb4HKfprWcRNnk1YqlE2tx5XjibcU rCcH44Gs7J2kKVq9DvEomELKwjWI9OnSpAGOaWaLJ6HzhrMkXU/t3GYdxE1UpIII8/z7 oSjA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a170902cec500b001b205a140fasi12209792plg.387.2023.06.16.01.52.30; Fri, 16 Jun 2023 01:52:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245597AbjFPIhn (ORCPT + 99 others); Fri, 16 Jun 2023 04:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242697AbjFPIhj (ORCPT ); Fri, 16 Jun 2023 04:37:39 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CF51196; Fri, 16 Jun 2023 01:37:37 -0700 (PDT) Received: from [167.98.155.120] (helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1qA4xa-0000Wd-9R; Fri, 16 Jun 2023 10:37:34 +0200 From: Martin Kaiser To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 0/2] hwrng: st - fix potential race condition Date: Fri, 16 Jun 2023 09:36:16 +0100 Message-Id: <20230616083618.1320824-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768848690980138715?= X-GMAIL-MSGID: =?utf-8?q?1768848690980138715?= Fix a potential race condition in the st-rng driver. There's a short timeframe where the driver is still registered but its peripheral clock is disabled. Add support for compile-testing the driver. I do not have any hardware that supports st-rng. Martin Kaiser (2): hwrng: st - support compile-testing hwrng: st - keep clock enabled while hwrng is registered drivers/char/hw_random/Kconfig | 2 +- drivers/char/hw_random/st-rng.c | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-)