Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B3AAC64EC3 for ; Tue, 31 Jan 2023 21:29:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.487846.755566 (Exim 4.92) (envelope-from ) id 1pMyC4-0000Xl-Mc; Tue, 31 Jan 2023 21:29:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 487846.755566; Tue, 31 Jan 2023 21:29:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pMyC4-0000VT-Iw; Tue, 31 Jan 2023 21:29:32 +0000 Received: by outflank-mailman (input) for mailman id 487846; Tue, 31 Jan 2023 21:29:31 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pMyC3-0000Nb-Kh for xen-devel@lists.xenproject.org; Tue, 31 Jan 2023 21:29:31 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 58507d6a-a1ae-11ed-933c-83870f6b2ba8; Tue, 31 Jan 2023 22:29:29 +0100 (CET) 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" X-Inumbo-ID: 58507d6a-a1ae-11ed-933c-83870f6b2ba8 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1675200569; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9v262fZBQ7E8UCWSJDzUn+RbfirFU1mUCzn0CR2PL+s=; b=FZU6LUFluLsEPZGYeWsR0ve0BwgE7Md93X3quPkb9QRpWdqmn+ORviJQ rkyq61/amgAV9TGgWYpTI1tPI+tFpCoLc9ABZ4zPzITKzrQ15SS/Gvf8l d+MlYYytf2U4pTb3bowI5FjJR5SPl4oGMwc8TyHbPge3tK7y2poF8Cd5x s=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 95499177 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:GnY/TaO4PKcnpcDvrR2kl8FynXyQoLVcMsEvi/4bfWQNrUp03jQEm mZOWWmHbv7eMzOkfY9xaoWxoBhQ65HQzdMwGwto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9Suv3rRC9H5qyo42tB5QVmPpingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0s9vJDl8s t4GESkEYxyn3L6f8oCqc8A506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLoXmuuyi2a5WDpfsF+P/oI84nTJzRw327/oWDbQUo3XGZQExxnHz o7A10CnBiEfDfGk9SGI3Sy0rf7+kBOlVJ1HQdVU8dY12QbOlwT/EiY+RVa95PW0lEO6c9ZeM FAPvDojq7Ao806mRcW7WAe3yFaItwARc8BdGOo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x2VipUCHaPbBCP2iIp4/84b0z6u3vcJsUzIEqkJ CEVF9Dr2Y9d0/nFMXLhfRwg2bwaXT4WS6oxtBV5pB/tLG5TL33MTebQFRrl8e7uf0QDsDSRv 72MpNLBP3oK3foBO9yrnrDcogXLWNbXNweu949VV7LqsXXKpfyvuiea/rXLKqFK0dWZoo+OA pyYNHeHrQw0qnwYA6GvPH4YQKSRnDC X-IronPort-AV: E=Sophos;i="5.97,261,1669093200"; d="scan'208";a="95499177" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Christian Lindig , David Scott , =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= , Rob Hoes Subject: [PATCH 0/7] tools/ocaml: Memory corruption fixes in bindings Date: Tue, 31 Jan 2023 21:29:06 +0000 Message-ID: <20230131212913.6199-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit It turns out there have been some latent memory corruption bugs and other errors in the bindings since they were first introduced. These were discovered after realising that we'd introduced other memory corruption bugs as part of the Ocaml 5 fixes, and in the case of the evtchn bindings, backported this as part of the oxenstored-lu fixes. This series addresses all the memory corrupution issues we're aware of that can occur in an entirely well-formed program. Deferred for now are the (hopefully latent) memory corruption errors which happen due to bad parameter passing, and a substantial pile of related cleanup. Andrew Cooper (3): tools/ocaml/libs: Allocate the correct amount of memory for Abstract_tag tools/ocaml/evtchn: Misc cleanup tools/ocaml/xc: Don't reference Abstract_Tag objects with the GC lock released Edwin Török (4): tools/ocaml/libs: Don't declare stubs as taking void tools/ocaml/evtchn: Don't reference Custom objects with the GC lock released tools/ocaml/xc: Fix binding for xc_domain_assign_device() tools/ocaml/xc: Don't reference Custom objects with the GC lock released tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 89 ++--- tools/ocaml/libs/mmap/Makefile | 2 + tools/ocaml/libs/mmap/xenmmap_stubs.c | 6 +- tools/ocaml/libs/xb/xenbus_stubs.c | 5 +- tools/ocaml/libs/xc/xenctrl_stubs.c | 494 ++++++++++++++------------ 5 files changed, 323 insertions(+), 273 deletions(-) -- 2.11.0