From patchwork Tue Sep 27 11:14:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 12990424 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 34795C6FA83 for ; Tue, 27 Sep 2022 11:15:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.412493.655862 (Exim 4.92) (envelope-from ) id 1od8Z1-00005R-3J; Tue, 27 Sep 2022 11:15:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 412493.655862; Tue, 27 Sep 2022 11:15:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Z0-0008WS-SR; Tue, 27 Sep 2022 11:15:46 +0000 Received: by outflank-mailman (input) for mailman id 412493; Tue, 27 Sep 2022 11:15:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Yz-0008Aw-Jp for xen-devel@lists.xenproject.org; Tue, 27 Sep 2022 11:15:45 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b9793d31-3e55-11ed-9374-c1cf23e5d27e; Tue, 27 Sep 2022 13:15:43 +0200 (CEST) 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: b9793d31-3e55-11ed-9374-c1cf23e5d27e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1664277343; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FqKJptP8xI/gmJSM9NBmTiySQIrCF/7zJnDRHUkHENk=; b=Xh0EI/pzQxXFO2fd9vtR1wkPdePf/aZv5ZblcUfEiqxy7QgGgN2jyhOL pZINNqoCHNBYNerd1br7FS1GDffQqESDgJ68Y1oLOWZBNVW3iv0NI7vFO Q4Y8MvasytlBAc9eWu5oF5zYx6GHgAaqQV2AUrAzPA/DaFgeeOQ9QgpVw k=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80557651 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:p5GegKhmwqdAvJVQN7shVlGpX161HxAKZh0ujC45NGQN5FlHY01je htvUGGDPq6PNGuheN0kbI7i/UoG68XXx4c2HAFoq3hgEC0b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrSCYkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UgHUMja4mtC5ARvP68T5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUBxp M0WFC4yVDKOm72Y0KyQV+1voP12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKQOHWjOX9OYH46tOqkmHj5NSFfslWWjaE2/3LS3Ep6172F3N/9KoTXGJoLwx/wS mTu3z/TBEAYDuOl2AXe4HW02M7mwXKhcddHfFG/3qEz2wDCroAJMzUJUXOrrP//jVSxM/pTI lIZ0jAjpq8z8AqsVNaVdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QbWNQeHGJwk AXTxpWwWGIp4Ob9pW+hGqm8jAzjCCYpM1A4RyIYEiUV/fL+pIIVt0eaJjp8K5KdgtrwEDD25 jmFqikimrke5fI2O7WHEUPv2Gz1+MWQJuIhzkCOBz/+sFslDGKwT9bwgWU3+8qsO2pworOpm HEf0/aT4+kVZX1mvHzcGb5ddF1FChvsDdE9vbKNN8N5n9hO0yT5FWy13N2ZDBgBDyr8UWW1C HI/QCsIjHOpAFOkbLVsf6W6ANkwwK7rGLzND66KMoAXPcUgJF7frUmCgHJ8OEiy+HXAbIllY cvLGSpSJS9y5VtbIMqeGL5GjO5DKtEWzmLPX5HrpymaPU6lTCfMEd843K6mNL9RAFWs/FqIq L6y9qKil31ibQEJSnKOqdJOcQ1WRZX5bLivw/Fqmie4ClIOMAkc5zX5mNvNp6QNc3xpq9r1 IronPort-HdrOrdr: A9a23:hQSZ8KEbDG6WbLAOpLqE0seALOsnbusQ8zAXP0AYc31om6uj5r iTdZUgpGbJYVkqKRIdcLy7V5VoBEmskaKdgrNhW4tKPjOW2ldARbsKheCJrlHd8m/Fh4lgPM 9bAtND4bbLbWSS4/yV3ODBKadE/OW6 X-IronPort-AV: E=Sophos;i="5.93,349,1654574400"; d="scan'208";a="80557651" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , Wei Liu , Anthony PERARD Subject: [PATCH v2 1/5] tools/ocaml/Makefile.rules: do not run ocamldep on distclean Date: Tue, 27 Sep 2022 12:14:57 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Edwin Török --- tools/ocaml/Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules index 0d3c6ac839..e0b9de34e4 100644 --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -44,7 +44,7 @@ META: META.in ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS)) -ifneq ($(MAKECMDGOALS),clean) +ifeq (,$(findstring clean,$(MAKECMDGOALS))) .ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile $(OCAML_TOPLEVEL)/Makefile.rules $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,) endif From patchwork Tue Sep 27 11:14:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 12990425 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 E68E8C54EE9 for ; Tue, 27 Sep 2022 11:15:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.412492.655858 (Exim 4.92) (envelope-from ) id 1od8Z0-0008UU-Nm; Tue, 27 Sep 2022 11:15:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 412492.655858; Tue, 27 Sep 2022 11:15:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Z0-0008UN-K8; Tue, 27 Sep 2022 11:15:46 +0000 Received: by outflank-mailman (input) for mailman id 412492; Tue, 27 Sep 2022 11:15:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Yy-0008Aw-VC for xen-devel@lists.xenproject.org; Tue, 27 Sep 2022 11:15:44 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ba0b8664-3e55-11ed-9374-c1cf23e5d27e; Tue, 27 Sep 2022 13:15:43 +0200 (CEST) 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: ba0b8664-3e55-11ed-9374-c1cf23e5d27e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1664277343; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i9j+DS3NCVDB/s2QnXaos+vP3Fy3tX4CBUXsBsSBVAM=; b=HBO9s75+laZrXv27uVVi1ge38CVQaNrjuB6O82F7/0FOVov7pHRTQ6ak eBZA2OtEdZhHGVOgAZDk14emjf5UilVdiXifM4MJTe+8N5y0hDamxb9t7 22YZc1JMv/h2+dEP9H/GNGa3pMTyxdkxXkKcwvRGlp5OJI6SsUp2lcD0u Y=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 83941731 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:8CpxNKhq1oOJ9R5TrLC4RYibX161HxAKZh0ujC45NGQN5FlHY01je htvXmiDbP+CYTake98jPNuy9R9TsJ/WyddrSwduqH1nRCkb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrSCYkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UgHUMja4mtC5ARvP68T5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KURE+ f8ALi0KUhG43tm62Y2DEPRKxf12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKQOHWjOX9OYH46tOqkmHj5NSFfslWWjaE2/3LS3Ep6172F3N/9KofbGZwKxR/wS mTuzXrSRTolbvGkyxG4+1Osp77yxCz/YddHfFG/3qEz2wDCroAJMzUJUXOrrP//jVSxM/pTI lIZ0jAjpq8z8AqsVNaVdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QbWNQeHGJwk AXTxpWwWGIp4Ob9pW+hGqm8iDm+OjATMGg+ZBRddgcc3OG5vadwt0eaJjp8K5KdgtrwEDD25 jmFqikimrke5fI2O7WHEUPv2Gz1+MWQJuIhzkCOBz/+sFslDGKwT9bwgWU3+8qsO2pworOpm HEf0/aT4+kVZX1mvHzcGb5ddF1FChvsDdE9vbKNN8N5n9hO0yT5FWy13N2ZDBgBDyr8UWW1C HI/QCsIjHOpAFOkbLVsf6W6ANkwwK7rGLzND66KMoAXPcUgJF7frUmCgHJ8OEiy+HXAbIllY cvLGSpSJS9y5VtbIMqeGL5GjO5DKtEWzmLPX5HrpymaPU6lTCfMEd843K6mNL9RAFWs/FqIq L6y9qKil31ibQEJSnKOqdJOcQ1WRZX5bLivw/Fqmie4ClIOMAkc5zX5m9vNp6QNc3xpq9r1 IronPort-HdrOrdr: A9a23:/1VZrqpYxodFXY5py2WofDAaV5oTeYIsimQD101hICG8cqSj+f xG+85rrCMc6QxhPk3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaXN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.93,349,1654574400"; d="scan'208";a="83941731" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , Wei Liu , Anthony PERARD Subject: [PATCH v2 2/5] tools/ocaml/Makefile.rules: hide -include on *clean Date: Tue, 27 Sep 2022 12:14:58 +0100 Message-ID: <074e66ae5f53522361ff0fdae105a3b7f70de0d4.1664276827.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Edwin Török --- tools/ocaml/Makefile.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules index e0b9de34e4..39ac260a4d 100644 --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -44,10 +44,8 @@ META: META.in ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS)) -ifeq (,$(findstring clean,$(MAKECMDGOALS))) .ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile $(OCAML_TOPLEVEL)/Makefile.rules $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,) -endif clean: $(CLEAN_HOOKS) $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make META @@ -94,7 +92,9 @@ define C_PROGRAM_template $(call quiet-command, $(CC) $(LDFLAGS) -o $$@ $$+,BIN,$$@) endef +ifeq (,$(findstring clean,$(MAKECMDGOALS))) -include .ocamldep.make +endif $(foreach lib,$(OCAML_LIBRARY),$(eval $(call OCAML_LIBRARY_template,$(lib)))) $(foreach lib,$(OCAML_NOC_LIBRARY),$(eval $(call OCAML_NOC_LIBRARY_template,$(lib)))) From patchwork Tue Sep 27 11:14:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 12990422 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 9A2A1C07E9D for ; Tue, 27 Sep 2022 11:15:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.412491.655847 (Exim 4.92) (envelope-from ) id 1od8Yz-0008Cf-E2; Tue, 27 Sep 2022 11:15:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 412491.655847; Tue, 27 Sep 2022 11:15:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Yz-0008CY-BA; Tue, 27 Sep 2022 11:15:45 +0000 Received: by outflank-mailman (input) for mailman id 412491; Tue, 27 Sep 2022 11:15:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Yy-0008Aw-Dw for xen-devel@lists.xenproject.org; Tue, 27 Sep 2022 11:15:44 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b895e39a-3e55-11ed-9374-c1cf23e5d27e; Tue, 27 Sep 2022 13:15:42 +0200 (CEST) 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: b895e39a-3e55-11ed-9374-c1cf23e5d27e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1664277342; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FDvDgX7AxBcpgWMVzYo5l6lVSFhVUQDnFTbkDG8AAP4=; b=VfzeFkjrp58JMhRmLOKVq1oOdeYS1HPmeik4NCDGNQYoYbECgkH0sAG4 VvzOkTS6VZUF8/Hm2OnvO4DBU7jD/oUIZxhbDNDzS8R07OaD6+H6dY0Fe N1FzxTPmoxfkyq0HT5aPrGTqdLYdKjIkD5WrlgKWB9HfXwH8aoSb2JcM1 M=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 83941730 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:OuIcr643ljqtc0Opum9JfQxRtEfHchMFZxGqfqrLsTDasY5as4F+v jRKXWzQP/uOMzPzLt53YYu2o0tT7ZODzNUwQVFr+yg9Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvymTras1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPYwP9TlK6q4mlA7wZhPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5FCkNSz 9xBdwwuLQq7vaWd7KmKVc9V05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpPE+ojx5nYz/7DLozkPmpgD/jdCdfq3qepLYt4niVxwt0uFToGIqOK4DTGp4N9qqej m7d7Vb9GzsYD4W86nmitWuvnv6VvyyuDer+E5Xnr6U30TV/3Fc7Fxk+RVa95/6jhSaWV9tBJ mQO9yEprKx081akJvHtUhv9rHOasxo0X9tLD/Z8+AyL0rDT4QuSGi4DVDEpVTA9nJZoH3pwj AbPxo63Q2w02FGIdZ6D3oWfjy+IGXFKEUxBfxc+CiAp+Oj8hrhm23ojUe1fOKKyi9T0HxT5z DaLsDUyit0vsCIb60mo1QuZ2mzx//AlWiZwv1yKBTz9smuVcab/P+SVBU7nAeGsxWpzZn2Ip zA6lseX94ji5rndxXXWEI3h8FxEjstp0QEwY3Y1R/HNFBz3oRZPmLy8BxkhTHqFyu5eJVfUj Lb74Gu9HqN7MnqwdrNQaImsEcksxqWIPY27CKyON4UTM8ggLF7vEMRSiam4gAjQfLUEy/lja f93j+71ZZrlNUiX5GXvHLpMuVPa7is/2XnSVfjG8vhT6pLHPSb9dFvwGAHRBgzPxP/b/V69H hc2H5fi9iizp8WlO3GLrNJOcTjn7xETXPjLliCeTcbbSiIOJY3rI6W5LW8JE2C9o5loqw== IronPort-HdrOrdr: A9a23:Up+ZiK/jWUvzldOMOFtuk+DiI+orL9Y04lQ7vn2YSXRuE/Bw8P re5MjztCWE8Qr5N0tQ+uxoVJPufZqYz+8Q3WBzB8bFYOCFghrLEGgK1+KLqFeMdxEWtNQtsp uIG5IOc+EYZmIbsS+V2meF+q4bsby6zJw= X-IronPort-AV: E=Sophos;i="5.93,349,1654574400"; d="scan'208";a="83941730" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , Wei Liu , Anthony PERARD Subject: [PATCH v2 3/5] tools/ocaml/libs/eventchn: do not leak event channels and OCaml 5.0 compat Date: Tue, 27 Sep 2022 12:14:59 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add a finalizer on the event channel value, so that it calls `xenevtchn_close` when the value would be GCed. In practice oxenstored seems to be the only user of this, and it creates a single global event channel only, but freeing this could still be useful when run with OCAMLRUNPARAM=c The code was previously casting a C pointer to an OCaml value, which should be avoided: OCaml 5.0 won't support it. (all "naked" C pointers must be wrapped inside an OCaml value, either an Abstract tag, or Nativeint, see the manual https://ocaml.org/manual/intfc.html#ss:c-outside-head) Signed-off-by: Edwin Török Acked-by: Christian Lindig --- tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/eventchn/xeneventchn_stubs.c b/tools/ocaml/libs/eventchn/xeneventchn_stubs.c index f889a7a2e4..67af116377 100644 --- a/tools/ocaml/libs/eventchn/xeneventchn_stubs.c +++ b/tools/ocaml/libs/eventchn/xeneventchn_stubs.c @@ -33,7 +33,30 @@ #include #include -#define _H(__h) ((xenevtchn_handle *)(__h)) +/* We want to close the event channel when it is no longer in use, + which can only be done safely with a finalizer. + Event channels are typically long lived, so we don't need tighter control over resource deallocation. + Use a custom block +*/ + +/* Access the xenevtchn_t* part of the OCaml custom block */ +#define _H(__h) (*((xenevtchn_handle**)Data_custom_val(__h))) + +static void stub_evtchn_finalize(value v) +{ + /* docs say to not use any CAMLparam* macros here */ + xenevtchn_close(_H(v)); +} + +static struct custom_operations xenevtchn_ops = { + "xenevtchn", + stub_evtchn_finalize, + custom_compare_default, /* raises Failure, cannot compare */ + custom_hash_default, /* ignored */ + custom_serialize_default, /* raises Failure, can't serialize */ + custom_deserialize_default, /* raises Failure, can't deserialize */ + custom_compare_ext_default /* raises Failure */ +}; CAMLprim value stub_eventchn_init(void) { @@ -48,7 +71,9 @@ CAMLprim value stub_eventchn_init(void) if (xce == NULL) caml_failwith("open failed"); - result = (value)xce; + /* contains file descriptors, trigger full GC at least every 128 allocations */ + result = caml_alloc_custom(&xenevtchn_ops, sizeof(xce), 0, 1); + _H(result) = xce; CAMLreturn(result); } From patchwork Tue Sep 27 11:15:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 12990426 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 60D45C07E9D for ; Tue, 27 Sep 2022 11:15:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.412494.655868 (Exim 4.92) (envelope-from ) id 1od8Z1-0000IT-IP; Tue, 27 Sep 2022 11:15:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 412494.655868; Tue, 27 Sep 2022 11:15:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Z1-0000FD-E1; Tue, 27 Sep 2022 11:15:47 +0000 Received: by outflank-mailman (input) for mailman id 412494; Tue, 27 Sep 2022 11:15:46 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1od8Z0-0008Aw-Jz for xen-devel@lists.xenproject.org; Tue, 27 Sep 2022 11:15:46 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b9910872-3e55-11ed-9374-c1cf23e5d27e; Tue, 27 Sep 2022 13:15:44 +0200 (CEST) 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: b9910872-3e55-11ed-9374-c1cf23e5d27e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1664277344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EI190skp2HLPj9zpnRLco5ZASbbq/qUufYWOpErCNvM=; b=GVNIQf3I0LM+eqNrps+byviqavEBSGaZtrP0knvd7hutPQmjHELU5OjK UKDdMxydmLrmyjKbQLfIvucP6R4XrGCRzEyVpayA/2TFYKBpiykVKyRmf RDdTfT/sHK2mv080DNDV429XjXDE1WAIFIfJU8zgKZDCxLtRQh7yv1Agn 0=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81083781 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:36/VN6y4nGSVEvk/mE96t+dIxirEfRIJ4+MujC+fZmUNrF6WrkUBy GsbD2/UbqmLMGD0eohyboiwpEwE6JKBz941HQRp+CAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHPykYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFsMpvlDs15K6o4GJC4QRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw48FwDDxR1 94jAjFKV0Czh+asz7XqVbw57igjBJGD0II3v3hhyXfSDOo8QICFSKLPjTNa9G5u3IYUR6+YP pdHL2o0BPjDS0Qn1lM/BZ4gneHumn7ldD5wo1OJv6snpWPUyWSd1ZC9aYKFIYPaHK25mG6qr 3jIpGnyXisAC/GN7B2D+WCHoO7AyHaTtIU6S+Tjq68CbEeo7nMXIA0bUx28u/bRokK3Rd93M UEf/Ssq668o+ySDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJgOtc/R/6pVwH2Zzk AbUwZW5XlSDrYF5V1qE0bCZ8CyQGxM/LCg7NR8ESREK5Ij89dRbYg30cv5vF6u8j9vQED72w iyXoCVWu4j/nfLnxI3gowmZ3mvESozhC1dsu16JBj7NAhZRPtbNWmC+1bTMAR+sxq69R0LJg nULktP2AAsmXcDUz3zlrAng8diUCxe53N/02wYH83oJrW7FF5ufkWd4v1lDyL9BaJpsRNMQS Ba7VfltzJFSJmC2SqR8fpi8Dc8npYC5S4q5DKmLM4seM8AgHONiwM2JTRH44owQuBJ0zfFX1 WmzKK5A8kr2+Yw4lWHrFo/xIJcgxzwkxHO7eK0XOy+PiOPGDEN5vJ9fbzNimMhls/7fyOgUm v4DX/a3J+J3C7SmPnSLrNJ7wJJjBSFTOK0aYvd/LoarSjeK0kl7YxMN6dvNo7BYopk= IronPort-HdrOrdr: A9a23://nxoaiO/RlwLrJne6wMXW2sEnBQXuIji2hC6mlwRA09TySZ// rBoB19726MtN9xYgBHpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdWSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.93,349,1654574400"; d="scan'208";a="81083781" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , Wei Liu , Anthony PERARD Subject: [PATCH v2 4/5] tools/ocaml/libs/xc: OCaml 5.0 compatibility Date: Tue, 27 Sep 2022 12:15:00 +0100 Message-ID: <7b88cbda20e068bbce1c5dfb0a18af3f4e4b6865.1664276827.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Follow the manual to avoid naked pointers: https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head No functional change, except on OCaml 5.0 where it is a bugfix. Signed-off-by: Edwin Török Signed-off-by: Edwin Török Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl_stubs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index 19335bdf45..7ff4e00314 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -37,7 +37,7 @@ #include "mmap_stubs.h" -#define _H(__h) ((xc_interface *)(__h)) +#define _H(__h) *((xc_interface **) Data_abstract_val(__h)) #define _D(__d) ((uint32_t)Int_val(__d)) #ifndef Val_none @@ -70,14 +70,15 @@ static void Noreturn failwith_xc(xc_interface *xch) CAMLprim value stub_xc_interface_open(void) { CAMLparam0(); - xc_interface *xch; + CAMLlocal1(result); + result = caml_alloc(1, Abstract_tag); /* Don't assert XC_OPENFLAG_NON_REENTRANT because these bindings * do not prevent re-entrancy to libxc */ - xch = xc_interface_open(NULL, NULL, 0); - if (xch == NULL) + _H(result) = xc_interface_open(NULL, NULL, 0); + if (_H(result) == NULL) failwith_xc(NULL); - CAMLreturn((value)xch); + CAMLreturn(result); } From patchwork Tue Sep 27 11:15:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 12990423 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 66794C54EE9 for ; Tue, 27 Sep 2022 11:15:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.412490.655829 (Exim 4.92) (envelope-from ) id 1od8Ym-0007e7-6k; Tue, 27 Sep 2022 11:15:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 412490.655829; Tue, 27 Sep 2022 11:15: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 1od8Ym-0007dA-26; Tue, 27 Sep 2022 11:15:32 +0000 Received: by outflank-mailman (input) for mailman id 412490; Tue, 27 Sep 2022 11:15:30 +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 1od8Yk-0007aQ-BB for xen-devel@lists.xenproject.org; Tue, 27 Sep 2022 11:15:30 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b14c2f06-3e55-11ed-9648-05401a9f4f97; Tue, 27 Sep 2022 13:15:28 +0200 (CEST) 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: b14c2f06-3e55-11ed-9648-05401a9f4f97 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1664277329; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PA8SwB/EvHlNCm3CPVr6Dv8QaMWrEqHTBibfZeLpZrQ=; b=bg2v8w06Z0DCpgbYABuDdrN5x8S35H3y3z/ndKp6nVIPSuEQ0asw2hB3 5wO/N6SvYh/XWoNB6sTZfJ8OLwJ7ZvC5FjURV09AGLcrlpXgcnpmKq+Cz VslvjNtkxbBA6eBHybwcDAz9pNeRjqNhAZPwhJBW8/+8wvnm+iVqrMLou E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81413305 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:9abglqpLPTlzFuHWH9Dlo4pqBOheBmJnZRIvgKrLsJaIsI4StFCzt garIBmGOPqMajH0f94kbd/kox4BvJPTy4U2TVNorS49H3gQoJuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYGYpLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+55wehBtC5gZkPaER4weE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m6 8BfeAxObjW6u/Owy7KwE+BqtM8xFZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAi3XhcjsetFWPoqkf6GnP1g1hlrPqNbI5f/TaHJkMxR3A+ woq+UyhPxUxKO7DzgOE81f83eTvuz3jQqsrQejQGvlC3wTImz175ActfUS/iem0jAi5Qd03A 0Ad5CcGt6U5802vCN7nUHWQsHOC+xIRRddUO+k78x2WjLrZ5R6DAWoJRSIHb8Yp3PLaXhRzi AXPxYmwQ2Uy7vvFEhpx64t4sxusBW9FESwCQBY4XA0O49K6qYcBhQD2G4ML/LGOsvX5HjT5w javpSc4hqkOgcNj65hX7WwrkBr3+MGXE1ddChH/Gzv8s1gnPNLNi5mAswCz0BpWEGqOorBtV lAgktPW0u0BBIrleMelELRUR+HBCxpo3VThbb9T83sJrWzFF52LJ9o4DNRCyKBBba45lcfBO hO7hO+ozMY70IGWRaF2eZmtLM8h0LLtE9/oPtiNMIQSOMEuKV7XrXk/DaJ144wKuBdErE3CE c3DLZbE4YgyUMyLMwZat89CiOR2l0jSNEvYRIzhzgTP7IdykEW9EO5dWGZim8hjs8toVi2Jr IsEXyZLoj0DONDDjt7/qtdLcQ1WcCRT6FKfg5U/S9Nv6zFOQAkJY8I9C5t4E2C5t8y5Ttv1w 0w= IronPort-HdrOrdr: A9a23:vuTbzqMvuyJ0fcBcTvujsMiBIKoaSvp037Eqv3oRdfUzSL3hqy nOpoVj6faaskdzZJhNo7+90ey7MBfhHP1OkO8s1NWZLWvbUQKTRekIh+aP/9SjIVyYygc079 YaT0EUMr3N5DZB4/oSmDPIduod/A== X-IronPort-AV: E=Sophos;i="5.93,349,1654574400"; d="scan'208";a="81413305" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , Wei Liu , Anthony PERARD Subject: [PATCH v2 5/5] tools/ocaml/libs/{xb, mmap}: use Data_abstract_val wrapper Date: Tue, 27 Sep 2022 12:15:01 +0100 Message-ID: <58b6cb7c02d8b06d90dd419727572abb0cd41d75.1664276827.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 This is not strictly necessary since it is essentially a no-op currently: a cast to void* and value*, even in OCaml 5.0. However it does make it clearer that what we have here is not a regular OCaml value, but one allocated with Abstract_tag or Custom_tag, and follows the example from the manual more closely: https://v2.ocaml.org/manual/intfc.html#ss:c-outside-head It also makes it clearer that these modules have been reviewed for compat with OCaml 5.0. No functional change. Signed-off-by: Edwin Török --- tools/ocaml/libs/mmap/xenmmap_stubs.c | 2 +- tools/ocaml/libs/xb/xs_ring_stubs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/mmap/xenmmap_stubs.c b/tools/ocaml/libs/mmap/xenmmap_stubs.c index e2ce088e25..141dedb78c 100644 --- a/tools/ocaml/libs/mmap/xenmmap_stubs.c +++ b/tools/ocaml/libs/mmap/xenmmap_stubs.c @@ -28,7 +28,7 @@ #include #include -#define Intf_val(a) ((struct mmap_interface *) a) +#define Intf_val(a) ((struct mmap_interface *) Data_abstract_val(a)) static int mmap_interface_init(struct mmap_interface *intf, int fd, int pflag, int mflag, diff --git a/tools/ocaml/libs/xb/xs_ring_stubs.c b/tools/ocaml/libs/xb/xs_ring_stubs.c index 7a91fdee75..cc9114029f 100644 --- a/tools/ocaml/libs/xb/xs_ring_stubs.c +++ b/tools/ocaml/libs/xb/xs_ring_stubs.c @@ -35,7 +35,7 @@ #include #include "mmap_stubs.h" -#define GET_C_STRUCT(a) ((struct mmap_interface *) a) +#define GET_C_STRUCT(a) ((struct mmap_interface *) Data_abstract_val(a)) /* * Bytes_val has been introduced by Ocaml 4.06.1. So define our own version