Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1623828pxb; Fri, 20 Nov 2020 14:34:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxv2k1yx2+PD6kh7zxdznOij8yfqm06cH/khBrbxGhHUqwTCbzfH6Ojy08tE88kOxVX93M+ X-Received: by 2002:a50:e443:: with SMTP id e3mr38713886edm.160.1605911661218; Fri, 20 Nov 2020 14:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605911661; cv=none; d=google.com; s=arc-20160816; b=uvsFPlEJtIksRjPyi3lvYskbMjtjrpF04GqiqXBemEgpNB5IXGureArmNEc1L6aMbI 06T6X2rz6skcpyuG/10fv18Fetab+4jP2G2JqeW2Kf6herQ2V7clA28UFuDsFfbnI1JP nsLUwXfBhwxILHWD8CX3TOEPMkXK7jexkk9yf/T60qKltL5ZQsvhhedaP5QHauFckEX/ qBgvS3gQWZocud26Zua6UxK93GXRfz+8KMeneqktm1GUpZxd5Ibkqn1YFgVaAFw8rSM6 qRZcyLyCSXi8caEiZdwQ1HdlEUAUoEEKo2Qb+WDHXvN1K+k4R+E1WBrlcR2hsakNQike mGqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rN2oDMLkDXvF2d0qSHyE1KGJoI0coYurxX8BvFhI+bY=; b=Eh4UBNUNLPE9HzIWPdtWAwYOLBqbYtsL/EbdaZM/Nt2QpmqJ0ntKvDuFdIn8Sl3jSO 1OdUGnlTJBIxJg4X1fElVPQVV83N2odlkNs1b8w+tFDinei0b2kak3LuOlJPiB0WjLMa k2dhKP0m4ZCKayWTNqj+5WlvyRlqVBL9He3k46AWNP/kZD+lmJu06xPWX7iBumhVfsBf EV4p9WKkBkEzXHIGVlXLjNE2k5aKKAYA4J+gYszexk9R5Plnac9zg7LpZyJRoCB9ZC0E s5H1sn3Ro8lXzTd566qp+RTNnzL4Wi+b8LEzVzmtYDZcwJGeh26ynUZ51/w3tFX9kn9H VaNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=G5VJUQua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si2665053edb.36.2020.11.20.14.33.58; Fri, 20 Nov 2020 14:34:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=G5VJUQua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbgKTW3z (ORCPT + 99 others); Fri, 20 Nov 2020 17:29:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728348AbgKTW3y (ORCPT ); Fri, 20 Nov 2020 17:29:54 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E4B5C061A47 for ; Fri, 20 Nov 2020 14:29:54 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id l11so15703754lfg.0 for ; Fri, 20 Nov 2020 14:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rN2oDMLkDXvF2d0qSHyE1KGJoI0coYurxX8BvFhI+bY=; b=G5VJUQuazvZ46rb86s40Pn6WkJ8vF48RjwI203WsXZ9Dd/97U9zAuv02njfWIOciBV QuSh0dRcRHb6kNB5R91cqfNYC3Nx6BskGC8Id4k04GJmqF+iTSL0z/vx19itSZMS+dny GX6UFvM4nLEOfv88ofsMR/2MQJp/CTfeCiBq4RMzNChRcKghzB+b2vhazIrHXFWol38n pfrMAxiWdO7fXF7LhFiySxUhhlwuVHmMt2IU2HAhlY57qt8oywDFoatbjiKMM0J1tI0a F2+QJ/feDTYc37U0EswhVkKC6ECmTYbgvZ1lbayAJ7xC0KxdUPr0mf9Jsvw5GLqRUrhv ttbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rN2oDMLkDXvF2d0qSHyE1KGJoI0coYurxX8BvFhI+bY=; b=ki1ginUSbqJxrVrwfeJaIwCzYcuzn1tWYwb002LLMndAV5tilbLr9krkPVKRtTb8mn DlbcKzFKdsr2TQilgwVEseMT+GFfHpaJkIMPT2G//hxo43ja7LWs9JN/p6g3C+O4X23d kdGcCdq0s+xG3+FOFtwL88oZ1Fc42ODIhdZVY8RlRvNqD10BEX9sQo4h9yDj7vZTDLct 1+DuXj1TS04mqKlzleFOGNaf47EjQ/jp9PIOFNbPzAWE8xvL0Qw6LNZ8fwjKrzory5Ui tV4YI2VwdQobHg4SFS2t7QMFR/6kYGvTQxKZX+9Dpk40nCo5NIPfpvS7PaM5hxi+mGGr KWew== X-Gm-Message-State: AOAM5307ZntU5KRbTKLE4fdRPHzbog3avtWn2cIgrLaTiVqQtxZNr9qX dwuXWF2x8Kdc1mPU67F4hQe+EhBhJ4pnbyr+w0Tv8A== X-Received: by 2002:a19:686:: with SMTP id 128mr8504175lfg.198.1605911392397; Fri, 20 Nov 2020 14:29:52 -0800 (PST) MIME-Version: 1.0 References: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> In-Reply-To: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> From: Jann Horn Date: Fri, 20 Nov 2020 23:29:25 +0100 Message-ID: Subject: Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver To: "Catangiu, Adrian Costin" Cc: "Graf (AWS), Alexander" , Christian Borntraeger , "Jason A. Donenfeld" , Willy Tarreau , "MacCarthaigh, Colm" , Andy Lutomirski , "Theodore Y. Ts'o" , Eric Biggers , "open list:DOCUMENTATION" , kernel list , "Woodhouse, David" , "bonzini@gnu.org" , "Singh, Balbir" , "Weiss, Radu" , "oridgar@gmail.com" , "ghammer@redhat.com" , Jonathan Corbet , Greg Kroah-Hartman , "Michael S. Tsirkin" , Qemu Developers , KVM list , Michal Hocko , "Rafael J. Wysocki" , Pavel Machek , Linux API , "mpe@ellerman.id.au" , linux-s390 , "areber@redhat.com" , Pavel Emelyanov , Andrey Vagin , Mike Rapoport , Dmitry Safonov <0x7f454c46@gmail.com>, Pavel Tikhomirov , "gil@azul.com" , "asmehra@redhat.com" , "dgunigun@redhat.com" , "vijaysun@ca.ibm.com" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 4:35 PM Catangiu, Adrian Costin wrote: > This patch is a driver that exposes a monotonic incremental Virtual > Machine Generation u32 counter via a char-dev FS interface that > provides sync and async VmGen counter updates notifications. It also > provides VmGen counter retrieval and confirmation mechanisms. > > The hw provided UUID is not exposed to userspace, it is internally > used by the driver to keep accounting for the exposed VmGen counter. > The counter starts from zero when the driver is initialized and > monotonically increments every time the hw UUID changes (the VM > generation changes). > > On each hw UUID change, the new hypervisor-provided UUID is also fed > to the kernel RNG. As for v1: Is there a reasonable usecase for the "confirmation" mechanism? It doesn't seem very useful to me. How do you envision integrating this with libraries that have to work in restrictive seccomp sandboxes? If this was in the vDSO, that would be much easier.