From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11olkn2010.outbound.protection.outlook.com [40.92.19.10]) by sourceware.org (Postfix) with ESMTPS id E99113858439 for ; Sun, 1 Aug 2021 13:06:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E99113858439 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f3mvxFjNQWn6Z/t9qrFfGBk/aKPvRqrjpIAhlM9qecfkhqJszVzRIKJua0JkASBTsdTMxawRZHMHGr6BCqmZ5Wz/dDbE4ZR7KkO2xq8BDQC+YuyF0Ct4aSD8PRHExCYPxS1NkoZras7lDTOszTt5MEYgq0nV1fSIh9+MGkeI5MoVSTE+0wZn1gbE8a+4pLkUMbmTTPXl7IY8jI1TkuQa6GkIzdNEGGg8/UAPBMjM9Bd/U5wTl5NrkiiOSlXZBfeDpEy3iQccqS50MO/ARk1COmz4IoS3tGlOzzouZf09lkos4e3ZFdQxjCTE9UHagYTy7Zx2d0rDdqzqPvlQqb5Drg== 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=hKDzUvqVscIXf73xq3AUIcAIFgCsuxULvnMQeCxzO4k=; b=BYA2iK/3Qr0fSHmP7e4BWSFgMvUInFfk3l7qCyBswHvSK40/UcdcAQLDhHf7qjlYQKS94VD/IKGUEyvggMt+5kGCbp/fDZFtXaWXzH5p70MKlYiSu3sG/ylKVj9QlQ7hV3tjEh6siqmTXfTPiYknxoQ1fhAdhv6QnTBm3CYAhUjPgvWnTTQOAWuNSRhDjzLSY7+P6fO8KmLewxy/6BJZUtE83kH1UTxN5rqJOwxTMrvO2O9HdM7pROdtlY+YXpyHYEz7ylfgyOJHARz0EgqxvB/l7heZL/ckhSUufg4nC2yf7oGr+qudWFXZZCrYKCfUGGMbyu+2jjCm/22ROsMnPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6NAM11FT051.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::4e) by DM6NAM11HT204.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::437) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Sun, 1 Aug 2021 13:05:59 +0000 Received: from BN8PR18MB2643.namprd18.prod.outlook.com (2a01:111:e400:fc4d::42) by DM6NAM11FT051.mail.protection.outlook.com (2a01:111:e400:fc4d::243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Sun, 1 Aug 2021 13:05:58 +0000 Received: from BN8PR18MB2643.namprd18.prod.outlook.com ([fe80::8bc:1d7c:bb63:3b10]) by BN8PR18MB2643.namprd18.prod.outlook.com ([fe80::8bc:1d7c:bb63:3b10%5]) with mapi id 15.20.4373.026; Sun, 1 Aug 2021 13:05:58 +0000 From: ur bridge To: Florian Weimer , " libc-help@sourceware.org" Subject: Re: Where could I find the definition of __vm_deallocate() called by __munmap()? Thread-Topic: Where could I find the definition of __vm_deallocate() called by __munmap()? Thread-Index: AQHXhi/jIJ6z4GUyekST6HDeA3Wb96tdXQpigAE09yQ= Date: Sun, 1 Aug 2021 13:05:58 +0000 Message-ID: References: , <87fsvuv0bi.fsf@oldenburg.str.redhat.com> In-Reply-To: <87fsvuv0bi.fsf@oldenburg.str.redhat.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:E0394A372C62590C7685CC0371D6AA2A1D6418B3C6BD9B9A47608DA49B659DFE; UpperCasedChecksum:B782C7B448BE1DD51DA723B22A4014A6136DE14157C378BADECB05F67018A201; SizeAsReceived:6964; Count:43 x-tmn: [/tPlma0BI8wf+vZ1Bk4T9QqyrQKt+c5ZARiY1tk1ngc=] x-ms-publictraffictype: Email x-incomingheadercount: 43 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 91b8cbfb-8dc4-440c-05b5-08d954ed1adf x-ms-traffictypediagnostic: DM6NAM11HT204: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BiGsoqh8hjSui2Oo9jzv8VAhYRoaYyRntMslp5cLFroWgTZhIkczKdVVie3qMqPEFPG7LajC33JmhOwnzX8CHxuptMNrLK1kJ4Ut6XG/OA8X/dlXr9NUBaeuZfQUVUyYpy+H1J6+Gih/RRimjqoFUbh69EsRttBuKrQOMJYqfQYsI0p3CJAzUy73fQ4rZHZaH6WmxxgdoCAvowE4Oat12BZbwUZcCS22f+MlrpfvVT5ZDQwIlkzTqAewpVFRtxH7n2rQClii5dhlefyiYYdrqUnboSIUXSP7ZUQezXvjfV9C6mx38mXwoFPVXMum6PlvykPaUb3btYT1lS4isNNOv5RjFdpNAIh6EHjtzRiJ/XkpW+vk2WiKtu6EoN6yNuCkSmmXICDWDE38gZ2oIEVy6pw9hv8r4hs6hMTECWVSudyimOJLiREsRdiKa1XBLXPS x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: ggOjS+1KfYTdo23rdQcSR6xHyuxarUBePIeZGtnNkauwyXd8qR4Hsbh0ABiZHzKLtmDAImQp/JI0E5SjfxO8j6SUSVP1GRxBDx9uTz51pBNt+x0A1ZQ6zsMPjSDEfglvdoNbDeAK++34hAIAefI5AQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 91b8cbfb-8dc4-440c-05b5-08d954ed1adf X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2021 13:05:58.3582 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT204 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2021 13:06:04 -0000 Thank you, Florian, I tried to locate __vm_deallocate()=92s definition in glibc by grep, and fo= und only a hidden_proto in sysdeps/mach/include/mach-shortcuts-hidden, with= no actual implementation. Is its code included in glibc? If not, how could glibc be built from the so= urce? Given that __mmap() will call the syscall mmap(), I can understand only if = __munmap() is a thin wrapper for syscall munmap(), but it calls __vm_deallo= cate(). How does this mismatch work? How could Hurd=92s code touch the nece= ssary structures (e.g. vma, managed by Linux kernel) to handle the unmappin= g? Re: Where could I find the definition of __vm_deallocate() called by __munm= ap()? * ur bridge via Libc-help: > I=92m reading the malloc.c code, and find that when __munmap() is called > to free a mmapped chunk, the control flow will fall into > sysdeps/mach/munmap.c, where __vm_deallocate() will be > called. However, I cannot find its definition. Where could it be? This is Hurd code. For Linux, __munmap is indeed a thin system call wrapper. Thanks, Florian