| Message ID | 20260930084409.3965-2-muhammad.kamran@arm.com (mailing list archive) |
|---|---|
| State | Superseded |
| Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD4694BB24F4 for <patchwork@sourceware.org>; Wed, 30 Sep 2026 08:46:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD4694BB24F4 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=kMp/Bpy9; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=kMp/Bpy9 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::1]) by sourceware.org (Postfix) with ESMTPS id 594A14BA799F for <libc-alpha@sourceware.org>; Wed, 30 Sep 2026 08:45:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 594A14BA799F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 594A14BA799F Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201::1 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1790757914; cv=pass; b=bkc9McqtcxO0fM/5keKuEgy6OUtzGmkY8b3NBsJD7Oajsc4xGkrucZ1f4Jt2snb27iRECMuCmB/OfTI/xWSiJ+Gh3tja10tSkrJqjE2PnV/8Q/ruqfAJT2SwgSf7R3DxYbi4J0qdd5pl+Q9WUMaSo0yuXfK+DI2v3iif8IdGnDA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1790757914; c=relaxed/simple; bh=VzT20G94blOO5WfHL2hlNdDzHcWmCyaixKaUN6+8Z74=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=d9wAevWIr+0+bw8BKawmPn7oDxHq0yl8ObPUZMo0YLIanPe5cJG1DxIlQI0JbfOvOeNBM0xKWh05G1J9JTpJi6a5Z0BHdo7OeOdy4a/4IeQCkKvpG3dhBasJpDRAhYCdYoeb2JFhkz07OYMYbYAfwtom4RLsNci53ewdYojeu+o= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=kMp/Bpy9; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=kMp/Bpy9 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 594A14BA799F ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=TfJAlNBCOlbijGqZ2Fk7LbjpfqgJDgf+rzo9UYcVcPgQyQQp89bEn3l9OZxHahTbsMKO9ztW9e7tYlel3vSPHF63CVhpNLEZzcpicrZhb3NiIEVn+KdjF/xpLGuUcQTTGm9hxJK+QTbGJczmWd0iTF3CGkdB1PaaX4chgsDDZ4hP36wzxoE3rdDaIDwVhJJPLaXDUFHxmBe9ws8rrGbWEC+dSWMSFxkqwU7l/5mOtcURGyibxbuGGaVEDr1SAguUmNfgGGUxUSPGuz56Tp7kedRrGwHDwMDWdbvvMNmuR9ldC3X6+F5mSbdDRYU/FkVFzgDIQeJc7nzvUcRDc2VsjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=G3Gpqsivjkr800O5tgtuzGhqeqNjLOHquEtcUj5+v7w=; b=DGijl/xJ92N08gMhuDzmmiDJkvtaK7bGMOKIPSQd98VckQ1i7ZYfHgoHGNvS/royeBtY7l7b+xET8IFxvDdr1zfkxoeNzaQiZ/jFh9a3GA1mFBg5IKunj3j/V9gPXglNhaUO4Ovzuo3s4tnLKHFwiPChZei1GrwRME9cxgUczERUUJfLfAwULCV/KF7B3bQI5/K5TjctzwEjtocbPoUJ7KtkG9LYHZC2aoc1ysgukdY44A9Ieh5Z/8nP+I+fGJM7hcS+EqX6CYWKUFTI5MFcamvMgd9HDMYhw0eD6SHKHLQvU9B9wLudSN8dluDTzJlt9rSHerLx7GNCMIeeX0qPhA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G3Gpqsivjkr800O5tgtuzGhqeqNjLOHquEtcUj5+v7w=; b=kMp/Bpy9aDtFeyzttp479ZsV9ZHGzRIQsCVQ5SpztLGzpVQog6Vt3slcWuBpXuFyMWM/KfzHb8qmzBjsM8mrmjf9ysjihYyPekB/KhkGBtMixwasiGtL8kp6/oH/S4JyFRJqmUxwBhlnL0JcxDbkXcSavMiTm2ieMbGcfcKxhds= Received: from MA3P292CA0050.ESPP292.PROD.OUTLOOK.COM (2603:10a6:250:48::17) by PAWPR08MB9520.eurprd08.prod.outlook.com (2603:10a6:102:2f2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.451.18; Wed, 30 Sep 2026 08:45:08 +0000 Received: from MAD0EPF000008B4.eurprd04.prod.outlook.com (2603:10a6:250:48:cafe::93) by MA3P292CA0050.outlook.office365.com (2603:10a6:250:48::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.15 via Frontend Transport; Wed, 30 Sep 2026 08:45:08 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by MAD0EPF000008B4.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.14 via Frontend Transport; Wed, 30 Sep 2026 08:45:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y9WAL3uaWueKLheCmzPTkBZK6wufCIV+JRMNPSMqRw/y2jZp2KhkOstj0zQaybx5gQwDQHjOZwXg5EiQmDm1XlyGpMS8KCA4KLxCpUWRsA8v37FCiUe9HdIk+xX1RFn2DqRyKcdtIYOzK4gOh1XPBNK2uGqMa4/wZ7Rv9Sqh5T4Z/kEya3pJueY8KmErUEGk6/GR+rMORYvVkiuaJ+qqQLUp2kSBRJ31demMzdFr86SxaRVwMcPpsCszsylhpzMroCw73v2UsSfWW+qDoZL/pFl7YYDgNWLbaCSX6hkr36BKV0xmRQ9v8iKgQKdTO0Pv6LyIaRQdUgPDV6qLmuwn5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=G3Gpqsivjkr800O5tgtuzGhqeqNjLOHquEtcUj5+v7w=; b=xuHyHC51w7Sk4b77zaPkJjGPaV/pjL8jax4UJ3iJngu+3Wd1BZKRKXku3b4cKIePNTWhhvuJw+as5bvD3cWxA7bJVruz2amYzmDqsnIQMPclF5bC55/1+rAAtalWCkt2Ixdbky6cCkZosSxszihZqH6pOSJjOa4msBWEc+Dmw4EWcaSsF9XU6zZtX+dKOnWPLCAPaXUUn6eCSiKRPG8WujOFbg7NZRz1DH4eIy6+lpX03IEhm7H3uk15RIpg/xIAceyTktoGVdSOmuTXi8R8+HKlrXdnWKMIYw/VyJFvneeihtrhHvzDBPehu02GUeh5ghTSqlL50BGgCfN/TbOAxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G3Gpqsivjkr800O5tgtuzGhqeqNjLOHquEtcUj5+v7w=; b=kMp/Bpy9aDtFeyzttp479ZsV9ZHGzRIQsCVQ5SpztLGzpVQog6Vt3slcWuBpXuFyMWM/KfzHb8qmzBjsM8mrmjf9ysjihYyPekB/KhkGBtMixwasiGtL8kp6/oH/S4JyFRJqmUxwBhlnL0JcxDbkXcSavMiTm2ieMbGcfcKxhds= Received: from DUZPR01CA0258.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::18) by PAVPR08MB9817.eurprd08.prod.outlook.com (2603:10a6:102:31d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.472.14; Wed, 30 Sep 2026 08:44:31 +0000 Received: from DU2PEPF00028D0D.eurprd03.prod.outlook.com (2603:10a6:10:4b5:cafe::ab) by DUZPR01CA0258.outlook.office365.com (2603:10a6:10:4b5::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.15 via Frontend Transport; Wed, 30 Sep 2026 08:44:28 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by DU2PEPF00028D0D.mail.protection.outlook.com (10.167.242.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.472.14 via Frontend Transport; Wed, 30 Sep 2026 08:44:28 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Wed, 30 Sep 2026 08:44:27 +0000 Received: from ip-10-249-57-232.eu-west-1.compute.internal (10.249.57.232) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29 via Frontend Transport; Wed, 30 Sep 2026 08:44:27 +0000 From: Muhammad Kamran <muhammad.kamran@arm.com> To: <libc-alpha@sourceware.org> CC: Wilco Dijkstra <Wilco.Dijkstra@arm.com>, Yury Khrustalev <Yury.Khrustalev@arm.com>, DJ Delorie <dj@redhat.com>, Muhammad Kamran <muhammad.kamran@arm.com> Subject: [PATCH v2 1/3] malloc: Add sysdep hooks for request and usable sizes Date: Wed, 30 Sep 2026 08:44:07 +0000 Message-ID: <20260930084409.3965-2-muhammad.kamran@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260930084409.3965-1-muhammad.kamran@arm.com> References: <20260930084409.3965-1-muhammad.kamran@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF00028D0D:EE_|PAVPR08MB9817:EE_|MAD0EPF000008B4:EE_|PAWPR08MB9520:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bd86a37-57b0-4267-de65-08df1ecf21c2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700016|376014|82310400026|1800799024|23010399003|11063799006|56012099006|10067099003|18002099003|22082099003|6133799003; X-Microsoft-Antispam-Message-Info-Original: SIJvdIIMqzojskwhOPzFXfl+cxKuxLWTdS+/BgCECsqqBhTjoCoJvjI6a75aP6jvdkRpyIBkpBizE+mxSm2kyX3zhixl3MKxvdtbRzfPAl0UcIUKKYCsPqoxMYd7ABscLa8FoVXtjFCmKulgzLYldGx8qitpzAqoFHQNszAktkDRKoWFutgtQnreEkCpw6vtHICmgORBTKlMP80QN/k8qE4Vg9odbq52o7zvhSdGzZ98LYyIXb+vGG1EmRwUuJEPoaDV1zhuQpKzGp/Sf/vzlnbq2uPZSaUrnqRO4H845mnW3NugIhI8POUIDAK2GYG3l1YWmHWLqgftUzoV7dCjdLPu102XjwzSk/08nOp3VWw7XK9hjnEAfuCLSuVFU0wB5VxC5D2/wuElTCRvC0gXrQPGgmUPs7GGxT16h9Imm5849kAg6+l3PnepwrDyryFRgKNQgXRPRTcfiF/+22Ldpc6DYKU/hWdNiAP+rI6rQAySXIJrosyLB9Rwd1YAvD8XN3ONxWga3oTEfQ8UWJ+WAVluJ6iTevzYYq6lC553vdoqSxJ3GVLxmk2YQkpC21h0v5mIoO4ioO/BssOzemVGo+EjnSWOEkR4U6AOCsDX6UTgBEs7vqKKlZI3DDwzC3ZSyVjkLhDoxQmRsnFWSfPjLBCw/6EMZ5FLRpjk/z2g98281QdTv0es0M0gEMoT/ccIako5SvJfAwtGlGNCuTVa7A== X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700016)(376014)(82310400026)(1800799024)(23010399003)(11063799006)(56012099006)(10067099003)(18002099003)(22082099003)(6133799003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: IxwIoPRNjkxMVVojQrtXRKb8IFhCPI9A1NE9q6VGGSKgsvgJUkriCUeadovYx+mRacLoBL4djD9udsLO9gjSlATtlwsO1Pn+wirWMcG6/rThv2BKU9laSc5hewD0acWvgOMhGhtOU1oxdebspbQuX93eM2CxBc30IAkO2RvdKqaWqaxjkEMvqgeJwYKi4ZEFKc+wKrRsBUmCPm07mjaER6gs6nKrsxy6ZC9/DtCj1sWUoBPgJKXORMsp/XCV3TcoiG8isfX/+fanYju2MKZtY8W4Of1V9V/symkeHZDIngoYDSg3mdXZFZQNJr/SWd62nGC64TNB5GrdC7vKnipR6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9817 X-MS-Exchange-Transport-CrossTenantHeadersStripped: MAD0EPF000008B4.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 69e6341b-dc8b-47d9-f709-08df1ecf0a3c X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|35042699022|23010399003|36860700016|14060799003|82310400026|1800799024|11063799006|56012099006|18002099003|10067099003|22082099003|6133799003; X-Microsoft-Antispam-Message-Info: h+j84zumPjLwgwPnQNnGZex4lstVi6XnSlM8Pw4ey3chUefDqBo0jXbbmgjsp5GXPpNAfW1dfDeSrA8ruFYNwkXUtp3WIPLhJQbHABcYEhKojx1OMaJvFLCE7oEZFU1yXDY/y8mZ8s+It47fBXBaebmu5QFsAhFOWveWzlwUtUu0mvv/21ybHnyw5LRhQaTqkIUrOAEZCqWwHIPhdbl0gIxVEE0HN2Qp2YA4Lk6VItzF7ng+zuQ1EGxDUTja037r1BMxlu1jO8Rf+HKp9LuU2uF1XYVgFPEDdvBl8fHXiuNnIYGM0vylQcg5eT4JrdgLWrv+C9bxe6q9Fw/dGSsN3Xd6+IjBugnA+PdQGBDn7fSKnJff+swF0TcdExVqBKy4+iphrgRgM8E/OcLEJOhxNqN6Mn2/E3bv1cIE9p7RBSCEOXBm3NPKnDMyx0S0BtR6S771Uke3dKZujAQn9uhUwds0RdEA5m26npYDj0/ACDhaRFswPMypSHx5B1VKRQK9rI8oiIT6Uv54lBzu+NxouiqI0fC8qNO2+x0A7AXPcSiJIyv1v3w1AF/J6Fu+NvEQWNNdqHFsF6JpZ3YXmJZXELjQg0bsjF54eb7G6AcI0bfz8CuHIFYOrIQH3bC66vWXH6n7QJuFLXnEw3GjSGyVPsmzw0esfXMGT96s/HM+0l9HFK0QEDZ+ov+D4rgTTO2Viy/U49fMUrvRvkSvqKt2fw== X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(35042699022)(23010399003)(36860700016)(14060799003)(82310400026)(1800799024)(11063799006)(56012099006)(18002099003)(10067099003)(22082099003)(6133799003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QFfNIhtDZBAEj2gXHEyoH51rdfKTxLxTjahGccZUKjgeFnrKeygBEADjgXT4Q2v9r4jtzRqOBQbbL7OvmhHZxg/rfWS3S3Cg++9KYNs8VmA4bB2dlHQTUq0PSlFjxQA1xXUzc8zOnrImmn9srlYv/IjDh9o2zKbKzBQGAZoBuk+buNGhrDNP4ok23xblz3P5fdwTKcDRpIIZgHMoxSPWsIbmxuvF5BFw27q/BnDJIyhY4Z2l6QgnOoaPwXSaKCtteFunCnMiEn1gOlN7o5X0XYmdrRuGhildn2BYeaCkqJoM1zJEWZG5QUdn4kXaScLr+OnKHa0pkePPZ7j/m7GUOu+ep8KEJJCQystK+42Tl8kVasjPzQX0lPVA07ELO5Nsz0uzKCknlM1El5+P4Hi94/7KKorN213uYH0S6BCdDinzD4fuNc0kQIyRK5SUe6t4 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2026 08:45:08.2389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bd86a37-57b0-4267-de65-08df1ecf21c2 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: MAD0EPF000008B4.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9520 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GB_MSAUTHSOURCE_EUROPE, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
aarch64: Add malloc MTE support
|
|
Checks
| Context | Check | Description |
|---|---|---|
| redhat-pt-bot/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
| linaro-tcwg-bot/tcwg_glibc_build--master-arm | success | Build passed |
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 | success | Build passed |
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 | success | Test passed |
| linaro-tcwg-bot/tcwg_glibc_check--master-arm | success | Test passed |
Commit Message
Muhammad Kamran
Sept. 30, 2026, 8:44 a.m. UTC
Add sysdep hooks for the malloc request-size and usable-size calculations. The default values preserve the existing generic layout. --- malloc/malloc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
Comments
Hi Muhammad, +#ifndef SYSDEP_EXTRA_HEADER_SIZE +#define SYSDEP_EXTRA_HEADER_SIZE 0 +#endif I would use a single define that is either SIZE_SZ (by default) or CHUNK_HDR_SIZE (for MTE) and then use that in checked_request2size and chunksize2usable. Not sure what would be a good name, perhaps CHUNK_OVERHEAD? Also tidx2usize() will need adjusting. And clear_memory hardcodes the overhead and clears an odd multiple of SIZE_SZ which is incorrect with MTE. It's worth checking the other uses of SIZE_SZ too. There are a few incorrect uses of CHUNK_HDR_SIZE (one of which will be fixed by Sam's mmap fix). Cheers, Wilco
Hi Wilco, > +#ifndef SYSDEP_EXTRA_HEADER_SIZE > +#define SYSDEP_EXTRA_HEADER_SIZE 0 > +#endif > > I would use a single define that is either SIZE_SZ (by default) or CHUNK_HDR_SIZE (for MTE) > and then use that in checked_request2size and chunksize2usable. Not sure what would be a > good name, perhaps CHUNK_OVERHEAD? > Thanks, I agree. In v3 [1] I replaced the two size hooks with a single hidden-header-size hook: it defaults to SIZE_SZ, and AArch64 Linux overrides it to CHUNK_HDR_SZ for MTE. I've named it SYSDEP_MALLOC_HIDDEN_HEADER_SIZE for now but happy to rename it if needed. > Also tidx2usize() will need adjusting. And clear_memory hardcodes the overhead and clears > an odd multiple of SIZE_SZ which is incorrect with MTE. It's worth checking the other uses of > SIZE_SZ too. There are a few incorrect uses of CHUNK_HDR_SIZE (one of which will be fixed by > Sam's mmap fix). > I have updated checked_request2size, chunksize2usable, and tidx2usize to use the new hook, and changed the small calloc clear helper to fall back to memset when the usable size is smaller than the unrolled clear path supports. Thanks, Kamran [1] https://patchwork.sourceware.org/project/glibc/list/?series=67434
diff --git a/malloc/malloc.c b/malloc/malloc.c index 011ecd6870..21647e3794 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1005,15 +1005,22 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ value is less than PTRDIFF_T. Returns the requested size or MINSIZE in case the value is less than MINSIZE, or SIZE_MAX if any of the previous checks fail. */ + +#ifndef SYSDEP_EXTRA_HEADER_SIZE +#define SYSDEP_EXTRA_HEADER_SIZE 0 +#endif + static __always_inline size_t checked_request2size (size_t req) { if (__glibc_unlikely (req > PTRDIFF_MAX)) return SIZE_MAX; - return (req + SIZE_SZ + MALLOC_ALIGN_MASK < MINSIZE - ? MINSIZE - : (req + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK); + size_t rs = req + SIZE_SZ + SYSDEP_EXTRA_HEADER_SIZE + MALLOC_ALIGN_MASK; + + return (rs < MINSIZE + ? MINSIZE + : (rs) & ~MALLOC_ALIGN_MASK); } /* @@ -1115,7 +1122,10 @@ checked_request2size (size_t req) /* This is the size of the real usable data in the chunk. Not valid for dumped heap chunks. */ -#define chunksize2usable(n) (n - CHUNK_HDR_SZ + SIZE_SZ) +#ifndef SYSDEP_MALLOC_USABLE_SIZE_OFFSET +#define SYSDEP_MALLOC_USABLE_SIZE_OFFSET SIZE_SZ +#endif +#define chunksize2usable(n) (n - CHUNK_HDR_SZ + SYSDEP_MALLOC_USABLE_SIZE_OFFSET) #define memsize(p) (chunksize2usable (chunksize (p))) /* Huge page used for an mmap chunk. */