From patchwork Thu Mar 11 17:56:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 42456 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 448B93896C17; Thu, 11 Mar 2021 17:57:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 448B93896C17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615485436; bh=p+XOIXK/4sGFW5mNi5vuwuZz584+AqIwolESP3/wAx0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YOAuTXX8qd5aC5Eyrqs8FC2uuE7ME0LRe1sT4F46+uLR84CKDp0+e2vWVwPNeSzy5 lPN0kluQoygMIejtK4dsv6TBWvnVkxddh/D+oFHtXjM5LYxCqaXZtRcnpy4K9DGawP CuQuzxvOyr1PaPhvDjm1COh8mv0GmUe6DUZNq88I= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by sourceware.org (Postfix) with ESMTPS id 213423894C3B for ; Thu, 11 Mar 2021 17:57:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 213423894C3B Received: from DB6PR0402CA0004.eurprd04.prod.outlook.com (2603:10a6:4:91::14) by AM6PR08MB4534.eurprd08.prod.outlook.com (2603:10a6:20b:ba::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 11 Mar 2021 17:57:01 +0000 Received: from DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::20) by DB6PR0402CA0004.outlook.office365.com (2603:10a6:4:91::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 11 Mar 2021 17:57:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT033.mail.protection.outlook.com (10.152.20.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.31 via Frontend Transport; Thu, 11 Mar 2021 17:57:01 +0000 Received: ("Tessian outbound 520e67c3dd94:v71"); Thu, 11 Mar 2021 17:57:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9df1b0f10f05164f X-CR-MTA-TID: 64aa7808 Received: from 027ec98e4c39.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5ED5DE4B-F9D4-4632-B2AB-5465538EFF3A.1; Thu, 11 Mar 2021 17:56:55 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 027ec98e4c39.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 Mar 2021 17:56:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7Mki5lMO4AIALKzqj5ggKGk8oJNvZXz0vv7gWhAnBfUPVh0AliEfi2GpKimbVK8hLETB6///uTNrK99Vjt+0mIg6/wu7lkZ03nqzJLtz5QX/k2Cah7DkvgFRM4aIHXlg2cVBGDwIqtTshqAzWifF2ADephBmGL6ysrLBYT8fIZT8aDWWuR43SP70BTEiSV2mlXgmbJOD53zofwCqoMQJHTTHIWMpwmUaBgWhpbnCzyJX7DV+Km51CJRR4MNE6btBv25VTyrxAORYnJCVqJxwIBtb+Y9cGm+Q0IknhNJsFYMrJIW5ZYsOtB5x3ghT4fXtxJwLB7MtqGsuoiNTVud0A== 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-SenderADCheck; bh=p+XOIXK/4sGFW5mNi5vuwuZz584+AqIwolESP3/wAx0=; b=cvVbZMq7c1T52NHOtdsqocy+wkjn8z/csQU5yVLxthmDjB15OLNRgn2sW1Y7N5K6xjpr2VUt6iNfa3HAhU+YQ3ThFvdrBI+sVWB/INHVUB24hdFAv2OxuN2CqGu4R6SrAZ/kwiNRipkWxRN6gIUbLwyhjEv8aCcG4sUQO1xxSH11M+epUCgZ9HyjVM9zQVcwDxJMzW/i83ncCLDuUTU+t+8gn/EXrpf2R1N69pN4H0Cx6WO30cIqziVC47AwhaxL7m2pOB78+SVibJU2Zy8fnaVEDzFrFxbH8oIhdFSpfEmVP62RKa4LrNJRp/b98eKosygvZUllA5wO2NmhOAPN3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PR3PR08MB5673.eurprd08.prod.outlook.com (2603:10a6:102:86::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 11 Mar 2021 17:56:53 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::60f0:3773:69b8:e336]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::60f0:3773:69b8:e336%2]) with mapi id 15.20.3912.031; Thu, 11 Mar 2021 17:56:53 +0000 To: libc-alpha@sourceware.org, DJ Delorie Subject: [PATCH v2 0/2] malloc: split the mtag realloc fix patch Date: Thu, 11 Mar 2021 17:56:47 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: LO4P123CA0363.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::8) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.49) by LO4P123CA0363.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 11 Mar 2021 17:56:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f3944ec8-97e3-47ae-de94-08d8e4b71278 X-MS-TrafficTypeDiagnostic: PR3PR08MB5673:|AM6PR08MB4534: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: TeH1De0bYoh0AN7gf2tniF0+mczcC2bLRhrTZXKhYRsbDGnEUzMvmWZMhFo3lXUVe4+4szdJdstAur98B3fLmjAmk/Od1V0ltzO7bOxzZw+iFKPhZyH9vVdnGYgyCqqwX1RDjhk4wfTP+tlNiTs08lHt3Uis/Gkv9ICn0DLGQgGQZdP8Gif61pnzZJbZlqtDOi+mJ/pM6PRnGtttWNNF71gRmYwSadvukuRSH6l7QOURGXDnbxsuHF+zeM20U/0vHOrbp4LSvBioWjzVCA+gzecqxfQetKeAuuFBzBIQ/H+L0aVSo6cxLo1+Q7zsu5B9DUtClMeAkSzHqHNh4XKNU+L/qRFGSbjFW6Z1JuCEkJAW3VXjADBw7bPi6cC3PJIrIlcPiigCao6PK8sI2C5CLB/dy4vgtBGGN3wLtKkCdPvgeUqbuxwyfnzSS6QFiHjqEliJY8DTiZMwn2NzGSt4Mze8vNr1C+YcItJMqZ1Uyo14KBDQyibG01dY2CPVhlsjEoUCbpxzJVPSlY2vnF7uXTluRRlTaItAJVGk/HYhTVfgar2FtxfMMeNwXNwVcFOSrryU7hj6ChXXk1TtbaMn4XhLqdKmg9+hA/SF7qAb2waEOfCgHfN3LGKI2QC8QJl435G+wPkLIBuqXejc6nKFR7qePCMwHwK4ioQ2lSjYGrw= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR08MB6320.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(396003)(39860400002)(366004)(8676002)(69590400012)(186003)(52116002)(26005)(86362001)(966005)(83380400001)(478600001)(5660300002)(2906002)(6486002)(316002)(16526019)(6916009)(956004)(44832011)(66946007)(6666004)(66556008)(8936002)(2616005)(36756003)(6512007)(4744005)(66476007)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: US0zZYtjO/BAJHVrDzvA2OTFIlW1J9o2+WOJei73f67fMqIBdnaVVwC/gSlUa9D842sp/K50bWZVfY5YOZqDnj2vBJnZkqe3G5PbuAij7QaNOKuniHvtsipS9bxHRn43Khlq8Q7WYR+xbNgMM3lHimgerverb+ZV6sIU+d0kbHGxHcVt7UXX4lVsjqJ6CBsg66ucWOrv0SL0Y3AFJthNMCfnArqRTqyR8To47w1ikRqwFTBDSzsI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Z6OetZPsiHtVyMlvH0Arh9gZhXvqnm4NMX X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5673 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 899dfc8b-80fe-4701-1e0e-08d8e4b70dc4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SFEOsa/qvfFP3ZJ4Blpvz0sXLiUPSCcSWctz0K6AwihWdIF84k9nX8xtWojsyCMZ72T1CUdEviNip+KAKKcCdqpn//9M+ljbeh+i2XSC8UqVvioqAxbB7lbd6wt4Vg2u1jlwWTROPragBFuA5yS3o4uHFB73vOXZs9rewbAMIvTMnHw2CrRZIaYsPgs9aWxV8EuIRqIctiF8gUV50qGRKw7wB3hLSa0UujhsPQKb6ZBSeozr1o+reae8vqf0f31pIQdEp6IalhoZysUuoGaprEIwobndQd2u6t3OS6lCjuoYHswQEcndvq+tDQJdsfIReXJApbV8H6QpCsDggNVQuk4GVI+0HjolurgCvkMDCLyni1r7E3SDxPSCN4dOvxN0HfC2Gb4lbzmvH1Fhk+kevgPr5yDEkIxORTR7uQTLDSxfxYMBGJvqWYDFnD2j1F80lDDZFiPqc8iB2kHJjkisoVoFCJMhVzLUGgDvCkjPmdIGaf3GQBx8verMyD1lbATgZKSd4aJsfKrWdzsMx1/YrF2n4ug9J4Dfg/r1Goezvs51DyT6J5N6TeDOy7ofn1U9KwxlNd8S1SB7sPb9cz7a/9qVjZjWA67m3kw3S7JbbRGUBPgFev4jexrzPeS2h7E8uq1ijlO1PWwAFgEc11+GSoH5boyv9wiDVU++JYLzAoVZaO9smMfKN5Q8TSneWQWFzcl3OY/BxcRqNXqGgStrpv1X/0gucu7rDoyqshbX/mc5nywUPv35HGdFT55XO90OUfokKwX7lzzA3jKNazPXMQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(136003)(376002)(396003)(39860400002)(46966006)(36840700001)(70586007)(8676002)(36756003)(70206006)(6666004)(82310400003)(82740400003)(69590400012)(44832011)(83380400001)(2906002)(26005)(6862004)(81166007)(356005)(16526019)(186003)(36860700001)(4744005)(336012)(8936002)(6506007)(5660300002)(86362001)(6486002)(47076005)(966005)(478600001)(956004)(316002)(2616005)(6512007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2021 17:57:01.2924 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3944ec8-97e3-47ae-de94-08d8e4b71278 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4534 X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" i decided to split this patch: "[PATCH 01/16] malloc: Fix a realloc crash with heap tagging [BZ 27468]" https://sourceware.org/pipermail/libc-alpha/2021-March/123226.html so in the second part i can make more changes, i need review in that part. rebased the rest of the patchset on top of this in nsz/mtag. i'm working on follow up patches where this is useful (because they touch chunk2mem). Szabolcs Nagy (2): malloc: Fix a realloc crash with heap tagging [BZ 27468] malloc: Fix a potential realloc issue with memory tagging malloc/malloc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)