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: 13282212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0595EB64D7 for ; Fri, 16 Jun 2023 08:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245565AbjFPIhk (ORCPT ); Fri, 16 Jun 2023 04:37:40 -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 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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(-)