From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (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 872F04DD3BC for ; Mon, 12 Oct 2026 20:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791835759; cv=none; b=VRWdNCIo+9FqRfDutlpp3w55rTk06XjMBN0JWbS+jKk4lqG/q6ptU0IiAAaWUFeIP6Roe+GIhkQ+8qdmk+EoPIhSRoYelXi5AleA3cgeBzJ4eOOx56kS+jI402gQqcRqqTKZJS84YgVGGSD6neK971/XU/8WjHKziKHoWQpjhKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791835759; c=relaxed/simple; bh=labewT2hV27LB5EpRULnoGnU1thrB4RMmBUKgDB18W8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=gDG/tRfDqkfK1fHlM8/xdANOjTcVHWMU4fKgXYSfoZCmwG7LSU9I/76hIYTag/qHptgQDU0GYoyFHWUnV2YE6bl7XRmD44hAQHRGPJOPcIfUs+6yAYDfgWZS3PgeSHIPsWw1Rtq3FS2PQSfhd3eXlPCUe9LJ9w6fKDTpdL7nL64= 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=sRHmF9JE; arc=none smtp.client-ip=209.85.214.197 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="sRHmF9JE" Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2e80ef3e0a3so33244005ad.3 for ; Mon, 12 Oct 2026 13:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1791835757; x=1792440557; 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=0huG8WqQPQs/27VK7Fi+O9rqo6WXAIJK228EBYSdVtE=; b=sRHmF9JEJIqhi8rNrjSDAucB5pRjMmYyreRR0fJdsJUgZ2eD455WltOtwmiPaFqtoB fkazpDsIQsfx6PCDoklcp0+dVAYlY/r69qpAnY6+69+ZLGq8lpyNq9Vp5/WAwbrqfNJx rp2pOcJE1oOZ6Wv8bkRCp6HQsHiGMu3/A+V1y3cyEH2LI5vPGWFR3GLdRdFyBBXNAa7Q I+DYQEsHYgECY245ZyixiqZSylDOM1dIa2RYgLNwT4X/UL6pST6GN1o1N3xej6/trq4d F/tyE9wQCoNjvm4rAvW8SLR+qR/ysG8iSOBdx+Lm8Jh4/kCe+3x2Qs3zGDwtlEbIRfKL OzNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791835757; x=1792440557; 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=0huG8WqQPQs/27VK7Fi+O9rqo6WXAIJK228EBYSdVtE=; b=AJvm4sB2nOXx9DldWwOHPvJAwNPUjcpc23HFfazGhWXsEQoZ4qwquPyGDO5ePXtgya lHKRsBAqpYFc1Q/X5MJxwqlBAA/2zTEG/JGjLmD4i5xFrYsBYL3pLQ70j6jdFU0gAb/J NZIdn2hv4sJnykyUm8v+v8dJQNTFZvub8Gu1QLhSJPM+yWx+0onskrhINiS3j/s8jHWl tZuVjAN+K++Ee8B/ExH/hmCXSiAQSb1s7Eu/WCuFGbimqlys39uvBMOey3gm1DSmfy8p pZWBhU6Z02RtqpibTFhPD2PP4TlEjnxwOWQQZGB5fiGQ4n/hA5Mk7ahASqGxR8TbvyEv 0n0Q== X-Forwarded-Encrypted: i=1; AKwUvBzEFL6GefqDTrO7Cd6tqxr3pmjKPUbWObBMiXy41bwM44QPbtrxg27AxhJQlaxdnFaOtgQwkVxnSWVhBzA=@vger.kernel.org X-Gm-Message-State: AFq9FYLslETc7i8rJbemDZPdgfkVmlIdHwoWdUUiXoXKxk2fz+6uxpsI 3INPoDS6fTI8cHA8D/bA/b1m/6v8t+JLJ0XRFdMUx4IA+1CcLBxHX7DA7jRgbgYBPYxIepSPwsp 5aJtmqA== X-Received: from pgdt2.prod.google.com ([2002:a05:6a02:3002:b0:cc8:4927:ea08]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:ef45:b0:2e8:2f7:4a60 with SMTP id d9443c01a7336-2e842cd211emr83473025ad.51.1791835756613; Mon, 12 Oct 2026 13:09:16 -0700 (PDT) Date: Mon, 12 Oct 2026 13:09:15 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260722-tdx-selftests-v14-0-15ad654a50db@google.com> <20260722-tdx-selftests-v14-13-15ad654a50db@google.com> Message-ID: Subject: Re: [PATCH v14 13/22] KVM: selftests: Support guest_memfd in-place conversion From: Sean Christopherson To: Michael Roth Cc: Xiaoyao Li , Lisa Wang , Ackerley Tng , Binbin Wu , Chao Gao , Chenyi Qiang , Erdem Aktas , Paolo Bonzini , "Pratik R. Sampat" , Rick Edgecombe , Roger Wang , Ryan Afranji , Sagi Shahar , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Ashish Kalra , Tom Lendacky Content-Type: text/plain; charset="us-ascii" On Mon, Oct 12, 2026, Michael Roth wrote: > I don't have a reproducer for the specific ABBA in question though; I'm > confused at why sev_ioctl_do_platform_status() / SEV_CMD_PLATFORM_STATUS > would trigger a gmem fault (outside of malicious/intentional case) since > it is just querying status on behalf of host userspace and storing the > result in userspace buffer where there's no reason to use a guest/gmem > page. Was this test specifically set up to do this or was this reachable > from a normal path? Just trying to see if there are interactions I'm > failing to consider here. I was just running KVM selftests, although I was running all of them at once. The condition doesn't require an actual gmem fault. The uaccess APIs have a __might_fault() to communicate that a page fault may occur, and lockdep is smart enough to piece together the problematic chain of locks. -> #1 (&mm->mmap_lock){++++}-{4:4}: __might_fault+0x59/0x80 <=================== _copy_to_user+0x23/0x60 sev_ioctl_do_platform_status+0x50/0x80 [ccp] sev_ioctl+0x220/0x2b0 [ccp] __se_sys_ioctl+0x6d/0xb0 do_syscall_64+0xfe/0x460 entry_SYSCALL_64_after_hwframe+0x4b/0x53