From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (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 29E16370AC7 for ; Wed, 5 Aug 2026 16:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785948377; cv=none; b=qrKlTJa6WFnYpNWBVT7uXmxjGPmlYQOjPhqS044UxQTI++DprLKHHli7lhPpKWpwV10J1hMD+yp4A5F+iA0xN9aYQok8ZMfkbRjwIELxicbZ1FXjkiHsN7oQtoEpz/cuxcURYJOkCTWKDqN6j1rHzIr5mTWlubg6fdX84RXcybI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785948377; c=relaxed/simple; bh=0/wTjwH2AmhnxiB2gEIxJBuTAX2kewLyyK40z9ZmoDU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=o4G7bvfmd7RS0h/fxi2jng51Qm3diUlsBqfQbxyQlL9BotwdUgETtRO4g4lPmxWFu3Hbq56khV9/0OE3aB6oVU0etWXlDZRulCAxzvPDsdqkL5eu2Jhq8IWkWbe+/KSk5iZMkYqAKN5aUqNjeKmyKU5sKU7dw0Fa9doDE49QUNA= 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=hPL0dmYL; arc=none smtp.client-ip=209.85.215.198 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="hPL0dmYL" Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-cb835525b10so1446507a12.2 for ; Wed, 05 Aug 2026 09:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1785948375; x=1786553175; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EWq337Ttauiqykl6frHm/i4+dXlccI/8qbJrdOWFnnc=; b=hPL0dmYLzsjUDwtIF27pdCJLKVd/Hw0looa8mmdXLq8t7wp8PWEQMVHa7YI2LFsqa+ DDL+N8ttL5dDmuM8ALv5+9RM7rVXID2HsYHx6w9bGJOEheVPYI7bG/v3lZ9o8JoSwK7l GEgGsgKsnYzpaWxAWIhCXLDi5DoXx6JOpHbINsaK70GorO+VTlZhKAwjqoRBZomQvgG1 RoBFYglxFZhI4IM26LWuu/jjMGXOFTu842Ee2ESlS038juUHmOErSo4dGk/600OgamJ5 LtTrbFtCQVok7uBU3tZOjuykKfryl8C/kAWFIZPlB9CKDHIGDRWCkRX1/pg6tgpZaKLE 4c5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785948375; x=1786553175; h=content-type: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:content-type; bh=EWq337Ttauiqykl6frHm/i4+dXlccI/8qbJrdOWFnnc=; b=SSkx0QC+tKb3DdAtK6vSc6sp5CAD8zo14cADddwQvHmTiJFeA/bUKPI1Gcr94V/mqq F5jwQSaXVbS6rybw14swqOJh/E9T2/ForXGHKCIq6T/0Fxrgvg6cWQ2/45HYnIcC9Wx/ CP9fxAffOfe0O6cJy3TuwW6V3YVeU8nQq0gwJcK5KZCziSnw+t4H7U2qSjYCSZd7ExVO DdlZr55tMNTxoqFKOk/f8n8cAs3Xsy7EfvTV4cC5SLNFFHnLnPDYEbiPIofY7e3Ub75m /gXOm7m/NBoU0kJ/y5vQvaaE0KEqHCBI/YWw46ZnCo+K2eE/rNKfUYBGZ3MMhvxdZvbz TsZw== X-Forwarded-Encrypted: i=1; AHgh+RpZiII3oEFcy/qHBtsBkBG8JEsqaUvh/sy4tb+eCwzDtQ/89TWQIjKnEoCf5Px2N2PpobsxfX5/IW7zyNM=@vger.kernel.org X-Gm-Message-State: AOJu0YwVCUkl/yY6rgfVtAHDgS2krNdNGo5F5jaCtE6UPymbU2mSYo2Z tBSWmN6qcnHgEnyx8WVBX8XKQPfpX7vLv7QqEN6tGg4nZH3jxpvm39QNSUDiuQ+1CewRo0vBeTP EktIiuA== X-Received: from pgbck1.prod.google.com ([2002:a05:6a02:901:b0:c85:8035:8b21]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:398e:b0:3c4:3321:5009 with SMTP id adf61e73a8af0-3cb85eefa06mr9767805637.29.1785948375260; Wed, 05 Aug 2026 09:46:15 -0700 (PDT) Date: Wed, 5 Aug 2026 09:46:03 -0700 In-Reply-To: <20260729170621.308809-1-dmaluka@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260729170621.308809-1-dmaluka@chromium.org> X-Mailer: git-send-email 2.55.0.571.g244d577d93-goog Message-ID: <178594830648.3638708.496651964153873489.b4-ty@google.com> Subject: Re: [PATCH v2 0/2] KVM: VMX: Fix IPIv use-after-free + improve checking duplicate vcpu_id From: Sean Christopherson To: Sean Christopherson , Dmytro Maluka Cc: Paolo Bonzini , Dave Hansen , Chao Gao , Kai Huang , Naveen N Rao , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Vineeth Pillai , Chuanxiao Dong , Aashish Sharma , Grzegorz Jaszczyk Content-Type: text/plain; charset="utf-8" On Wed, 29 Jul 2026 17:06:19 +0000, Dmytro Maluka wrote: > vCPU creation in kvm_vm_ioctl_create_vcpu() may fail after > kvm_arch_vcpu_create() -> vmx_vcpu_create() already succeeded. In such > case kvm_vm_ioctl_create_vcpu() destroys the newly created vCPU in the > failure path. However, that leaves a side effect: the IPIv pid_table > entry remains configured with this vCPU's pi_desc address. As a result, > when another vCPU sends an IPI to the APIC ID of this failed-to-create > vCPU, it will cause HW to write to this (freed!) pi_desc memory. > > [...] Applied to kvm-x86 generic, thanks! [1/2] KVM: Check for duplicate vcpu_id as early as possible https://github.com/kvm-x86/linux/commit/97d65b544f48 [2/2] KVM: VMX: Fix stale PID-pointer table entry left after vCPU free https://github.com/kvm-x86/linux/commit/b41f2ca6c060 -- https://github.com/kvm-x86/linux/tree/next