Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 C66E94A2C for ; Tue, 4 Jun 2024 00:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717460993; cv=none; b=SDRxjFR8fP9dWQQfggI+yOBCLpiEqihQ18jvweJ2+ARpO4pENTqnz1lB4CceXiFCuU+jeN4rT9EUCZm7yYiL+QHu8Fl/yZLgcxwO4eZ97y3BxE44GMmkp9OeZLgKjbobK6fDPPsR/C9RvLu2vf++BgK7X+FOP3Dp/w1lnYiMX+U= 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.214.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="puxjbxBT" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-1f621072a44so28258565ad.3 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=iswobGBwQgXfVhtNiANRO+6rYTlenW9R3QyjQHs5OB78+li2H7DDYAkNfFag8/x1gK vF/TA6fTowmTQRaWTR+0XcLjSA4u4Nuzrz3LVe53ERxANTohGfzRecWKw36jwnTmGgJg Aw63LQqRVW0uRs8YHMrO6THHHDOJy0GZgN9+bBxIaMvLsyukGhi00/bEzvSgqHtutGqX 0zeWVoyS1lkOoEtlzcAU8H1xEm5vTAO23HmpsFxqIyBTHGLqUqgB+cr5xfJ1y+oz0wV0 yI/YR7+zyFrI99hJ9gcrOC8tTu1p6jX31oShlqq+lBcgiK9Klq18vEMgPtKjHSh+wrXF W1fg== X-Forwarded-Encrypted: i=1; AJvYcCU4bN9V5EzdyXBpwSsZbINNPuE5aM+yJFZtw9LjtcdO/EKtV1XZfILZ34F+h7vEusawAskIPTfim3Vy3/z54quK9Jrh X-Gm-Message-State: AOJu0Yygw6z3k8BJerfcslMtvF7JiS43kg7cv4tNFTkWOrMZasHQ4CJL mWKUFdZDqHBz5NnH508DhDoppxuLPNW/K9zZdMgusIjteraGcjeY4eb3Rpk8hrCuriDeqZbxNa0 TwQ== X-Google-Smtp-Source: AGHT+IENLGEaWbs37HwWar6l9tfsoGWg6m42nFsyoTQfIezFlKVeE9IraziAYhpEU9jmdwNYoPJqg3Pzh8c= 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: kvm@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.