From nobody Thu Aug 13 09:15:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=cit.tum.de ARC-Seal: i=1; a=rsa-sha256; t=1786315149; cv=none; d=zohomail.com; s=zohoarc; b=fMreeNu758jL3A4AUZofgTqCdY4INFlFVAKexULn2X2FTo48bV6WvYQWc4TC3zmLWxW8DnxankMJSCxcW56TETDBsz8ZlUdKAlX473WtKS/jm19a0bbr+bJfEGU9vebrb/pdZAVCZQenwj/VZ9Vb1x9GHR95SU/blPp2WkIPE1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1786315149; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eWB0xF/Ua9gI7/dD9vLvBWcZzJ0BdDJBvA6sapEdlxU=; b=gxyBDXC1dv7zOrkDa9huPQ71TiI4WLUMHtcSuHDlVWfBLC+wuRzJDNZBN3YINaYYsaGF+Xv38HydvHAYxUGnn0GllBa0h8ayeN1CmAL3Kk08R8s0qcQCp/6j5cCePK7rvR1i5kSLqynXDn3uf0wuEe0DXMLi4A2aXblTtDNYcc4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 178631514901524.163934830901553; Sun, 9 Aug 2026 15:39:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1387167.1628474 (Exim 4.92) (envelope-from ) id 1wtC9z-0007eK-3i; Sun, 09 Aug 2026 22:38:27 +0000 Received: by outflank-mailman (output) from mailman id 1387167.1628474; Sun, 09 Aug 2026 22:38:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wtC9y-0007e9-V5; Sun, 09 Aug 2026 22:38:26 +0000 Received: by outflank-mailman (input) for mailman id 1387167; Sun, 09 Aug 2026 22:38:25 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wtC9w-0007e3-Ga for xen-devel@lists.xenproject.org; Sun, 09 Aug 2026 22:38:25 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wtC9u-00CROE-KE for xen-devel@lists.xenproject.org; Mon, 10 Aug 2026 00:38:22 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a790098-2eae-0a2a0a5409dd-0a2a4502bc58-30 for ; Mon, 10 Aug 2026 00:38:22 +0200 Received: from [131.159.0.202] (helo=mailout2.rbg.tum.de) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a79015d-6ca4-0a2a45020019-839f00cab431-3 for ; Mon, 10 Aug 2026 00:38:21 +0200 Received: from mailrelay1n.ito.cit.tum.de (mailrelay1.in.tum.de [IPv6:2a09:80c0:254::14]) by mailout2.rbg.tum.de (Postfix) with ESMTPS id 8515E4C0240; Mon, 10 Aug 2026 00:38:21 +0200 (CEST) Received: from mail.in.tum.de (mailproxy.in.tum.de [IPv6:2a09:80c0::78]) by mailrelay1n.ito.cit.tum.de (Postfix) with ESMTPS id 4hJCTT2g9qz2xRH; Mon, 10 Aug 2026 00:38:21 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id 55F894A03EE; Mon, 10 Aug 2026 00:38:21 +0200 (CEST) Received: (Authenticated sender: hoepf) by mail.in.tum.de (Postfix) with ESMTPSA id 030B74A008B; Mon, 10 Aug 2026 00:38:20 +0200 (CEST) (Extended-Queue-bit xtech_zn@fff.in.tum.de) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20220209 header.d=cit.tum.de header.i="@cit.tum.de" header.h="Date:From:To:Cc:Subject" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cit.tum.de; s=20220209; t=1786315101; bh=eWB0xF/Ua9gI7/dD9vLvBWcZzJ0BdDJBvA6sapEdlxU=; h=Date:From:To:Cc:Subject:From; b=TnMpww/Ilp+dvn2ZFWEpI6LGQ7bm0TCzfDvwr/HVki05fz/S1zXUx98gQCm5DQdaY 4tUq2wZA2y2h85+lrfQ6KjxDd9UhyCswyYqazCS5SxeMrzGVMmGcEDK7xj0lASBpAM /hL/aSEhbWoOOWDUd/6seLBfq3I4ukHttLCRqtSFzfk+U3qqwYa+kb34D3pF1p7/VO CX75jC47tMsxiBTAXAjMcU0/2YAGMDDaFtgeixVgb5H/mBckbk/UFS3GK6IOMD9w4x cUt9wG9kMZJsKfHUi1l4skAzFuZS/ARSZXG8OJYYmglTo5b35+bq7BK9ZKMok5FEFV IYl19WyXcJ96A== Date: Mon, 10 Aug 2026 00:38:19 +0200 From: Johann =?utf-8?Q?H=C3=B6pfner?= To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , Roger Pau =?utf-8?B?TW9ubsOp?= , Teddy Astie Subject: [PATCH] x86/domctl: Fix unitialized copyback in XEN_DOMCTL_PSR_GET_* Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 1.5.3 at itovm121 X-Virus-Status: Clean X-purgate-ID: tlsNG-720697/1786315102-F12A12AC-150EB9B3/0/0 X-purgate-type: clean X-purgate-size: 1148 X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.10.1.5.2/286.308.97 X-ZohoMail-DKIM: pass (identity @cit.tum.de) X-ZM-MESSAGEID: 1786315150333158500 domctl_psr_get_val() copies unitialized stack space back if psr_get_val fails. Fix by zero-initializing v_. Fixes: 03f30dc193c8 ("x86: refactor psr: L3 CAT: implement get value flow.") Signed-off-by: Johann H=C3=B6pfner Reviewed-by: Jan Beulich --- Consider instead removing the local variable indirection introduced by 03f30dc193c8 and passing &(domctl)->u.psr_alloc.data to psr_get_val instead or only conditionally setting copyback true. xen/arch/x86/domctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index f26990208d..6e42fa383c 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1347,7 +1347,7 @@ long arch_do_domctl( break; =20 #define domctl_psr_get_val(d, domctl, type, copyback) ({ \ - uint32_t v_; \ + uint32_t v_ =3D 0; \ int r_ =3D psr_get_val((d), (domctl)->u.psr_alloc.target, \ &v_, (type)); \ \ --=20 2.53.0