From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by sourceware.org (Postfix) with ESMTPS id 0845F385702E for ; Wed, 25 Nov 2020 13:43:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0845F385702E Received: by mail-lf1-x142.google.com with SMTP id s27so3190709lfp.5 for ; Wed, 25 Nov 2020 05:43:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0kcL9E3hbZbL2Bgjmx1VJXn0zD2SAg7lD3tlJZmmyxY=; b=RPgXaBJXWCC6M+rt765PrUHnF/22QLHtHtNVoVu0qwY28Ja0khw9ixerwTeVJp7AgM rilrGAaWK9f/YeyDE+0oUd83x0GAD4kL51WVPFp7KT58rPJJYfKIqnFohti4MLAgNIMI CRju3FDfJZoana6u2uZv4nZ1nbmX3ZXTdvTMZe3FBq8Dv9VrP9wv5CrNYHZtdcWPwjoQ Uf10sb9s4RT1CigoeWbCZFM1Mj3q1vs384AxUKANGSqY5dKER/qQ3s+js70ijGPSa0/E h8lXab2c8U6daYQrzfgeMIJjlcSsgudDMtO8NDfdS/99b9mJcKgL3EC6/BYdMRoaKsy4 U87g== X-Gm-Message-State: AOAM5339fb99BhC799V97ZGQFFdCSxtUjfidW+WhT7TlmoAv01wf8dnQ Bh2w5HbS9Z35UYsGuH8Jt5/KPUJ4IEqGCQ== X-Google-Smtp-Source: ABdhPJwSbh0w4Cj2yjV3EFuCMrIhlT61udXUYQklBSY7Wjwe6VuR+h5sLQHPn+to4Vgl6VFo91B+/w== X-Received: by 2002:a19:a415:: with SMTP id q21mr1432397lfc.508.1606311804534; Wed, 25 Nov 2020 05:43:24 -0800 (PST) Received: from [192.168.1.39] (88-114-211-119.elisa-laajakaista.fi. [88.114.211.119]) by smtp.gmail.com with ESMTPSA id v10sm265395lfg.118.2020.11.25.05.43.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Nov 2020 05:43:23 -0800 (PST) Subject: Re: [PATCH 1/3] csu: randomize location of TCB To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20201125113632.6486-1-toiwoton@gmail.com> <20201125113632.6486-2-toiwoton@gmail.com> <06c7e1b1-d1d0-8908-1b71-423df90137e7@linaro.org> From: Topi Miettinen Message-ID: <97ff5167-fd24-9a30-c704-bd9952aa32d0@gmail.com> Date: Wed, 25 Nov 2020 15:43:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <06c7e1b1-d1d0-8908-1b71-423df90137e7@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: Wed, 25 Nov 2020 13:43:28 -0000 On 25.11.2020 15.18, Adhemerval Zanella wrote: > > > On 25/11/2020 08:36, Topi Miettinen via Libc-alpha wrote: >> Use mmap() for allocating TCB except if instructed by tunable >> glibc.malloc.use_sbrk. This makes the location of TCB random instead >> of always staying predictably next to data segment. When using mmap(), >> improve the logic so that allocation of TCB can be assumed to fail >> insted of segfaulting. >> >> -- >> v2: introduce a tunable to use sbrk() >> >> Signed-off-by: Topi Miettinen > > Could you address the points I raised on your first version [1] > first? > > [1] https://sourceware.org/pipermail/libc-alpha/2020-November/119988.html Sorry, I'm not subscribed to the list, so I missed your review. I'll refactor mmap() and __mmap_internal(). -Topi