Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp216379imn; Fri, 1 Jul 2022 13:29:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYRlbjTZGExP8xIkBXN67Civwp9oe1X9vkPrNr362GLMZ7cS9kD1/xD7P3ZalpztEOj868 X-Received: by 2002:a62:1647:0:b0:528:5e9:9d9d with SMTP id 68-20020a621647000000b0052805e99d9dmr13494524pfw.55.1656707382999; Fri, 01 Jul 2022 13:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656707382; cv=none; d=google.com; s=arc-20160816; b=owqanpB0ARKldKfs29C34+pnKJvE3D8Jnh9hydRXPTUj/Arwhfs2pqZ+zRNxq/1Vg3 /8oRwup5jR2U6/UdgjrfBFRK5vC3EZ5cjzAawheVjvOpXXIux6OJx4yIQJHixTQ1sqLd qxfR9lUrg7bcUtIHsRmCCmNKqlnUl9zhEg19/YDrhowlf36U+qklZThvXmaSjpVw4OkI maCg4u0bPm2gzvUhNLys+1UxODnavV7Mu7+qze4k/aEuTZ8kNpWg+B8wMvkpf77prZel Y8UKIpc+YrDYjs4NAqVDRZiic0qetTPtmzh7Wj6TAAtcQDhFF0XPKQK5E3N6X3zrj+e7 bj5w== 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:dkim-filter; bh=dxet9HAczfcZ9vu/1oL1hu5S6lHOaJx1MYQzpzQnE3w=; b=vM9r3dkpRuzkpHyu5ml7KRSL1T9daFDasDPQOhmu1X0eJU72Nr9vzTD6Kxl2ISSVN7 ZE0bKAW7/T3k+5JB0Y1qCEJznRiCklvn7ZGqVyc2mi8656AA10H5JPGlOPg90M6y00EB tFXhuXqrpAMek7YErAfsnTqPMIG5+PUxBYNNjjKZScUDbaAUWaKIMfYonMaQQoedxvSK 8ziZNiAgZl+vNAWKOdrf8BZMndkHzPjZye9KSsdii+adDLdeNNdUD0kJ8W2pY2Uj5HMW ya3x0/o+2c27xtxQOXIuWVNEi1xkorV4cKNqI9tL+2egv/KR4i4v932bVECt7+UJDIeB Gxjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b="c/wZEaG8"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a170902748500b0016184e70124si26076441pll.192.2022.07.01.13.29.30; Fri, 01 Jul 2022 13:29:42 -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; dkim=pass header.i=@lwn.net header.s=20201203 header.b="c/wZEaG8"; 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 S232215AbiGAUWo (ORCPT + 99 others); Fri, 1 Jul 2022 16:22:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbiGAUWl (ORCPT ); Fri, 1 Jul 2022 16:22:41 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CB84D174; Fri, 1 Jul 2022 13:22:40 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:281:8300:73::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id BDCD936D; Fri, 1 Jul 2022 20:22:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net BDCD936D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1656706959; bh=dxet9HAczfcZ9vu/1oL1hu5S6lHOaJx1MYQzpzQnE3w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=c/wZEaG8r9bEzMb/9Yed5GTIwTIqapPop1mA95KPr3rBUovZudh3MzbBq4CCf2w+N O5wA2ppfkxYCkT2qYzn/jocPg/WF6Un9rseV62tBWBuL8our/CBG1rvsHTx82AKtaK PadBeZObcRmaPrgOdyJXbkz9sR08gVwxb40AApbU05jfYCYZdziljL8MbgOsH9rdWj h8Z5rZuitWMoBgGDvgE+XvHLus3OHETunxvmSJA+s7qxDSlCCuQ0kQcBBdP75BPdWR ZYJRDJhoHU1mFDZqSclmpR1UPyNV2ue6xVZftBJdFvgLnyFLshgAKX8+i1NVJWFlCj /8mq64R3WoXEQ== From: Jonathan Corbet To: "Jason A. Donenfeld" , John Stultz Cc: Kalesh Singh , Christoph Hellwig , Greg Kroah-Hartman , Arve =?utf-8?B?SGrDuG5u?= =?utf-8?B?ZXbDpWc=?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Theodore Ts'o , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Alex Xu (Hello71)" , Paolo Abeni , Rob Herring , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan , LKML , wireguard@lists.zx2c4.com, netdev@vger.kernel.org, rcu , "open list:KERNEL SELFTEST FRAMEWORK" , sultan@kerneltoast.com, android-kernel-team , Saravana Kannan , "Rafael J. Wysocki" Subject: Re: [PATCH] remove CONFIG_ANDROID In-Reply-To: References: <20220629161527.GA24978@lst.de> <20220629163007.GA25279@lst.de> Date: Fri, 01 Jul 2022 14:22:38 -0600 Message-ID: <87a69slh0x.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 "Jason A. Donenfeld" writes: > I guess what I have in mind is the answer to these being "yes": > - "Is it very common to be asleep for only 2 seconds before being woken?" > - "Is it very common to be awake for only 2 seconds before sleeping?" > > I think it'd be easiest to have a knob somewhere (compiletime, > runtime, wherever) that describes a device that exhibits those > properties. Then wireguard and other things will make a decision on how > to handle the crypto during relevant events. So please forgive the noise from the peanut gallery, but I do find myself wondering...do you really need a knob for this? The kernel itself can observe how often (and for how long) the system is suspended, and might well be able to do the right thing without explicit input from user space. If it works it would eliminate a potential configuration problem and also perhaps respond correctly to changing workloads. For example, rather than testing a knob, avoid resetting keys on resume if the suspend time is less than (say) 30s? Educate me on what I'm missing here, please :) Thanks, jon