From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164861; cv=none; d=zohomail.com; s=zohoarc; b=lhwVriR5Nawc4uzsrbDgiZDQuom0IAz4hFC1R1qrgHZ3ehazc1peJ3bz80dssBGOOsqd51AVX/qKA0uHMYzl+6kBCiR78ZrQ8abtyodFbkXF62JqUh8iKibcQo9XZ71av/jfnVdz6fONumab9yKgga27jN96OkNo+EmAGAA//WU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164861; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VxTQIr6/v8p/1XNjkq/JDTf7kIDF6NXQERFVJ7N0oWk=; b=a+0jCltDZaOqCW9h6rNikjC/dw95Cl5jG1/yB1rxoD3tBfAHBrc18xe2AQQrXUlrl49RclYdy9my/v703UPggpO+/eCTCfbJ8nVoX6K6Ew3NRm+z+lLfcAEmVjvNluQoBf7I4UnJx9S8mLjIudgkNnEPCVsXsH5r4wi6LjPXuTE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179316486170355.48158788020248; Tue, 27 Oct 2026 22:21:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5f-0003Sp-Ee; Wed, 28 Oct 2026 01:20:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5d-0003Sg-MV for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5c-0005xI-1N for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:45 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4iKJm307023 for ; Wed, 28 Oct 2026 05:20:43 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgmavjkte-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 28 Oct 2026 05:20:42 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4Yvsq1030468 for ; Wed, 28 Oct 2026 05:20:42 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4hjsu7uuy0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Oct 2026 05:20:42 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5Kcmi52167044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:38 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0A8120040; Wed, 28 Oct 2026 05:20:38 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0AEE2004B; Wed, 28 Oct 2026 05:20:37 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:37 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=VxTQIr6/v8p/1XNjk q/JDTf7kIDF6NXQERFVJ7N0oWk=; b=AX6lYuA5lElJdJg7R5bHh7zmbN7N/vS7Q hHFrksNi6jD3+wOQsFL8aQ+Y81PaJRv6WCDUiHAgl1SuA4nKwF3luliAJktunPdO fDLSvGZx4vqmksCfaiSiNBDpgv4TYrEHGbby2HZm//8S5pkwXYARf75jx5iHtgGi 6llaMKRLfS5AKDJediiT4Ns7I2yZYEzoQukS4otan/LbbzFBrfQ5NYeWAVkNmG8k fvot1I2iQn/g8EWoDr46ucOV47rpayFPnVUleXU/3XUEZ5T6Z/JLAARo1mFnbewq WUkkdsGPrqwwvP8qE8MughyN2tHycR5yQyYMS+3ytsumBbNQsIQbA== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Nikhil Kumar Singh , Aditya Gupta Subject: [PULL 1/6] hw/pci-host/pnv_phb4: fix guest-triggerable abort on 8-byte config access Date: Wed, 28 Oct 2026 10:50:19 +0530 Message-ID: <20261028052024.38377-2-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=P8SvFSAu c=1 sm=1 tr=0 ts=6ae1862b cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=p0WdMEafAAAA:8 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=cZ2jSh9J2h8rrMqNVj0A:9 X-Proofpoint-GUID: C9hq_dZqK1U7zkHAPWAdsFy6m0xZ9Jul X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX7lI0GNAOoBxb mTE07nH8c0V2KMz1/BXMs+Emxk6E58W1j2xBT4JV5dsjOn6mqWD1Izv1Kw4yBgLHyzslYiDgKHT zBQvke0+xwRs+v703glLqhg8uOwvPnY= X-Proofpoint-ORIG-GUID: C9hq_dZqK1U7zkHAPWAdsFy6m0xZ9Jul X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX3bUM9/s83ckp K3+4r4RBtWpZ/lJndrkuz1lnfkXy9HvnQVUXPfai8K4CsDTvrJszFulvoC3+aq7AJNENkDB5LC1 QQNgex/goweFYt5rK0+dYV9l9jGPA/d0LZfHxFERZbxN7US7mDkxKz/ur8daaMeyulgbUs5juDr JYx2ZWAypbZZ1Qjg0rb0Ji2M5S5bjIVf2Y2OQjx3pgE2ZXKj4VAcF9vrAHiXB67wmQXWMFcC5wm N4vM7zcy2L/0EkpdSPA0GIp/L+Yj306WFP1lPGdiT5ujlDboQQSfxATotS/t83Bk1BOcyCOCbc3 5wBmfHrESFN+SutEAPeAL9CM3kuu7AZoLifju03+yZrwsjgroV5ViYJMFQKvvTFyIxcuIce/LJr LYTPcsY41YYCDjmLas76KZAxGxJjHXx73k/lyHC29VWXhX9Icq/iq2JMh67dgzBkc1XJAls+RO7 TkpEvoDzXkM2ANDD1gg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 clxscore=1015 bulkscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=harshpb@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164863401154100 Content-Type: text/plain; charset="utf-8" From: Nikhil Kumar Singh A guest-triggerable assertion crash (DoS) exists in pnv_phb4_config_write() and pnv_phb4_config_read(). When a guest performs an 8-byte access to PHB_CONFIG_DATA (offset 0x130), QEMU aborts because the switch(size) statement in the config accessors only handles 1, 2, and 4-byte accesses, hitting g_assert_not_reached() in the default case. Since guest input is untrusted, an invalid access size should not crash the host. Fix this by adding a size > 4 guard in pnv_phb4_reg_write() and pnv_phb4_reg_read() before the config accessor calls, and by replacing the g_assert_not_reached() in pnv_phb4_config_write() and pnv_phb4_config_read() with phb_error() to cover any other callers. Invalid reads now return ~0ull, maintaining PCI conventions. Fixes: 4f9924c4d4cf ("ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge") Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3591 Signed-off-by: Nikhil Kumar Singh Reviewed-by: Aditya Gupta Link: https://lore.kernel.org/qemu-devel/20260805090530.1333997-1-nikhilks@= linux.ibm.com Signed-off-by: Harsh Prateek Bora --- hw/pci-host/pnv_phb4.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 9acaf4c0c2..ac09a0b034 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -84,7 +84,9 @@ static void pnv_phb4_config_write(PnvPHB4 *phb, unsigned = off, val =3D bswap32(val); break; default: - g_assert_not_reached(); + phb_error(phb, "invalid config write size %u at offset 0x%x\n", + size, off); + return; } pci_host_config_write_common(pdev, cfg_addr, limit, val, size); } @@ -119,7 +121,9 @@ static uint64_t pnv_phb4_config_read(PnvPHB4 *phb, unsi= gned off, case 4: return bswap32(val); default: - g_assert_not_reached(); + phb_error(phb, "invalid config read size %u at offset 0x%x\n", + size, off); + return ~0ull; } } =20 @@ -507,6 +511,11 @@ static void pnv_phb4_reg_write(void *opaque, hwaddr of= f, uint64_t val, =20 /* Special case outbound configuration data */ if ((off & 0xfffc) =3D=3D PHB_CONFIG_DATA) { + if (size > 4) { + phb_error(phb, "invalid config write size %u at 0x%"PRIx64"\n", + size, off); + return; + } pnv_phb4_config_write(phb, off & 0x3, size, val); return; } @@ -644,6 +653,11 @@ static uint64_t pnv_phb4_reg_read(void *opaque, hwaddr= off, unsigned size) uint64_t val; =20 if ((off & 0xfffc) =3D=3D PHB_CONFIG_DATA) { + if (size > 4) { + phb_error(phb, "invalid config read size %u at 0x%"PRIx64"\n", + size, off); + return ~0ull; + } return pnv_phb4_config_read(phb, off & 0x3, size); } =20 --=20 2.52.0 From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164907; cv=none; d=zohomail.com; s=zohoarc; b=kJCc+FWRrTR+YbSDs/qiTcyGZwvbhJKjk4yOcj6S8Tt2E922WtYSi7d9dJRk3r9kQcpe+qk2P79JFyyOWK5tddcyiRKaVi0W1tJDrH581qGUaIYLaSwE+ewjRgBShFJD0+te1kctvnizyCy7ensGkJP3n33Hf7PWMuLFk4GpldI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164907; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=D1/YwJHlDNTJ2pE7KkQIpoYw1iMuo2P0j9LV7Yrkfso=; b=Hqdu2YzabWKmLB6HzI7SGQIvVrPrxWyBXlM8LedS8uKh6UfxrqrV31U2MTT1K8Ie4P5uCG6QIBinkWsmf9q6gHKW3oPRPKPLQhdTDrcOaw8Ge1nsRmA4pTGDkKjC4X/pq9wbZy7iyvka/0Oo1qUrE/tJsPKdPyLZ+Tzr9EapMg4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179316490713924.268749567513623; Tue, 27 Oct 2026 22:21:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5h-0003TU-JY; Wed, 28 Oct 2026 01:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5f-0003So-87 for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5d-0005xQ-CT for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:46 -0400 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4iSXa227513; Wed, 28 Oct 2026 05:20:44 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgj3mb71u-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:44 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4YtL44039839; Wed, 28 Oct 2026 05:20:43 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4hk010j6mw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:43 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5KeeF49414432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:40 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 169DB20043; Wed, 28 Oct 2026 05:20:40 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F321520040; Wed, 28 Oct 2026 05:20:38 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=D1/YwJHlDNTJ2pE7K kQIpoYw1iMuo2P0j9LV7Yrkfso=; b=qol/xymqWheqXnUPZyWv5mZ3ZGyweVZ50 dZlmS/hoHIg9slk5QYJmzR5/vA5RFRdGePXzEtwrvJnQd611DsY8ClqW2QeqjIiX uzU/8FpGCIAOV55QPS721Vailm6L9eLYgsgWAHI8UcA+abLoc81GbqC5ifbLM/9W yOhGg/a/zWkfQ9h0D+6+ojE9V5m9bsfXCeFRoQahfT+UHQLQjWFeyLTot/GfEwp+ YYzVAy7hLBCJ2TuoOA4A81VqFBklBty5/Q+X4xAUv0aJicGZMjQhKDC6GVQ6fFS5 t2T1lbED/8CRdBmDJ9Ys7Go/X+z899PRaUurzFa2AIUlcj11Wgt+Q== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Aniket Sahu , Thomas Huth , Amit Machhiwal Subject: [PULL 2/6] tests/functional/ppc64: extend pseries migration tests Date: Wed, 28 Oct 2026 10:50:20 +0530 Message-ID: <20261028052024.38377-3-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX4P0kfzDWsV5F Vw9pQDlB8h5Pg3S8SxcsJNcoicMaF59yVPIyqBpIJaBeg2/gatr302rFZmcyuFOf1bu4+XCvPpk i9tJpUedN+JcVT/Thm43BnbSA670m1g= X-Proofpoint-ORIG-GUID: eVcut14nzdQex_xO723Gb3yi_f3T3Aht X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX0UXa2cfKfnqb Jrqpl568v6fy6l+ZqPm8g77JmtCNVukQGSsbjHmptWiEYxZljd1IfJ+whn8ngH9IdF/x3kCUSJg AXfo2N+v8P9rbiloc65AOBJzXMyy3QliJKtmVHTX3fbYZCa8g4QdH3KuXYqBY6YD1vGDrkoNC2X V53nMI0WImr8BCCz5TrTDrgmqSjjdWnS4Jlukz7Pr/U8Wx5030WrBNpMaPXgANzvRJxi6EdF5lh 4BlbkhJDKhdecJ1E5LbDP2kDSDBUIZMrK4xMjcZgxVMzGqwZ12w5SdH8zWhPVYnG4K1iHMR0QCV ZfEC1mJoNLmg3vi3VEiirbxSKW1BifWVcOzp5rtdVgcfCu1AP0sXZajLcLHGMC1IC4zpkYO/WLB zgybtMjGlLztMEcBLCjXMJ23ARAD8TovpE6Wrqs7qsGcyecqMscPcqO66TxN9+BQQSZfu/EqAOl R80e5Cqt7cHbcMssF8A== X-Authority-Analysis: v=2.4 cv=G7uJgNk5 c=1 sm=1 tr=0 ts=6ae1862c cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=20KFwNOVAAAA:8 a=nntn5sUTz_BbCZulGUMA:9 a=O8hF6Hzn-FEA:10 X-Proofpoint-GUID: eVcut14nzdQex_xO723Gb3yi_f3T3Aht X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 phishscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=harshpb@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164909053158500 Content-Type: text/plain; charset="utf-8" From: Aniket Sahu The existing test_migration.py exercises all three migration transport paths (TCP, UNIX, exec) but only against the mac99 machine type. A regression in pseries-specific vmstate save/restore handlers would not be caught by migrating a mac99 guest. Switch the UNIX socket and exec (socat) migration tests from mac99 to pseries so that these transport paths are exercised against the pseries vmstate. The TCP test is left on mac99 since pseries TCP migration is already covered by test_ppc64_linux_migration in test_pseries.py. Signed-off-by: Aniket Sahu Reviewed-by: Thomas Huth Reviewed-by: Amit Machhiwal Link: https://lore.kernel.org/qemu-devel/20260921081010.31778-2-asahu1x@lin= ux.ibm.com Signed-off-by: Harsh Prateek Bora --- tests/functional/ppc64/test_migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/ppc64/test_migration.py b/tests/functional/pp= c64/test_migration.py index 7d49ee175b..e1d51551b8 100755 --- a/tests/functional/ppc64/test_migration.py +++ b/tests/functional/ppc64/test_migration.py @@ -15,11 +15,11 @@ def test_migration_with_tcp_localhost(self): self.migration_with_tcp_localhost() =20 def test_migration_with_unix(self): - self.set_machine('mac99') + self.set_machine('pseries') self.migration_with_unix() =20 def test_migration_with_exec(self): - self.set_machine('mac99') + self.set_machine('pseries') self.migration_with_exec() =20 =20 --=20 2.52.0 From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164903; cv=none; d=zohomail.com; s=zohoarc; b=MQ5YI1d6TwyUCKByQ3tjh7yonAyJp6z4lW7hUibLQiBuINxkovjfVuc6/ReNIp/0iMUHy/aQYFZ63atcvj1wuu4LSqoL9f4+OnRQ/FHNNjv2iNP7jVjPAwMAc5LfstzM3/SOEBeIuPKaQ7XJ5ZDBi51vuzjKQbfazqBliPCzMk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164903; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uYis7eIR7PdW4+cJid1+1FXoQITNNMIg8fv82vSjCHg=; b=AlRtKu+Hfb9weMdJXjqO8yyGtd4KKVKxTBzW+YqA5vDapW+uyDOLKolgTmiNe34DQVuvcurRgaqLl+i0/qrFM0cbKAt9YsDv5hDkbmsKutb64Fft2uSqrC/+z3wJ0UfHCNnzKP2U+/Y9tqPKG1igRPjMhKGMA8STvrNhjUo5iTE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793164903499791.2557182884386; Tue, 27 Oct 2026 22:21:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5h-0003TV-R7; Wed, 28 Oct 2026 01:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5g-0003TH-TO for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:48 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5f-0005xa-4I for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:48 -0400 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4jQaW230722; Wed, 28 Oct 2026 05:20:46 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgj3mb71w-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:46 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4YwVw1081706; Wed, 28 Oct 2026 05:20:45 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4hh8gh5yqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:45 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5Kfe039190904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:41 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA49E20043; Wed, 28 Oct 2026 05:20:41 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6926020040; Wed, 28 Oct 2026 05:20:40 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=uYis7eIR7PdW4+cJi d1+1FXoQITNNMIg8fv82vSjCHg=; b=AJvEKy8+jSXNUgZUEfRsMErLGcI/54kib HaJqMFrlQ98EgQcU2F+6xRCEIBgUYm6k1cGq840XH0B7HuMogefu2BtgtrIR6KH3 aTE9/decuLIYLNnS/1WxRg9lRVT7UYnOWxW44vYP7E2DMLVXx44n7/BPleYJAECV /S0p+OPmgIe8GKnYk7Jt9Enprciv4ClpUTuSmBpi25Ta8KPtaRAjBjWyNbwdab3b xv/FwJb0z5U/Ya9eX4/yXpnJFCS74f0nLvEIMtuN26/WRpQzGVJLGSTjn4I2c9yb rRdAdngpnT8Jj8lQYnSQlM5T3g+uhS4hHSAwgBwHf9VwMJWP+cnqg== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Aniket Sahu , Thomas Huth , Amit Machhiwal , Aditya Gupta Subject: [PULL 3/6] tests/functional/ppc64: extend ppc64 powernv net device tests Date: Wed, 28 Oct 2026 10:50:21 +0530 Message-ID: <20261028052024.38377-4-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX6COkSm5rOTe4 6jESCDTYQUYQkXZTkjXcKQM0Dfd2e+9vB7hf5gLo/xOWA7VGcpgRqN25kzeYrGbBRFlajFelxij mS9QMXW2AJa/QQ1NA4NLq9x1YTn9gro= X-Proofpoint-ORIG-GUID: Fkr7sOBsZDcwNr2udFsExOa5KDs_vocR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX6n/vLQ5oAgJD n+i1EH/9YujypOlAzFHdS5mzvI8VAHw8fh4pYZoAj7PiOmG3QPKjQCtLSvkqXpfhmhCoU203yht jDgqAMPxQ09h79LZrWI/3xyHHki7o/+J3+V921v1XHv8vRHhm6vGpNQAMLEP1u3gLF8p0XCqDJ/ z6133KiUi2oO8HmY202IAG2WSrT/81ycpNA3ZjP+vgtNk88i/k6RhpMxaDLDFIusO7F0oelXXiA A8USFyadKtQF01AK8QQy4L3B5/N1t59IHaieXBkxRswNJexOUkKj3pMbAZNFix7t3SWAtp9Jr2/ ogUsXmX77gpIJZOq9pvIfizyKppSFqvhIzjVnPEpH5dsnIqV3PwMqKroBzpXzkUvmxoE5VXP/Fp coNo16I+qm3BWdiOq1Vo6CFbed3ZT7ztjc3ic2w1+BJzWkOZuwaj6mszB/7MMf9sRQvaJqwpGGX lG3VJqYwWCYujbeGn3g== X-Authority-Analysis: v=2.4 cv=G7uJgNk5 c=1 sm=1 tr=0 ts=6ae1862e cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=20KFwNOVAAAA:8 a=qvQqbTaxai10iMa-vdEA:9 X-Proofpoint-GUID: Fkr7sOBsZDcwNr2udFsExOa5KDs_vocR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 phishscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=harshpb@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164905088158500 Content-Type: text/plain; charset="utf-8" From: Aniket Sahu Added console checks as the probe log lines will appear before the S14Silence-console init scripts. Signed-off-by: Aniket Sahu Reviewed-by: Thomas Huth Reviewed-by: Amit Machhiwal Reviewed-by: Aditya Gupta Link: https://lore.kernel.org/qemu-devel/20260921081010.31778-3-asahu1x@lin= ux.ibm.com Signed-off-by: Harsh Prateek Bora --- tests/functional/ppc64/test_powernv.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/functional/ppc64/test_powernv.py b/tests/functional/ppc6= 4/test_powernv.py index f3e05e4d38..200fd2c894 100755 --- a/tests/functional/ppc64/test_powernv.py +++ b/tests/functional/ppc64/test_powernv.py @@ -201,9 +201,12 @@ def do_test_ppc64_powernv(self, proc): =20 self.wait_for_console_pattern("CPU: " + proc + " generation proces= sor") self.wait_for_console_pattern("INIT: Starting kernel at ") + # NVMe, e1000e, and xHCI are probed synchronously by the kernel + # during PCI enumeration, after OPAL hands off to Linux. + self.wait_for_console_pattern("nvme nvme0") + self.wait_for_console_pattern("e1000e") + self.wait_for_console_pattern("xhci_hcd") self.wait_for_console_pattern("Run /sbin/init as init process") - # Device detection output driven by udev probing is sometimes cut = off - # from console output, suspect S14silence-console init script. =20 def test_ppc64_powernv_external_dtb(self): self.set_machine('powernv11') --=20 2.52.0 From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164902; cv=none; d=zohomail.com; s=zohoarc; b=B/X7cV4gSStbznKd9FiUEQyknxvHeMfnWZyBLSlDzIvJMuhyrvAGHoDOYeMmUbEMuciZlLn1Lz/qX3ViEYHsyfno98BVaPMuM3cmjnjqO1bgWD5msA9AfO6qNmKHq9EgVQ/LsdzdcdD/nswRqGBrmZnO1LwUai7yqrbcNae9hPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164902; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e9+lVc7cjPyc2HDTU4KO5G1jTXwM+ujBDzdsXTJKkic=; b=jvFi4pskEfYxdmFPRww/WVpu+UrLh4TIx4i9CsXqJ1Gml9aFn1TE1pK58ueUIcvRGGqvXgPBH3yvxJuIDUP72ULLdftdIu8KRg2nPaNm5DRr/kR9HFJDGnq5qjOGYolsBvNXnepFRfX+W+ROhdv/tXBB8BR2N9SBXY+FrQbBjG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793164902514390.735811255935; Tue, 27 Oct 2026 22:21:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5l-0003UG-AA; Wed, 28 Oct 2026 01:20:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5k-0003U6-5d for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5i-0005xr-8C for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:51 -0400 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4iEdA2858230; Wed, 28 Oct 2026 05:20:47 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgmbt33qh-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:47 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4YxUn1074257; Wed, 28 Oct 2026 05:20:46 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4hjvh1u988-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:46 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5KhJ415532330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:43 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 206282004B; Wed, 28 Oct 2026 05:20:43 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0877C20040; Wed, 28 Oct 2026 05:20:42 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=e9+lVc7cjPyc2HDTU 4KO5G1jTXwM+ujBDzdsXTJKkic=; b=tTYOSnYywS05bLXyuHmLbd8G6muZjaMxz RycZzkVHa6s5atgtVEezZV7J9SlxKj8cZc0sgTayn94p58rbf/a5+nmzFcO2bJJa bqYs9g5ZTUeZduxZlwd4qyPiQBygmGoYrGnb2K4+tVivmPlhqSX0ReYshUaUVSbz V2rcWBlavM++LDsMZovV5f0K2DCqaVl02d9Io7XW+x9ViAbWIAN4bXxqk2sDYpI7 naRRAYsllnQWnME6yVyTJi7AeDS1ePNqR1GbHHmFLehq4gM2Xeqhp1EfdhzNb+0x p+3vbtbEqLZx5IRbVhi5RByO7XdYrC3jMbrAXiM0yUCA30BY+GN9g== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Chinmay Rath , Lazymio , Gautam Menghani Subject: [PULL 4/6] hw/net/spapr_llan: validate RxBufPool fields on migration load Date: Wed, 28 Oct 2026 10:50:22 +0530 Message-ID: <20261028052024.38377-5-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX3ypM5rdVvhQ4 QytOEYxCEU63UBmtxaUs+sQX8UgzhxhdWMVWTfXsrUogUh18tQue30tsDeVBcILOe17HloI3LuX v0ueSHuPI1U2i0ZXOLV/E6WjPFvCvStdNReAy8LPW1sUML9tSE1EIF61Etfgo/jjSM6FY5i09fv 1Zo9YGpC0ZM2zXSUYYe2scib8XGZtCBOJaEbXtU+JmIzTXQuY4X1SPsaa2VSL+o2SpQLZ45Nx22 KPjxnGeMJW3J9j5DxZux/+PwQS58PD0k/LvTlL5GgGiMlodKyHnfQzqXH8/om6kdHzm9bf1ntZ6 tKfvKTg1Kr18ipJIYfd2g7lvYAsbPcFlIKyBhE0HECceKXHx2uRMsaCeuez4aPga/vbbZUtJRbh 9jpJTCujncJ1gTzHhrcBsIrfyJD/FMlUhYj/6bl/dcw0F3w2kmCiBVFXLIImZ1/1dMoEXmD91XD 0k8yJejoZn/6RaKOhSw== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX6yULOlj7BDu1 RtOgFQFL7nXLJIDob5g3hkGVsCmY071i1k/zi4Bqz3bxLtCvrl5xRV1Me6uuBKQQSufEMuFGVKB l9/3p709bSSHU4QdQqhIqvy8sFSiV94= X-Proofpoint-ORIG-GUID: wujf0XRjxxl4eWDuqItMKHtphaHZjoyB X-Proofpoint-GUID: wujf0XRjxxl4eWDuqItMKHtphaHZjoyB X-Authority-Analysis: v=2.4 cv=CeKdd7rl c=1 sm=1 tr=0 ts=6ae1862f cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=p0WdMEafAAAA:8 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=X-KEfNhN3815lkfU2ToA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=harshpb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164903937154100 Content-Type: text/plain; charset="utf-8" From: Chinmay Rath vmstate_rx_buffer_pool restores count and bufsize as raw int32 values with no bounds checking. A crafted migration stream can set count to any int32 value. spapr_vlan_get_rx_bd_from_pool() then passes the count > 0 guard, decrements count, and uses the result as an array index into bds[], a 4096-entry fixed heap allocation: dev->rx_pool[pool]->count--; bd =3D dev->rx_pool[pool]->bds[dev->rx_pool[pool]->count]; /* OOB rea= d */ dev->rx_pool[pool]->bds[dev->rx_pool[pool]->count] =3D 0; /* OOB wri= te */ With count =3D=3D INT32_MAX this lands ~17 GiB past the start of a 32 KiB heap object. Additionally, a negative bufsize silently compares as a huge value when widened to size_t, defeating the bufsize >=3D size + 8 pool-selection guard. The hypercall path (spapr_vlan_add_rxbuf_to_pool) already enforces 0 <=3D count < RX_POOL_MAX_BDS; add a post_load hook to vmstate_rx_buffer_pool that rejects any stream violating the same invariant, failing the incoming migration. Closes: https://gitlab.com/qemu-project/qemu/-/work_items/4147 Reported-by: Lazymio Signed-off-by: Chinmay Rath Reviewed-by: Gautam Menghani Link: https://lore.kernel.org/qemu-devel/20260917202854.288439-1-rathc@linu= x.ibm.com Signed-off-by: Harsh Prateek Bora --- hw/net/spapr_llan.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index 550848307d..a5b8906849 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -800,11 +800,29 @@ static bool spapr_vlan_rx_buffer_pools_needed(void *o= paque) return (dev->compat_flags & SPAPRVLAN_FLAG_RX_BUF_POOLS) !=3D 0; } =20 +static int spapr_vlan_rx_buffer_pool_post_load(void *opaque, int version_i= d) +{ + RxBufPool *rxp =3D opaque; + + if (rxp->count < 0 || rxp->count > RX_POOL_MAX_BDS) { + return -EINVAL; + } + /* + * bufsize is compared against a size_t in spapr_vlan_get_rx_bd_from_p= ool(), + * so a negative value would compare as huge. + */ + if (rxp->bufsize < 0) { + return -EINVAL; + } + return 0; +} + static const VMStateDescription vmstate_rx_buffer_pool =3D { .name =3D "spapr_llan/rx_buffer_pool", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D spapr_vlan_rx_buffer_pools_needed, + .post_load =3D spapr_vlan_rx_buffer_pool_post_load, .fields =3D (const VMStateField[]) { VMSTATE_INT32(bufsize, RxBufPool), VMSTATE_INT32(count, RxBufPool), --=20 2.52.0 From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164902; cv=none; d=zohomail.com; s=zohoarc; b=PraWPscYJCzDG8mNUPzrntOW0qauv3TVlSErZzY2QC6Ka1RJJSSZaDJv96wEQTmwT9SnDiV96GtzrO/3k9ZEFrioJepmVHyQ3YVAWVhFAnxN4svFEyCVL3Ke6RWsiUOWh1VK6evCf06yvNz3dKRiZ8LDDNpLYLkMXYUKx32Ss6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164902; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0zFFNCzJLGNBB4ZPVWKcSa+l10brbedBx0U0CRG28/8=; b=ZDymmgx3/H9dwzi/u7ZS6m9k0qAw61WuFjr65491UHZIYnXc6cYWtU1xvU6d0/vnUDx0VA1lj0hOMHqNqe5jTJ5Zz/dVqu3GKta3o6cqqBXqN58OoMkTnPOlhYfTyPNYvQfq4oLq508PHRXUeF9ei7Y2XrrEfPAp1gc7kJiL7ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793164902055382.956329921633; Tue, 27 Oct 2026 22:21:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5m-0003Ut-Q5; Wed, 28 Oct 2026 01:20:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5k-0003UE-Py for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5i-0005xt-Sm for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:52 -0400 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4iD2R2858188; Wed, 28 Oct 2026 05:20:49 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgmbt33qj-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:49 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4YvrH973648; Wed, 28 Oct 2026 05:20:48 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4hjtnnbpdr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:48 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5KiZg45285722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:44 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 609EE20040; Wed, 28 Oct 2026 05:20:44 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 726E120043; Wed, 28 Oct 2026 05:20:43 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=0zFFNCzJLGNBB4ZPV WKcSa+l10brbedBx0U0CRG28/8=; b=YhzBdK3L6dXuFU2ZVxZnQ3ObdQVgAPeLn g8Px2enK//Z6mvNiTs1DsBo6kAgR4pZGtVdyj+QQ2aS6bmO+9XtUrAxeYY7CaqZQ 8dzvFTkMc/quWtWJooF8WsU7mn5cQ6X2MOLTum8zJScDSUbrmhglw1SAz6WcKbfw bIo2krnqItuyQqlh3pkWOVFfyW1t3TRRxWMyu5gWPo6t52uIZA7O1Jg4/WNcRIsn y3I22Q64PEws6NXlVshG77yR47RT2vlZ3Vqx/tgZbBT1PFAu2oknfnC9o2gXSuHt mafOn4oRyOPOpreSGdgv5TkYbH8kOItmtznJgRTAYZsFBgYgJ9+uA== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Showta Ishizaki , Amit Machhiwal Subject: [PULL 5/6] hw/ppc/spapr: Add the "rtas-version" property to /rtas Date: Wed, 28 Oct 2026 10:50:23 +0530 Message-ID: <20261028052024.38377-6-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX3jdTa861JZMV 2APjTRg/h/B2Myl/YLpYfl0CKOiBxcDCDwrM2jtMUBPPunByv9mOBQoufxHacogYXnvu7bKh6gB 5iLxXB+NGWP3hPSE2qhqD1JQHIBOsQhDiG1PxK3bxPXb6caJ36l4kKw1Twx5CXpzFiLBc2W4LJe 5tkUwjiRgZS0zURkPvwaumDeY3thjlkr+27GaZk/iWdYLPgEpeboGJDWY/m4hh+N+aKknvR88v1 pAzgiK1mkkwaroKzM+qFL5U+xsQeRJi8lLYcmvTsvyC6PzTZP2I5OTsjvr+p804RJsMokn1wOlh PDszK8U76R7aHwv3+iVYTjJZqAGMy/HmKZV0tgxoBpSOiID8f7wbddmXCpJNv7h+RbUNfz+jeWa Z2LhX+F43Dhb/hd+nf1Zsxq8wilnx8y1XQxhlYlrw7vFLgRkKZdXLDIJtZBd8uuH+o9NXhJDbnG 8G7xQiRrExrqU4eCIUQ== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX1K4O49RzM3Ni EybfV+fg9BRx6UFzco/2dbJsHB0rJio5FMXcFqT0c0bKYiQ7oMdWfBpaweAhjtxqEVcyDQokTrK 26ZK0xRVPfvCxwWl9HNPLjIcGo4R69Q= X-Proofpoint-ORIG-GUID: i9hK7k8x9C4aAg_MUblmVVtTo5lNJwho X-Proofpoint-GUID: i9hK7k8x9C4aAg_MUblmVVtTo5lNJwho X-Authority-Analysis: v=2.4 cv=CeKdd7rl c=1 sm=1 tr=0 ts=6ae18631 cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=VwQbUJbxAAAA:8 a=L9C5IM_eAAAA:8 a=VnNF1IyMAAAA:8 a=TVUzaum_DjIj2wzR_eEA:9 a=d8_PwHeUR2dB5DzxAQPm:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=harshpb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164904222154100 Content-Type: text/plain; charset="utf-8" From: Showta Ishizaki PAPR requires every property listed in its table of /rtas device tree properties to be present before the OS is booted (R-7.2.6-3 and Table 20 in PAPR v10.60; the same requirement is in LoPAR 2.9 and LoPAPR 1.1). One of them is "rtas-version", an integer encoding of the RTAS interface version, and PAPR says it describes version 1 of that interface. spapr_dt_rtas() sets "rtas-size", "rtas-error-log-max" and "rtas-event-scan-rate" but never "rtas-version", so a client that reads it finds no RTAS: NetBSD's RTAS driver fails to attach when the property is absent. Set it to 1, the version PAPR describes. Reviewed-by: Amit Machhiwal Tested-by: Amit Machhiwal Signed-off-by: Showta Ishizaki Link: https://lore.kernel.org/qemu-devel/20261005161859.3119EC92F0@bambi.sn= owrabbit.org Signed-off-by: Harsh Prateek Bora --- include/hw/ppc/spapr.h | 3 +++ hw/ppc/spapr.c | 1 + 2 files changed, 4 insertions(+) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 9acda15d4f..98a9099b8a 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -830,6 +830,9 @@ void spapr_load_rtas(SpaprMachineState *spapr, void *fd= t, hwaddr addr); =20 #define RTAS_EVENT_SCAN_RATE 1 =20 +/* RTAS interface version, as defined by PAPR v10.60 Table 20 */ +#define RTAS_VERSION 1 + /* This helper should be used to encode interrupt specifiers when the rela= ted * "interrupt-controller" node has its "#interrupt-cells" property set to = 2 (ie, * VIO devices, RTAS event sources and PHBs). diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6d99464486..8a1b5b37b6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1068,6 +1068,7 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, v= oid *fdt) RTAS_ERROR_LOG_MAX)); _FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate", RTAS_EVENT_SCAN_RATE)); + _FDT(fdt_setprop_cell(fdt, rtas, "rtas-version", RTAS_VERSION)); =20 g_assert(msi_nonbroken); _FDT(fdt_setprop(fdt, rtas, "ibm,change-msix-capable", NULL, 0)); --=20 2.52.0 From nobody Mon Nov 23 04:26:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1793164887; cv=none; d=zohomail.com; s=zohoarc; b=BsBsbFTsBHhkrI+qwWluBPcooccxtDSp9evLRJiao30TXGwVuJVv5qhRuDBJZS9kyf/V45SYT68kYJjudCVCb2MibNmEHCdWJRlL9xD5V+HYHbP/Z06pfo8xiEwpmRA0bmhQv6Q2BRKWAd6kOqwqU2BqMpL6VbAYkOXUE8FiSCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793164887; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DPdHMU/ZI8F1xwJAm/9pnlfSIBvOyUS3sQzMtPNxv6k=; b=akTwT3EAxOuZQZvr9EP5/r123vxf6B0FVujcxkLiFQgKbXyK2vyYktTWXKAlq/vvReS2QIP8Zb55PfAbBtTOQKKbtHxXE+RVNR0tgvwbgkGXzqaWhE+2sIHujk2NXzSaiZcmuysfnOJ6R1xpWVTqu9qsYmNMWJ+YPFhthDdQFFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793164887145650.4642702470577; Tue, 27 Oct 2026 22:21:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLw5p-0003VY-JE; Wed, 28 Oct 2026 01:20:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5n-0003VC-Ql for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLw5l-0005yI-Rk for qemu-devel@nongnu.org; Wed, 28 Oct 2026 01:20:55 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4i8Un287718; Wed, 28 Oct 2026 05:20:50 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgmd733jp-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:50 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69S4YwXP4039866; Wed, 28 Oct 2026 05:20:49 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4hk010j6n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2026 05:20:49 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69S5Kjdk40173930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Oct 2026 05:20:46 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB16320043; Wed, 28 Oct 2026 05:20:45 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2DC220040; Wed, 28 Oct 2026 05:20:44 +0000 (GMT) Received: from dhcp-9-123-3-122.bl1-in.ibm.com (unknown [9.123.3.122]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 Oct 2026 05:20:44 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=DPdHMU/ZI8F1xwJAm /9pnlfSIBvOyUS3sQzMtPNxv6k=; b=VKsGYUIxAIxywVdnt+325VWDIrsLpHUDY eFHmVVHwhzvABGu2CsqQLm9s3o+5KwgAjGJta5TB2k8kDMyag0ianfuUu3wcKPo6 oo3ixXjGgJUkaaM5WXU7A6tX59pccygC0Oj/HPJ7BrhxCk1rZJeRuuHiG0ffnl4C iqQLXznODeEhGbyq7ab9obXhC4i4Ttm1khRGRnbYesZCAsYBWIIJLvJfXoLMZOLa JM+6WbkOkQA7ozHPH4rUEHVLHHhcfD+bZMo71XWCBebIaRG3fxfXDfQjTBeIlMkR 2YP0Njp3L0LpuK8+5/AHwRz1p67KvW16Gfhs/bA84nNeL0X3q32yA== From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Chinmay Rath , Guthrie McAfee Armstrong , Gautam Menghani Subject: [PULL 6/6] spapr-vscsi: clamp adapter info DMA write length to struct size Date: Wed, 28 Oct 2026 10:50:24 +0530 Message-ID: <20261028052024.38377-7-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com> References: <20261028052024.38377-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=ZYOIpcVA c=1 sm=1 tr=0 ts=6ae18632 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=660iZSQnnn4A:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=U7nrCbtTmkRpXpFmAIza:22 a=p0WdMEafAAAA:8 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=HFWUlIUfFqO2-xBDwmUA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfX0PCq+7NPjUXv u0IlVYRlnZVfAUoxiIFt7CJZ3Awe1VfdKONXom51XoPJSswpe0E/7pHXjJq63TP7MyI7f9lMLL3 rlbSI5S6dyv66X31Gm4/uvbpW+jPSXMQrqi7DgC3tef3RhEy0Ub+XL/ocMxZCG51J6zznmJrvx0 mwflBNqIkPJ4ko6/c88nKo6Oq1BSbxdCF2lp4LSPj2d3t2VQdic+cWKMSnh3DxMUT/oVdut6s1t glaVxdnDwS1cjYrpnssnsHR8pwAONV30mOLfgFq6+Rg+J50fsIUB01KJwijaZT3GSexSjgizkUH CBpqv0qywHL3eLsHPF+w/+sXQXXlK0iSmxVHGJeYqm+kDV0tTXgWe0O3iUQVY+izP+GkEcNLKIj cez8SbUyI/tLKpGjoM/dWiPnlHhVMrbnzq1Mx49+FPps4j7b1IdYcFVOwZh1ebU02F4IdwT9Au6 miI7/l6aZzagjVrjt5A== X-Proofpoint-GUID: 5XZ7vEEnipWuh5u6uePOCbslF0vmvILy X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI4MDAyMCBTYWx0ZWRfXyN1Ua2IQy42+ 51+tsu6XWqhtuUfeCern8n52jASxIE7zmh5BDWKVVOoLh+QbSKCib4WNi9s8yccuc9J10wWHUk9 gr6JNLJ6/H7s6J+90Phjysv/SX5If5k= X-Proofpoint-ORIG-GUID: 5XZ7vEEnipWuh5u6uePOCbslF0vmvILy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-28_02,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 phishscore=0 clxscore=1011 bulkscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610280020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=harshpb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1793164889529158500 Content-Type: text/plain; charset="utf-8" From: Chinmay Rath vscsi_send_adapter_info() used the guest-supplied common.length field directly as the size argument to spapr_vio_dma_write(). Since common.length is controlled by the guest, a value larger than sizeof(struct mad_adapter_info_data) (148 bytes) caused dma_memory_write() to read past the end of the stack-allocated info struct, leaking arbitrary host stack contents into guest memory. Fix this by clamping the write length to sizeof(info), then using spapr_vio_dma_set() to zero-fill any remaining bytes the guest requested beyond that size. This mirrors the existing pattern in vscsi_send_capabilities(). Closes: https://gitlab.com/qemu-project/qemu/-/work_items/4626 Reported-by: Guthrie McAfee Armstrong Signed-off-by: Chinmay Rath Reviewed-by: Gautam Menghani Tested-by: Gautam Menghani Link: https://lore.kernel.org/qemu-devel/20261007144434.374749-1-rathc@linu= x.ibm.com Signed-off-by: Harsh Prateek Bora --- hw/scsi/spapr_vscsi.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index b4c8f94d22..7ec780da79 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -966,6 +966,8 @@ static int vscsi_send_adapter_info(VSCSIState *s, vscsi= _req *req) { struct viosrp_adapter_info *sinfo; struct mad_adapter_info_data info; + uint16_t len, req_len; + uint64_t buffer; int rc; =20 sinfo =3D &req_iu(req)->mad.adapter_info; @@ -985,11 +987,23 @@ static int vscsi_send_adapter_info(VSCSIState *s, vsc= si_req *req) info.os_type =3D cpu_to_be32(2); info.port_max_txu[0] =3D cpu_to_be32(VSCSI_MAX_SECTORS << 9); =20 - rc =3D spapr_vio_dma_write(&s->vdev, be64_to_cpu(sinfo->buffer), - &info, be16_to_cpu(sinfo->common.length)); + req_len =3D len =3D be16_to_cpu(sinfo->common.length); + buffer =3D be64_to_cpu(sinfo->buffer); + if (len > sizeof(info)) { + fprintf(stderr, "vscsi_send_adapter_info: adapter info size mismat= ch !\n"); + /* + * Just read and populate the structure that is known. + * Zero rest of the structure. + */ + len =3D sizeof(info); + } + rc =3D spapr_vio_dma_write(&s->vdev, buffer, &info, len); if (rc) { fprintf(stderr, "vscsi_send_adapter_info: DMA write failure !\n"); } + if (req_len > len) { + spapr_vio_dma_set(&s->vdev, (buffer + len), 0, (req_len - len)); + } =20 sinfo->common.status =3D rc ? cpu_to_be32(1) : 0; =20 --=20 2.52.0