Message ID | 20230616085813.1323082-1-martin@kaiser.cx |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1195727vqr; Fri, 16 Jun 2023 02:26:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lbFUKYXQNxDPc0GPh8pauA6JcplxmrdiLTLQ+1WG8HiV6eLS9hPv2X3c1HjmbyCL/dorG X-Received: by 2002:a05:6808:f12:b0:399:169:75d4 with SMTP id m18-20020a0568080f1200b00399016975d4mr1824521oiw.36.1686907603720; Fri, 16 Jun 2023 02:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686907603; cv=none; d=google.com; s=arc-20160816; b=kMhhLHCGSCtHKBoWhK5xFEhQZqCGx4YFXVjtLY2QAraCuRJNd7JtAMBPNZtjBLgqIU 4CmuXb2pq5WR7MHz33nGSiThRMV1rfRTt1ZSmP1B/I0g74O9I/YFkKT6LUg+YyXtiXoY oP1zRrhfZIejkig5CAQmSPplDkWF8RS+fPR9Bau9kJcyMO+XIt4kcri+HiOCTvKz8YXl JFhpei2SR94CpeS8dtinygOaB8pyMTRVUsZR/MIUCw0jC9/i3p8gmOhci1Bcab3BJS97 Ie6W+Xlhj5S3bsT+sPuLFWmJ5cDpxmn5vF8WDZlzMAQA9EDNXcEscoz7r46hKvK/Rrl1 ChVA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hsYhuu7+ihD5s85ZMVpqhkOYdz6Yz4TjyDSyuBrfLRk=; b=LwZ7wLJU18wdLFVzLjOJxRUAhuEEOX3rzA9HaYN7fWybjBh5leUrJUpfe867UWIG8y 3GKtx2VRTjnqZ4xm98LdRp4zPL+UiF0rEWPCrTAgES+aDKf5K7LuncqMjB9zhHHr0fGk skG5M+1G4woSRdUjvvlWoXAKKtg5eUy45JQvXfoZs5On0nq2JGGMDUwZ2nAAf+kzgb6R QS9SvHs9T92zy0d4iuolSur9OIDMArhuTXsT8r45bOR7SE5h1Od+cK8JgNDT8Y802GA2 aMWC44ThRu0Ul3dITvnWRQr/VDn2VuCOKvHgLP4TcpQDvCZsTZSkeNjtVmcjW8NNBzCs qZwg== 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 q9-20020a17090ad38900b0025998ebdc4csi1211082pju.60.2023.06.16.02.26.17; Fri, 16 Jun 2023 02:26:43 -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 S1343929AbjFPJAo (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 16 Jun 2023 05:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343643AbjFPI7i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 16 Jun 2023 04:59:38 -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 465D626A2; Fri, 16 Jun 2023 01:59: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 <martin@kaiser.cx>) id 1qA5It-0000d1-NO; Fri, 16 Jun 2023 10:59:35 +0200 From: Martin Kaiser <martin@kaiser.cx> To: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx> Subject: [PATCH v2 0/2] hwrng: st - fix potential race condition Date: Fri, 16 Jun 2023 09:58:11 +0100 Message-Id: <20230616085813.1323082-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230616083618.1320824-1-martin@kaiser.cx> References: <20230616083618.1320824-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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?1768850827577759366?= |
Series |
hwrng: st - fix potential race condition
|
|
Message
Martin Kaiser
June 16, 2023, 8:58 a.m. UTC
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. v2: Remove some more obsolete code and rephrase the explanation. The point is that devres does now disable the clock. 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 | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-)
Comments
On Fri, Jun 16, 2023 at 09:58:11AM +0100, Martin Kaiser wrote: > 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. > > v2: Remove some more obsolete code and rephrase the explanation. The point is > that devres does now disable the clock. > > 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 | 21 +-------------------- > 2 files changed, 2 insertions(+), 21 deletions(-) > > -- > 2.30.2 All applied. Thanks.