Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2601909imi; Mon, 25 Jul 2022 03:12:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vZKsk8oi7NbFoUMEES3eKkRYPWMAv1GYxPu8Jlc+kXuRavfy27c3ZhytUqwQGuKqGyepGw X-Received: by 2002:a17:902:b20b:b0:16c:f2f6:ef93 with SMTP id t11-20020a170902b20b00b0016cf2f6ef93mr11969841plr.44.1658743950213; Mon, 25 Jul 2022 03:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658743950; cv=none; d=google.com; s=arc-20160816; b=Hdy8FBKsAwtWDTUzEm8gM28/nrzmbMZFu7BUnf/JayMHVU/fj7gdyuRjE7+HwCrrx+ IWYofVbe96Lsoe7s3p4BqMyqzaEwUz6Bv90S/eiCG0rlWRo9EqkghKhMOLr/qQ3nohr8 Fb0Qgj7fSzGqUw4rlav9dlO9BgswoLJeG7+91DVdZUMTdgpA85vMGjX+KwuvnsYmCe4x VAQ6iN8hz+SHbcRbKKWU2Fl5oBk9qZurkwiW2S3Vf8MUQS6cfRQRbtZYxr82u/kXLMPR MP5qZDrbtpt562nCFDvZLRDfqh8jNU94JMmL2rP28IimgdY32fP9XZ2MWqiq3sLC6abf 7aXg== 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:from:dkim-signature; bh=zOdNDi4us/f1Sas6UpqCTnnTTYxPBuf2sETCHij1Xqg=; b=Uxe4vtqx/JUh4l25lJsnSTCMlw6x6dI3qR5ar/E90y9CbmAFJ411l6vV0EZai3LgVV Qi5eB1Jp9dfvGJ5kzUwRgWmEMrGdskZlCyGFCrK0jBqCi5RutP2lQn4vZICk40VeIf43 U3TzwDK+jrn9Jz7zAzX7QbxflXt2u+OLMBFAS20spi5aqgJe1DvIn+9lJ2Rlll01wglY W1s0ctcjfBzOb7SGGiHg7GV9ThBBnSA37TE6FPhbu4kN7JA36xj5lsxo34vvI7Iq6u7p JcczqaqUeTCFi5dfxwivFzw2Lc6ZOxhS9EbbEO/1xvVPUPTYfm8DY97rQt7H1qDIfR7L fsXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZAiB7YnX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f30-20020a63381e000000b00419ca871309si13746818pga.359.2022.07.25.03.12.18; Mon, 25 Jul 2022 03:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@redhat.com header.s=mimecast20190719 header.b=ZAiB7YnX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232177AbiGYKJI (ORCPT + 65 others); Mon, 25 Jul 2022 06:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234553AbiGYKJF (ORCPT ); Mon, 25 Jul 2022 06:09:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79A8917AA0 for ; Mon, 25 Jul 2022 03:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658743743; 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=zOdNDi4us/f1Sas6UpqCTnnTTYxPBuf2sETCHij1Xqg=; b=ZAiB7YnXDuRUvcuJJ5tuzkF31udAlE8ezUUEoP6sh6Vq7OQBaOWBrtne5vz3pHguzlWiyt piweYTg1qTeEGYf4yHhXHfPnanIQgrVLtLnIRN3ch2B3ETEjudNaelElL3UbcrBY3RZUWu jmqSt1qt9O/BpiLUKRmWUcF5oqPzYIk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-Q7GyD3Z9MnC-xzUwGGzHJw-1; Mon, 25 Jul 2022 06:09:02 -0400 X-MC-Unique: Q7GyD3Z9MnC-xzUwGGzHJw-1 Received: by mail-wm1-f71.google.com with SMTP id 189-20020a1c02c6000000b003a2d01897e4so5947094wmc.9 for ; Mon, 25 Jul 2022 03:09:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=zOdNDi4us/f1Sas6UpqCTnnTTYxPBuf2sETCHij1Xqg=; b=JekLIaEK4fTUqUwabkw82wHzXvqnP9TlWugR7uxStD2Z7TGTuBoDd9vUgqcjJFsOVh GgWTuzYd+6nv5RQmn9llMPfLbX6XxfCrp9kYugl7j1Z3uzUfHjYCd+726zkakYi+P4Ry NkERfKeQdHq1/VBfSqBxedRW2HSnT8lEQryMWxMtmXhF8h26iTBAZHNbOzqno1k8f+3b Qe3B7xYcWLButT+hBAUWHj49F2NTYoyArkCR1hxLucB0DKPuruIe1L3fJ+7yE69qYRWS doKVgj5BvbW+9rAGw/9eofHsS4LfLQunnMXh2NAlPLZQkqnaWautgsehNvvA8T/cETpv hPvQ== X-Gm-Message-State: AJIora82qKLYyez1zEpDdSQ8miqxDKTbv0ho8TnQUbdXrdvoLIR0PjKz Lji3NHUh+0mMpVbkp03CwapyqwI/scQe24jdCaNOuKrLPJnqxnLjUSR6w5JrF9fHcnlgMMQJ9UV xqnXSCoK6lgmsktaczAPm2bkzgvM= X-Received: by 2002:adf:ec02:0:b0:21e:8e67:d0f9 with SMTP id x2-20020adfec02000000b0021e8e67d0f9mr1668586wrn.114.1658743741218; Mon, 25 Jul 2022 03:09:01 -0700 (PDT) X-Received: by 2002:adf:ec02:0:b0:21e:8e67:d0f9 with SMTP id x2-20020adfec02000000b0021e8e67d0f9mr1668572wrn.114.1658743740926; Mon, 25 Jul 2022 03:09:00 -0700 (PDT) Received: from vschneid.remote.csb ([185.11.37.247]) by smtp.gmail.com with ESMTPSA id l3-20020a1c7903000000b003a320e6f011sm14764718wme.1.2022.07.25.03.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 03:09:00 -0700 (PDT) From: Valentin Schneider To: "Jason A. Donenfeld" Cc: linux-wireless , Kalle Valo , Rui Salvaterra , "Eric W . Biederman" , stable , Gregory Erwin , Toke =?utf-8?Q?H=C3=B8iland-J?= =?utf-8?Q?=C3=B8rgensen?= , Herbert Xu Subject: Re: [PATCH v10] ath9k: let sleep be interrupted when unregistering hwrng In-Reply-To: References: <20220719201108.264322-1-Jason@zx2c4.com> Date: Mon, 25 Jul 2022 11:08:58 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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-wireless@vger.kernel.org Hi Jason, On 22/07/22 22:13, Jason A. Donenfeld wrote: > Hi Valentin, > > On Fri, Jul 22, 2022 at 10:09 PM Valentin Schneider wrote: >> I had initially convinced myself this would be somewhat involved, but >> writing the above I thought maybe not... The below is applied on top of >> your v10, would you be able to test whether it actually works? >> It does however mean patching up any sleeping hwrng (a quick search tells >> me there are more, e.g. npcm-rng does readb_poll_timeout()) > > I'm not able to test this easily, no (I don't own any hardware), and > I'm not going to put in the effort to rewrite/audit every sleeping > hwrng. That's not a good use of time, given the numerous other > problems the framework has (briefly discussed with Eric). Instead, > maybe at some point I'll look into overhauling all of this so that > none of this will be required anyway. So I think v10 is my final > submission on this. > I think that's fair, I hope I didn't discourage you too much from contributing in that area. > But if you'd like to attempt more comprehensive changes throughout the > tree on all the drivers and do something large, I guess you can do > that independently (since you mentioned your thing works on top of > v10). And this way v10 still exists to fix the actual bug that's > currently reeking havoc. On the other hand, maybe don't bother, and we > can look into fixing the whole rats nest properly in some months when > I'm more motivated to jump into hwrng. > Just to make sure I'm on the same page as you - is your patch solely for ath9k, or is it supposed to fix other drivers? AFAICT your changes to hw_random/core.c work with any hwnrg driver that does a variant of schedule_timeout() during rng_get_data(), whereas what I suggested only works for "opted-in" drivers (just ath9k ATM), but it doesn't break the other drivers in any way. So if ath9k is widely used / a problem for lots of folks, we could just fix that one and leave the others TBD. What do you think?