Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2307378rwd; Fri, 16 Jun 2023 02:04:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4GZGgE6NJnHxe7vgC79qukg/g9ImLblx51gRLCw/TbqYGX0DYP9dYghIyiCaC2MX+X/uG/ X-Received: by 2002:a05:6a21:999d:b0:117:51fe:9b3a with SMTP id ve29-20020a056a21999d00b0011751fe9b3amr2228260pzb.3.1686906243183; Fri, 16 Jun 2023 02:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686906243; cv=none; d=google.com; s=arc-20160816; b=XpW+h6Iovp94bVKEBn6sW34cTXggV71N5R2KM9xi0R0a3XH+ptOBuXOOs4ub8d8N5v IEYrukUvBiv52agFgCOfpXkObRXB/N7l9aD9r912UtkPxvbhjbhgLgp/eeVUNS4vbKdn ERxxpHXnxuTRAvYZPt34uEsJ2z47KbFtr6/ZbqK3plFi2RHg/BzP1rKruN/mx21/7B1i NnS1GYVTDYcAOOD5083/XoViMFQ9mrUi5Fks9ZXUFec2AkOscAOgYZa0WiwDis+hPrRr n0YN/Czrir9ZTC0mj6wj0hfZfMCei7AHYZKngt2dw+02Wq2MJ5CL1TISQSK3351F5sgE i/EQ== 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=UDXDR3cnYDZX4x2W/xCKUEY3THTnaN1kJ6P5fMFLYJC7jCLIgXt/kWfSzNm3eiL2uW RNbmJgH5iCzTVGNQ3dBDUughpSfQkQzZy4NmNNdfjdV3zecNt5BPNMVDN8B/1l+TnXbw MmUHLTZoLKuvU2z1DNI2YLyQEGIZqcdWR0dS2/7i2sb3ss+rVcMEueT4OS485AYpZ+Ym 6DYuqi55T+YzMQ5ATTyn4J59Xf4Q1NdNFkA9eRSO9wEWbXckjxHZ6piHEMrdC/nY8QV9 aSs0iHjtRbDu50z+qv+jcz8UiP1lgRkkTSVrapFTBG25mgT5jtgEzI+K0dhCvvZ5AW+c 3ifg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170902ea0400b001b3bbac961bsi11130007plg.38.2023.06.16.02.03.37; Fri, 16 Jun 2023 02:04:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233557AbjFPJAi (ORCPT + 99 others); Fri, 16 Jun 2023 05:00:38 -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 ); 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 ) id 1qA5It-0000d1-NO; Fri, 16 Jun 2023 10:59:35 +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 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: 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. 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