From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2BDF31F8C6 for ; Wed, 14 Jul 2021 18:43:55 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D2873988032 for ; Wed, 14 Jul 2021 18:43:54 +0000 (GMT) Received: from cross.elm.relay.mailchannels.net (cross.elm.relay.mailchannels.net [23.83.212.46]) by sourceware.org (Postfix) with ESMTPS id 55DD93857418; Wed, 14 Jul 2021 18:43:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 55DD93857418 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DFA47225CA; Wed, 14 Jul 2021 18:43:37 +0000 (UTC) Received: from pdx1-sub0-mail-a5.g.dreamhost.com (100-96-11-33.trex-nlb.outbound.svc.cluster.local [100.96.11.33]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 70CB422094; Wed, 14 Jul 2021 18:43:37 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a5.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.11.33 (trex/6.3.3); Wed, 14 Jul 2021 18:43:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Keen-Little: 380cfd4d676a8a8f_1626288217710_3071948164 X-MC-Loop-Signature: 1626288217710:164388797 X-MC-Ingress-Time: 1626288217709 Received: from pdx1-sub0-mail-a5.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a5.g.dreamhost.com (Postfix) with ESMTP id 2B2EE8AC84; Wed, 14 Jul 2021 11:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :cc:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=Psvg0Z weX7+we9KpTiiH9PFEDg0=; b=PDsoOgBLKlgBTMTGXwpdZ3bCkB/uALb1ZnZDQ7 woGPO8pYAMb4PgQGlu9e7WjBik8yVUmTb+PQN0Vfnmi12ZOm9dW2wLk9maPxbb1Q RRTZDZbw//SrA3a4d3boFwp+14le6rVg38Hnf9qfWeAhcmHBRDJsp0lxJO9WjBTd D6aJ4= Received: from [192.168.1.139] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a5.g.dreamhost.com (Postfix) with ESMTPSA id 3FB358B02A; Wed, 14 Jul 2021 11:43:32 -0700 (PDT) Subject: Re: [PATCH v8 03/10] Remove __morecore and __default_morecore To: Guillaume Morin References: <20210713073845.504356-1-siddhesh@sourceware.org> <20210713073845.504356-4-siddhesh@sourceware.org> <9925362a-d278-a0ad-f504-ae08ca93f628@gotplt.org> <20210714125415.GA24678@bender.morinfr.org> <45ba79b4-02e6-fae5-ae9b-db6c8a01aecb@gotplt.org> <20210714164204.GA1103@bender.morinfr.org> <6364b66d-14a8-3086-00ad-a0def6995c54@gotplt.org> <20210714182551.GA16858@bender.morinfr.org> X-DH-BACKEND: pdx1-sub0-mail-a5 From: Siddhesh Poyarekar Message-ID: Date: Thu, 15 Jul 2021 00:13:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210714182551.GA16858@bender.morinfr.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Cc: fweimer@redhat.com, Siddhesh Poyarekar , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/14/21 11:55 PM, Guillaume Morin wrote: > I did not mean to say it should be moved to the debug DSO. > > What I am saying is having explicit glibc support so I can LD_PRELOAD a > version of libhugetlbfs that would export a __morecore() that will then be > used by glibc. No function pointers that needs explicitly set. > > I am suggesting morecore interposition instead of the malloc > interposition you initially suggested. That should make no security > difference at all. It just requires to agree on some semantics though > for the interface which are basically these are sbrk. This seems to be the central the point of difference. A contract for an interface like that is not limited to hugetlbfs. That said, Adhemerval's suggestion is perhaps a good compromise. I'm far more comfortable with a tunable chosen hugetlbfs morecore implementation within glibc since it does not have any arbitrary interface contracts that we may be obliged to maintain indefinitely. Siddhesh