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-Status: No, score=-5.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, 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 31C561F66E for ; Wed, 26 Aug 2020 20:40:48 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 80AC4384605A; Wed, 26 Aug 2020 20:40:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80AC4384605A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1598474446; bh=QIA6qTLXdQA7Rdon8QAxfQ8M2ahLw+kefBihHbld27s=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OglQt2AAg4IPz8oVN1ARjx+VMP/ob017y4OsdheVaefpw5c3brKx7cUHb7ZYzRdCQ MeaLQiBthVhw647MrnGE3huMSKhPEdEIT03d/GOug/PC7kRv1LQJ5DWccOMHDdiO6L /P4OU18UqOw+a/G2sM1LXraOaXrPaLAoDyAW1uNA= 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 E4A0A3857C57 for ; Wed, 26 Aug 2020 20:40:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4A0A3857C57 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-Mhxo4061M4yflc3yFOE7ew-1; Wed, 26 Aug 2020 16:40:43 -0400 X-MC-Unique: Mhxo4061M4yflc3yFOE7ew-1 Received: by mail-qv1-f70.google.com with SMTP id d1so2529840qvs.21 for ; Wed, 26 Aug 2020 13:40:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=QIA6qTLXdQA7Rdon8QAxfQ8M2ahLw+kefBihHbld27s=; b=l6iSAAQEKwj6EvF5xjQerMpqzotxHYTEXCyaYIksbfKXG9lqKy6Ne1WSEuuleJxbtF Mme8a0N9NntYplLy2ny9dChKWXKpmKTpW3ipIukkebW8OTg6gDQUkKvr3cmdo90uvK9z kgGgaUY2/4FJyK2xuTgZOCD1Q2rirNJFdkI3mWquHRLmIMcP9GuYGJKoYpzZ67t6DJuI mjkpXHeNr54PU85wGj0aWNO1QodnZLXf0x8rfPbdpwIRto52ob6ROzFZELHD2Fa6SeHm ++oT6L307muR1XMwSMTsApJzQsmXAvksZrfVQ1UCrvQt2bFkCOg+k907N3klomxOmUUn VN5Q== X-Gm-Message-State: AOAM533kYpaNgZeI4WsuJWePWDZGbHx11JLzjas4W+/86ZpIVWTmH5ni WO9GZtdgQ9MXeOIekMWPGfH93lbYpFL9wHAg7o67ATyyZMwkQwr3BsAiZVMAtPRndCfBmTryQQw SVsttSdNSSEWjzcdQStK1 X-Received: by 2002:ac8:548f:: with SMTP id h15mr13119257qtq.126.1598474442307; Wed, 26 Aug 2020 13:40:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytXg1NbBvqi9wZ2RW4j4urIlXQ4NZSWehd8WYtSXVZA9dOIZjNpIZrVA+0GDE2hpEDRqutSQ== X-Received: by 2002:ac8:548f:: with SMTP id h15mr13119246qtq.126.1598474442109; Wed, 26 Aug 2020 13:40:42 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id k1sm157626qkf.12.2020.08.26.13.40.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Aug 2020 13:40:41 -0700 (PDT) Subject: Re: [PATCH] Update tcache double-free check To: Eyal Itkin References: <22dd78e7-13a7-0bec-37ba-f3e32a9630ab@redhat.com> <5c6aa5c1-7962-6f05-a114-0d79c9cd9bc5@redhat.com> Organization: Red Hat Message-ID: <83a3a3d8-0df5-604d-2de6-ae8e99adaca5@redhat.com> Date: Wed, 26 Aug 2020 16:40:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <5c6aa5c1-7962-6f05-a114-0d79c9cd9bc5@redhat.com> Content-Language: en-US X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 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: , From: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Cc: Florian Weimer , GNU C Library Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 8/10/20 9:12 AM, Carlos O'Donell wrote: > On 8/10/20 9:07 AM, Eyal Itkin wrote: >> Updated the patch to perform an atomic update operation on the global >> entropy state, so to avoid races when multiple threads are initialized >> simultaneously. The patch now accumulates entropy between threads, >> while still using the backup case of ~tcache to take care of cases in >> which no entropy was yet to be available. >> >> As Carlos mentioned earlier, I guess you will want to discuss this >> patch before integrating it. Also, feel free to update the patch if >> needed in case I missed some whitespace / long line coding style. > > Thank you for putting this together. I need to spend some time thinking > more deeply on this and considering where the right balance might lie > between a per-process value and a per-thread value. Particularly with > respect to the tradeoff between maintaining the code and security. > > Do you have any strong opinions on the use of a per-thread vs. per-process > value? > > This patch is third on my queue. > > My queue is currently: > - NSS configuration reloading (DJ Delorie) > - DSO sorting DFS (Chung-Lin Tang) > - Tcache double-free check (Eyal Itkin) > I got through the NSS configuration patches. I'm working again on DSO sorting. LPC 2020 is interrupting this week. Thanks for your patience. -- Cheers, Carlos.