From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id D03B7385BF9E for ; Tue, 23 Mar 2021 20:03:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D03B7385BF9E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-468-cKne6yiBM0emBzyXI7zdEQ-1; Tue, 23 Mar 2021 16:03:31 -0400 X-MC-Unique: cKne6yiBM0emBzyXI7zdEQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BC7A107ACCA; Tue, 23 Mar 2021 20:03:30 +0000 (UTC) Received: from rhel8.vm.delorie.com (ovpn-112-40.rdu2.redhat.com [10.10.112.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4962910027A5; Tue, 23 Mar 2021 20:03:30 +0000 (UTC) Received: from rhel8.vm.redhat.com (localhost [127.0.0.1]) by rhel8.vm.delorie.com (8.15.2/8.15.2) with ESMTP id 12NK3T4Q047504; Tue, 23 Mar 2021 16:03:29 -0400 From: DJ Delorie To: Szabolcs Nagy Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 2/6] malloc: Use different tag after mremap In-Reply-To: <4aadefff0647fd8a4ade4377bdfab60989c37b7f.1616155129.git.szabolcs.nagy@arm.com> (message from Szabolcs Nagy on Fri, 19 Mar 2021 13:26:32 +0000) Date: Tue, 23 Mar 2021 16:03:29 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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-List-Received-Date: Tue, 23 Mar 2021 20:03:39 -0000 Szabolcs Nagy writes: > The comment explained why different tag is used after mremap, but > for that correctly tagged pointer should be passed to tag_new_usable. > Use chunk2mem to get the tag. > - void *newmem = chunk2rawmem (newp); > + void *newmem = chunk2mem (newp); > /* Give the new block a different tag. This helps to ensure > that stale handles to the previous mapping are not > reused. There's a performance hit for both us and the Ok. LGTM Reviewed-by: DJ Delorie