Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1295877lqj; Mon, 3 Jun 2024 17:30:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU14zXGN45U55mrAYXgwNqL1k8vcUpjV0ZxbfEuXWNucH2ZjfKBh32VTDSer9XrFS20C7SWWR5IHzugsCjsTAG/unuAUBPM/FQF2tamUw== X-Google-Smtp-Source: AGHT+IEpeunSd2ZVKEBbkbkPLpwjUDSCLX9b9UhCyJBub2jjvVoZFphiFAqFcSE6p8XWFxIM9LTB X-Received: by 2002:ac2:4e91:0:b0:522:2ada:c02e with SMTP id 2adb3069b0e04-52b896aeb75mr8281593e87.53.1717461006757; Mon, 03 Jun 2024 17:30:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717461006; cv=pass; d=google.com; s=arc-20160816; b=1LOXf5rPGRe/fExm8akw7vUHcxAY2Y4XL9sjX4bvmX52pRXp3SE26eRfX/4ys5jcj6 K8S923pUo10kipW4h2wk6fZSceJFIJdcM3v+REZ0/49mGDCOYZbB5WSjahz5phI9jKZE iRf0G6/4WZWZk0GnX3pfn8tzaZ4WsbS4c9amnDBhFgV8JKoH7owWoKnze/OaKpVFn9eW X79Hq+IQjLYknjehRvt+DhsA5UJxwmO/HJgtJRTGVB+hE34+RjbVAQ/Hk0QhHAQLY5SS FPVTbXorBfTmroxeTJxBbPZCKoXc9AK78r3guHbADtrfxWJ+2EjGv/o8sns91Q7kPvuh a/Qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:date:dkim-signature; bh=QxIMQXFvRFWSOBKMLO/Pb11VLx9FgWxOAKpcjqg1q6M=; fh=jxluMRY29oVidx7k1qsp1gVg3muHLHfFbfB8ToPw2vk=; b=ptLJfR7LsROTLflSqeA273/CB+8aUk21fVAFBmMdL7qyh4b/FGeyguRVStUqCfURIt +mh6YS+2YM8+IHeNG8zwwxXGApcuoD8ymhwBGXiBPkCjBxNtIXdJfTBLEEz7pW7wseo/ GaQQgIF50Mi/P8+lRGbyDzgzwC5R+cPh7gjtGcnhfSO4KEp7mI/JfFx127N7hKl5KdDN yZeefSBMx/210jPoRxuEtLEMQj1jMwQw2xge0ulTv6fEV+Jop8x/yOIe+sHDJW4RPS6O EKdEqIBU8JgHzaZxmNPlB3HBZVSW2al1hFjB//U8oNiRqSGTjC3vGLFfYgUjibVynVjB MzVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=puxjbxBT; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-199870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67ea886a21si449583066b.635.2024.06.03.17.30.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 17:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=puxjbxBT; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-199870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 745DB1F24040 for ; Tue, 4 Jun 2024 00:30:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5E226FD5; Tue, 4 Jun 2024 00:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="puxjbxBT" Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA9AE4A0F for ; Tue, 4 Jun 2024 00:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717460993; cv=none; b=PRcFkLHCW7Z1ayR5OYI3KG/JDFLiNNgBDE7qVZ5mOrrbPCZ3F1oc3VIpCRiKxejph9mMn/z79RvzQcJCd3esIJLmCuZTUgrWkLk031RUnr4T8s0jxJyfKhNee93dVWzvWOGvFa/+0gv7G/qJhFUHEHxKt63ihxD43hHHWLDUfCQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717460993; c=relaxed/simple; bh=tHNlljHyl4OWf1KxKCEPYA1CiqsKpPT13VLxPLbrxl8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=OPlIVQQGvQremj2LMWuRBAuFLJF+QD5wW2wJVKArBradZltz6j2xqyJpySZycxlD6gKRxPhNyM7efpaTHcrS9/fzeH9A0kRvz6HRytzAprcqcuVaihfYWRecdlwwclD9aDJSdRUgaibcFRs/N2WbywvR3k4dIV4Sgl0mG+YncBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=puxjbxBT; arc=none smtp.client-ip=209.85.215.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-6658818ad5eso3699535a12.0 for ; Mon, 03 Jun 2024 17:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717460991; x=1718065791; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=QxIMQXFvRFWSOBKMLO/Pb11VLx9FgWxOAKpcjqg1q6M=; b=puxjbxBTG5z3Upww4V6uBpPm3gT6S16Fh/4hFzQnft+qQUhCffRGP8yUD+0M/Y0BTF t80sR1UETBui4VWEC5izZ6Y8k0lq81iM2k9DX2auu95AjbleBwkIMJ1kYn+iRVKjqtOJ TNN4BZQoewG55+6C5TOEBRUiCr5SyTNx7tpVYnQ/FTN5Bp6SapIJT+tu3hdu+PStimkS 0RfRGfAImQnfZdDfSfHvC814+/YkuIhFCJBEShpWm3nJuvoosaIf+iNyskVf1kJiix9d BYFr2cgkFmIrb0Jmd88+P9eQ4EGysGGVrXi//MiWRpYOTrPBDwTLwfQQznIk+5cZfCKl coeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717460991; x=1718065791; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=QxIMQXFvRFWSOBKMLO/Pb11VLx9FgWxOAKpcjqg1q6M=; b=NEEK+s+hIKTdcbF+Ln8e+p3kOCH+0dyCqcMvi7rAV/QbVvqUtfggFiabZCvpMbu1Mg zc0K3nvR43FnCzYbaHj3Z2mfbG/ocp1uIW5RYG67f0dz7lxVJtsLwKtVLuC2wS1HDsLI OfqGsYqtdWOujWG8LESIXbFKijawR2V1C/ZuBH0BoYISllBoEqLa/opg0nt8w2RX9pqx G1FT1/WZUwiypqhy8oWr+eZeG+qwz1zywKlzHckLWqLeK5FyrheGVYoBuE2fT2YpQYf+ eYSpawZNE2VxQO9pp+V53EUD/gG5Gkz8tn6RNqxmcwvWRGS0cDhG8K+I8HE3RoosK+9I C/gQ== X-Forwarded-Encrypted: i=1; AJvYcCWZ/QGya/VcKR6/x+2VhJI7BsPN3Fvhp1GUcyI6GUWHBLgDTTrUkxVv19MrV+nPwNNFYxn27ZZ/xtyUJ6IW1xlx9aWPp9u0yTCmVVIG X-Gm-Message-State: AOJu0YwgK+1VL42LJ2qIIvQph0M++DiRcDrBfdkwCIZUeHKOo01M6g5S 6fXVcLrdpkBmuPfqR1WlIiVTI1gV+YzhZmOQllU0smTBBA6UnrOcg1nwWSAfHTEvOnvZThDK3mi 0QQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:f7c1:b0:1f4:620b:6a47 with SMTP id d9443c01a7336-1f6370524bemr2945395ad.4.1717460990723; Mon, 03 Jun 2024 17:29:50 -0700 (PDT) Date: Mon, 3 Jun 2024 17:29:49 -0700 In-Reply-To: <20240514.OoPohLaejai6@digikod.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240503131910.307630-1-mic@digikod.net> <20240503131910.307630-4-mic@digikod.net> <20240506.ohwe7eewu0oB@digikod.net> <20240507.ieghomae0UoC@digikod.net> <20240514.OoPohLaejai6@digikod.net> Message-ID: Subject: Re: [RFC PATCH v3 3/5] KVM: x86: Add notifications for Heki policy configuration and violation From: Sean Christopherson To: "=?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?=" Cc: Nicolas Saenz Julienne , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Ingo Molnar , Kees Cook , Paolo Bonzini , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , Rick P Edgecombe , Alexander Graf , Angelina Vu , Anna Trikalinou , Chao Peng , Forrest Yuan Yu , James Gowans , James Morris , John Andersen , "Madhavan T . Venkataraman" , Marian Rotariu , "Mihai =?utf-8?B?RG9uyJt1?=" , "=?utf-8?B?TmljdciZb3IgQ8OuyJt1?=" , Thara Gopinath , Trilok Soni , Wei Liu , Will Deacon , Yu Zhang , "=?utf-8?Q?=C8=98tefan_=C8=98icleru?=" , dev@lists.cloudhypervisor.org, kvm@vger.kernel.org, linux-hardening@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, x86@kernel.org, xen-devel@lists.xenproject.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, May 14, 2024, Micka=C3=ABl Sala=C3=BCn wrote: > On Tue, May 07, 2024 at 09:16:06AM -0700, Sean Christopherson wrote: > > On Tue, May 07, 2024, Micka=C3=ABl Sala=C3=BCn wrote: > > > If yes, that would indeed require a *lot* of work for something we're= not > > > sure will be accepted later on. > >=20 > > Yes and no. The AWS folks are pursuing VSM support in KVM+QEMU, and SV= SM support > > is trending toward the paired VM+vCPU model. IMO, it's entirely feasib= le to > > design KVM support such that much of the development load can be shared= between > > the projects. And having 2+ use cases for a feature (set) makes it _mu= ch_ more > > likely that the feature(s) will be accepted. > >=20 > > And similar to what Paolo said regarding HEKI not having a complete sto= ry, I > > don't see a clear line of sight for landing host-defined policy enforce= ment, as > > there are many open, non-trivial questions that need answers. I.e. upst= reaming > > HEKI in its current form is also far from a done deal, and isn't guaran= teed to > > be substantially less work when all is said and done. >=20 > I'm not sure to understand why "Heki not having a complete story". The > goal is the same as the current kernel self-protection mechanisms. HEKI doesn't have a complete story for how it's going to play nice with kex= ec(), emulated RESET, etc. The kernel's existing self-protection mechanisms Just= Work because the protections are automatically disabled/lost on such transitions= . They are obviously significant drawbacks to that behavior, but they are acc= epted drawbacks, i.e. solving those problems isn't in scope (yet) for the kernel.= And the "failure" mode is also loss of hardening, not an unusable guest. In other words, the kernel's hardening is firmly best effort at this time, whereas HEKI likely needs to be much more than "best effort" in order to ju= stify the extra complexity. And that means having answers to the various interop= erability questions.