Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3829823pxb; Tue, 19 Apr 2022 10:35:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFKtQW56GaliRcLDGkmz0apmZEnlh6zLjAcNEwcWHBrUIZKMhXDhZBnBBFvlrrOTuZe0PV X-Received: by 2002:a65:418b:0:b0:382:250b:4dda with SMTP id a11-20020a65418b000000b00382250b4ddamr16062815pgq.428.1650389744512; Tue, 19 Apr 2022 10:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650389744; cv=none; d=google.com; s=arc-20160816; b=zuwHNGtYLSu9NSJbLQKKA5v6w5V4je21Y2p6bsXsijxqNQMjZ5vzej68H4uATHcjx5 JT3qQ8+RW6MqHAGmy+6AYyaEBsRm7EzPr9E/sQ/ka/0xdGGF3rtdtqINOWQj6YBNqSIk d6bS6pCIX5rA5CRggg0Tq7ZnfFImKVbeTlsfmHJ5HXK5Bkh9Bci0MwoSJh8Ep6f52yTq Vo6z7daTkWHIBQvpMd9Lz0yNoZiYlkRAvxi4wBrNcMVTCsYsRTGaMyqp8prnECnvpNLQ dLPoyzZ0OhKm2BvHCuio+g3pZ+LHwzR9FZVrN91q7GgFoUvtlBimzUKitq7p027pMbGu 65AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V3ODNWfMW+rRhSokZu86v1GXhJjBricpy30YxedvS1g=; b=SJhcDixC48YQXGPqTUvUQ3eczBGiI9beLc884JT44uZfEI53jHRnX+FIFlgeoEaE+h 4L1kL0/3hbfGMyW6p4Ye9v4qXtPzMbpZZmOL0yv+4LDxmHId4YKTI02w8qoMU0nnjH5f LUTE2ZvljodItFfzir8UPTHxGLhWnf2PNP1u8f/piUrhtTWrPha1N8Frukp3lOHrq/55 SSJdMLge5d4VhYQ3myT/MKIey53d53HCl0Dr0VnOAjkOU1JzIy0aXKfaDg1zHwNTiuqz 0KfW8g20r/fWCaFu5huTWTyvnDcUdWF9M+wG4N+xAOtiSk9iA+SeX2kJ3GEwDpK91pEx jwVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GGC/aKc6"; 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; 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 q124-20020a632a82000000b003816043efe7si12254165pgq.476.2022.04.19.10.35.27; Tue, 19 Apr 2022 10:35:44 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GGC/aKc6"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355390AbiDSQtj (ORCPT + 99 others); Tue, 19 Apr 2022 12:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344637AbiDSQp5 (ORCPT ); Tue, 19 Apr 2022 12:45:57 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D0273A5D5 for ; Tue, 19 Apr 2022 09:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650386592; 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=V3ODNWfMW+rRhSokZu86v1GXhJjBricpy30YxedvS1g=; b=GGC/aKc6epjyb8qz33WDzkz7vdHatLFmsDOSeJq77hCEJ6oyzCiZ0EFdOm52+mMK1ay6Ju xXNCJDNzjRJ4OimnpdrBcIX9/M6OpCf18OiLh84LH/skKgzZQbYlJ55COX7O6F6g12hcBD T3Tpah57XcNPKzT6ZXuaTyaIiH1NCsQ= 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-138-ecP0Usk1Pdyo8nwaOb2QmA-1; Tue, 19 Apr 2022 12:43:10 -0400 X-MC-Unique: ecP0Usk1Pdyo8nwaOb2QmA-1 Received: by mail-wm1-f71.google.com with SMTP id v191-20020a1cacc8000000b0038ce818d2efso9549269wme.1 for ; Tue, 19 Apr 2022 09:43:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=V3ODNWfMW+rRhSokZu86v1GXhJjBricpy30YxedvS1g=; b=oTka21F0QltTnzC6subCJ0GKluUEQSzteMFYt/fonXV2Jv0ukwpVQpXH2X0dBYMcZi ASCdGtmQwi0NXdHPY/VEG+oEQGiJZCkONe54lMonPCXcaxapv5SReheyF4XHH/Z2GN3u bLMS0HBGEsC9DKfCInQzeUs+7q4b1MghHTJCxuo31dql0WMzRSBNnkQygahtiO26SnLD d4mf73YLr47hy6XIJ3sfeZ7fgH5ZfAQ4X5d9Pm3PuQhoH4vpJsrRcwpowTN3Q9k8B+cH e5wV6nxclNLDsXDaPtdviIwlXFJUwHJGXAz2x5FcZvkSUYTKbgtHW+iplBL7hCXgqXe/ l5Jg== X-Gm-Message-State: AOAM531hu4oafI96s9J0+xr5KHRMwJM7ZtXAKmCZsd/NQPRhTK8UCBoR mvQAWGw5t8S0G1cyQeU15lcjB932Lpf43YDp7+dD+anewZPagKNWFDrYD5MM/I6+4CWPGK9WkbT +XlxizZ2N3KvRcT27KrJv0KyL X-Received: by 2002:adf:f981:0:b0:205:c3e1:9eba with SMTP id f1-20020adff981000000b00205c3e19ebamr12387499wrr.244.1650386589519; Tue, 19 Apr 2022 09:43:09 -0700 (PDT) X-Received: by 2002:adf:f981:0:b0:205:c3e1:9eba with SMTP id f1-20020adff981000000b00205c3e19ebamr12387485wrr.244.1650386589266; Tue, 19 Apr 2022 09:43:09 -0700 (PDT) Received: from redhat.com ([2.53.17.80]) by smtp.gmail.com with ESMTPSA id v14-20020a7bcb4e000000b0034492fa24c6sm16631515wmj.34.2022.04.19.09.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 09:43:07 -0700 (PDT) Date: Tue, 19 Apr 2022 12:43:03 -0400 From: "Michael S. Tsirkin" To: "Jason A. Donenfeld" Cc: Alexander Graf , LKML , KVM list , QEMU Developers , linux-hyperv@vger.kernel.org, Linux Crypto Mailing List , "Michael Kelley (LINUX)" , Greg Kroah-Hartman , adrian@parity.io, Laszlo Ersek , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Dominik Brodowski , Jann Horn , "Rafael J. Wysocki" , "Brown, Len" , Pavel Machek , Linux PM , Colm MacCarthaigh , Theodore Ts'o , Arnd Bergmann Subject: Re: propagating vmgenid outward and upward Message-ID: <20220419124245-mutt-send-email-mst@kernel.org> References: <47137806-9162-0f60-e830-1a3731595c8c@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Tue, Apr 19, 2022 at 05:12:36PM +0200, Jason A. Donenfeld wrote: > Hey Alex, > > On Thu, Mar 10, 2022 at 12:18 PM Alexander Graf wrote: > > I agree on the slightly racy compromise and that it's a step into the > > right direction. Doing this is a no brainer IMHO and I like the proc > > based poll approach. > > Alright. I'm going to email a more serious patch for that in the next > few hours and you can have a look. Let's do that for 5.19. > > > I have an additional problem you might have an idea for with the poll > > based path. In addition to the clone notification, I'd need to know at > > which point everyone who was listening to a clone notification is > > finished acting up it. If I spawn a tiny VM to do "work", I want to know > > when it's safe to hand requests into it. How do I find out when that > > point in time is? > > Seems tricky to solve. Even a count of current waiters and a > generation number won't be sufficient, since it wouldn't take into > account users who haven't _yet_ gotten to waiting. But maybe it's not > the right problem to solve? Or somehow not necessary? For example, if > the problem is a bit more constrained a solution becomes easier: you > have a fixed/known set of readers that you know about, and you > guarantee that they're all waiting before the fork. Then after the > fork, they all do something to alert you in their poll()er, and you > count up how many alerts you get until it matches the number of > expected waiters. Would that work? It seems like anything more general > than that is just butting heads with the racy compromise we're already > making. > > Jason I have some ideas here ... but can you explain the use-case a bit more? -- MST