{"id":805218,"url":"http://patchwork.ozlabs.org/api/1.2/patches/805218/?format=json","web_url":"http://patchwork.ozlabs.org/project/skiboot/patch/20170824031652.17567-1-stewart@linux.vnet.ibm.com/","project":{"id":44,"url":"http://patchwork.ozlabs.org/api/1.2/projects/44/?format=json","name":"skiboot firmware development","link_name":"skiboot","list_id":"skiboot.lists.ozlabs.org","list_email":"skiboot@lists.ozlabs.org","web_url":"http://github.com/open-power/skiboot","scm_url":"http://github.com/open-power/skiboot","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170824031652.17567-1-stewart@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-08-24T03:16:52","name":"[v3,02/13] test/mem_region: fix incorrect ibm, os-reserve region length","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"80cf83c3d828608bc1ff804e76f46998e03184c4","submitter":{"id":48041,"url":"http://patchwork.ozlabs.org/api/1.2/people/48041/?format=json","name":"Stewart Smith","email":"stewart@linux.vnet.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/skiboot/patch/20170824031652.17567-1-stewart@linux.vnet.ibm.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/805218/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/805218/checks/","tags":{},"related":[],"headers":{"Return-Path":"<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","skiboot@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","skiboot@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xd8bx5J7Bz9t2K\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 13:17:17 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xd8bx3WkXzDrKp\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 13:17:17 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xd8bh2BNJzDrJr\n\tfor <skiboot@lists.ozlabs.org>; Thu, 24 Aug 2017 13:17:03 +1000 (AEST)","from pps.filterd (m0098404.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7O3GNfN053150\n\tfor <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 23:17:01 -0400","from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2chjyectjj-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 23:17:01 -0400","from localhost\n\tby e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <stewart@linux.vnet.ibm.com>;\n\tWed, 23 Aug 2017 21:17:00 -0600","from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18)\n\tby e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 23 Aug 2017 21:16:58 -0600","from b03ledav002.gho.boulder.ibm.com\n\t(b03ledav002.gho.boulder.ibm.com [9.17.130.233])\n\tby b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7O3GwxV64749670; Wed, 23 Aug 2017 20:16:58 -0700","from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id E460B13603C;\n\tWed, 23 Aug 2017 21:16:57 -0600 (MDT)","from birb.localdomain (unknown [9.81.221.211])\n\tby b03ledav002.gho.boulder.ibm.com (Postfix) with SMTP id 12FFB13603A;\n\tWed, 23 Aug 2017 21:16:56 -0600 (MDT)","by birb.localdomain (Postfix, from userid 1000)\n\tid 393E24F1185; Thu, 24 Aug 2017 13:16:53 +1000 (AEST)"],"From":"Stewart Smith <stewart@linux.vnet.ibm.com>","To":"skiboot@lists.ozlabs.org","Date":"Thu, 24 Aug 2017 13:16:52 +1000","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170823072123.18769-3-stewart@linux.vnet.ibm.com>","References":"<20170823072123.18769-3-stewart@linux.vnet.ibm.com>","X-TM-AS-GCONF":"00","x-cbid":"17082403-8235-0000-0000-00000C2A3C2D","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007600; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000224; SDB=6.00906769; UDB=6.00454515;\n\tIPR=6.00686970; \n\tBA=6.00005550; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016839;\n\tXFM=3.00000015; UTC=2017-08-24 03:16:59","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17082403-8236-0000-0000-00003D5BCCD5","Message-Id":"<20170824031652.17567-1-stewart@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-24_01:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708240051","Subject":"[Skiboot] [PATCH v3 02/13] test/mem_region: fix incorrect ibm,\n\tos-reserve region length","X-BeenThere":"skiboot@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Mailing list for skiboot development <skiboot.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/skiboot/>","List-Post":"<mailto:skiboot@lists.ozlabs.org>","List-Help":"<mailto:skiboot-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"},"content":"We were reserving all of memory up to the heap, which is fine\n*unless* the system libc chooses to allocate something in that\nblock of memory that we use, which means we have overlapping\nregions and general pain.\n\nThis should fix failing unit tests on some systems (e.g. Debian)\n\nSigned-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>\n---\n core/test/run-mem_region_release_unused.c         | 2 +-\n core/test/run-mem_region_release_unused_noalloc.c | 6 +++---\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\n---\nChanges since v2:\n- We don't actually need the heap when allocating nothing, and this\n  makes us immune to libc being libc.","diff":"diff --git a/core/test/run-mem_region_release_unused.c b/core/test/run-mem_region_release_unused.c\nindex 886585b296cc..712f98ab1985 100644\n--- a/core/test/run-mem_region_release_unused.c\n+++ b/core/test/run-mem_region_release_unused.c\n@@ -113,7 +113,7 @@ int main(void)\n \t/* Use malloc for the heap, so valgrind can find issues. */\n \tskiboot_heap.start = (unsigned long)malloc(TEST_HEAP_SIZE);\n \tskiboot_heap.len = TEST_HEAP_SIZE;\n-\tskiboot_os_reserve.len = skiboot_heap.start;\n+\tskiboot_os_reserve.len = 0;\n \n \tdt_root = dt_new_root(\"\");\n \tdt_add_property_cells(dt_root, \"#address-cells\", 2);\ndiff --git a/core/test/run-mem_region_release_unused_noalloc.c b/core/test/run-mem_region_release_unused_noalloc.c\nindex 2a9f641148ff..a79485b176bc 100644\n--- a/core/test/run-mem_region_release_unused_noalloc.c\n+++ b/core/test/run-mem_region_release_unused_noalloc.c\n@@ -110,9 +110,10 @@ int main(void)\n \tconst char *last;\n \n \t/* Use malloc for the heap, so valgrind can find issues. */\n-\tskiboot_heap.start = (unsigned long)malloc(TEST_HEAP_SIZE);\n+\tskiboot_heap.start = 0;\n \tskiboot_heap.len = TEST_HEAP_SIZE;\n-\tskiboot_os_reserve.len = skiboot_heap.start;\n+\tskiboot_os_reserve.start = 0;\n+\tskiboot_os_reserve.len = 0;\n \n \tdt_root = dt_new_root(\"\");\n \tdt_add_property_cells(dt_root, \"#address-cells\", 2);\n@@ -163,6 +164,5 @@ int main(void)\n \t}\n \n \tdt_free(dt_root);\n-\tfree((void *)(long)skiboot_heap.start);\n \treturn 0;\n }\n","prefixes":["v3","02/13"]}