[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xenctrl_stubs.c: fix NULL dereference
- To: Jan Beulich <jbeulich@xxxxxxxx>, Edwin Török <edvin.torok@xxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 3 Aug 2023 13:51:20 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Yw34/tIROxtCDfAjyyNkLhBW3hDuKbFih0AXS74ocU4=; b=Idu4DWiD7r7BJ5xrijCTobw+0tgvyx10qx+YrqlRWPpPnGK2fxpbUp5zCS8kTQqhOT7s7Gvq9DHbKItjIXdLoIPIbYEfL3Ccu5cEeN0TpF6MU+jlE379jTTYLsohcEpYQDJnxk5xwXDNKDO2LIhcS7Q8anoH1NNYvvB686W2MuEWsRRs1G/pKr+iz+k+u3pyIVUl/+FlRXHoHkuXP056kANkZP18ly5ikpur3o2iDbWnpWLhNfoW8NtePGyx+67IGgb97JjYFQAZWlWpV9yXvhs5fuU8LJgNtgLPPMGAi72dikYNY8MISkGS70Fxc/cGlOOxZg51IbRIp+K+Qqbd9g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nMl8J6+rmgJOM+vwXFvNL/nqhnNxIbosCWwQhzZ/SZuRUaJ/eOrC4mvt8Ko1OO7eIGEp2D+3qUtKxOIaX0uRvJ+Q76vmfp8XrX9xWm/UDOZIAY14WS96/QUl4HppQ2TMvh5Kag6OHSg1nqdrMsZiARByvUZHEtH9T1LQmYfgcuBBYgckyzYYuj2rwR4HvmADvh3PdW6cluFtUlrXniL1xc4zM0IM488U4veKidU9XftkKpgNMwGAMNJ1whz+55nGb8reBiOS6NSs8orHI9eJbB+v1LF16K5UxRzYfGR/cBTPGNTF0xT277dcezowzQyx7Ys7YGUtE0OrBPALSPYVmQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Edwin Török <edwin.torok@xxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 03 Aug 2023 12:51:43 +0000
- Ironport-data: A9a23:SgTkLKid4bZWQAs1IcwpVwUjX161tREKZh0ujC45NGQN5FlHY01je htvWTuGP/eIMWD9fNsiO9i0oUhSvJGHyt9jSgJo+Sg0Qigb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT7AeFzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQYF3cWVCKipNmv7+q5Utlop8YlNpDSadZ3VnFIlVk1DN4AaLWaGuDgw48d2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilEhluGzYbI5efTTLSlRtm+eq njL4CLSBRYCOcbE4TGE7mitlqnEmiaTtIc6TeTnrqA32ALOroAVIEMcBHG5m7qWs0OFYNVTO kwPpy5xkpFnoSRHSfG4BXVUukWsvBQRRt5RGO0S8xyWx+zf5APxLmUIUT9HLsAhrsg1bTcu0 UKF2djuAFRHvLSLRFqH+7yTrDf0PjIaRUcdYQcUQA1D5MPsyKkjgxSKQtt9HaqditzuBSq20 z2MtDI5hbgYkYgMzarTwLzcqzelp5yMRAhl4AzSBzuh9lkgOt/jYJG041/G6/oGNJyeUlSKo HkDnY6Z8fwKCpaO0ieKRY3hAY2U2hpMCxWE6XYHInXr323FF6KLFWyI3AxDGQ==
- Ironport-hdrordr: A9a23:E8+enauQsbxWodBuh8sM23ZW7skDctV00zEX/kB9WHVpm5qj5q STdZUgtSMc5wx7ZJhNo7q90cq7IE80l6Qb3WBLB8bGYOCOggLBEGgF1+bfKlbbdREWmNQw6U /OGZIOb+EZoTJB/KXHCKjTKadD/OW6
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03/08/2023 11:15 am, Jan Beulich wrote:
> On 13.07.2023 10:30, Edwin Török wrote:
>> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
>> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
>> @@ -832,7 +832,7 @@ CAMLprim value physinfo_arch_caps(const xc_physinfo_t
>> *info)
>>
>> tag = 1; /* tag x86 */
>>
>> - arch_obj = Tag_cons;
>> + arch_obj = Val_emptylist;
>>
>> #endif
>>
> Since, aiui, this also affects 4.17, but the patch as is doesn't apply
> there, could you please provide a suitable backport of what went onto
> the master branch?
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c
b/tools/ocaml/libs/xc/xenctrl_stubs.c
index facb5615776b..7de2ff544428 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -748,7 +748,7 @@ CAMLprim value stub_xc_physinfo(value xch)
Store_field(physinfo, 9, Val_int(c_physinfo.max_cpu_id + 1));
#if defined(__i386__) || defined(__x86_64__)
- arch_cap_list = Tag_cons;
+ arch_cap_list = Val_emptylist;
arch_cap_flags_tag = 1; /* tag x86 */
#else
This logic got factored out of stub_xc_physinfo() into the new
physinfo_arch_caps() as part of the ARM SVE work in 4.18.
~Andrew
|