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=-4.1 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 [8.43.85.97]) (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 9BF621F531 for ; Mon, 10 Aug 2020 13:13:01 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE5533851C16; Mon, 10 Aug 2020 13:13:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE5533851C16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1597065180; bh=FH8LV9IczSe7hkP658v4Gtsdstu+ZDfSI/82X3Y0tjI=; 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=mCWgwJZ0AqLmcfKJgXb9k3MmSSIPQ0H52NX+juIhjUHpwhEysRoX3p+oWHiaMocGO ub925+IQM0DjtDpYiyo1s4ErcBpAO2SnQJcnU7xhjN5cULJCA3Uc+6MKmsuWM/jBBK oS0ABNytbo5kOORAQYVSVBI3Z7gxWLYGXXVeCOSc= Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 860053857C7D for ; Mon, 10 Aug 2020 13:12:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 860053857C7D Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-jH5tHU0PNCW_6F6OQq7sdA-1; Mon, 10 Aug 2020 09:12:56 -0400 X-MC-Unique: jH5tHU0PNCW_6F6OQq7sdA-1 Received: by mail-qv1-f72.google.com with SMTP id z10so7241956qvm.0 for ; Mon, 10 Aug 2020 06:12:56 -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:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=FH8LV9IczSe7hkP658v4Gtsdstu+ZDfSI/82X3Y0tjI=; b=Z6X4X1e7N/FMThzC3+M7kk4ay1gO+OywTTHullg7fgveOt9133YdvYBO7sg7A9oNXq XgB+199YQv2AV3djYtBPlqHOgcmdRqGJItEDDVXDp0pjOefLBVLGMaFWPOAc+GKooKnI DDtmN9ci5d6ab7KY7NfXQKqtDA+8iBoTMHcWsuRDZSShEa0wXAO029N2vqul+LrjNn8g haVRnttj0syI8M2o2UjcFl53HYpITZQiTbPM6DI8rEa4Xh+J7XaVkpSVIeY/RF6OM5zJ pFxF2WWtBfpyk2jeYSYUR3frgF+qVSPxwVcFjpGROTudfle8uj4vJIv0N5XduGuFciDQ i4Aw== X-Gm-Message-State: AOAM531wlhFLUtdOHtwfauZlJmj8EUscqXqCYfpsjAOYcBpemtGGGoD6 NhXot6sj2NvZNTNscUJ7P94AfaXThlnShkE+fivFFaHj0TIEtYrOprHHSvGt/BNNpXInpTNrSFO mL0DyvDv++feSbMcz4NB4 X-Received: by 2002:aed:2352:: with SMTP id i18mr28121519qtc.167.1597065175675; Mon, 10 Aug 2020 06:12:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ872HSJXLPYH6IDkDAF8R7StoZif4GjkP+iU7CvDX4w5TCZQq81d6LlCp3tnMIuURHNftJQ== X-Received: by 2002:aed:2352:: with SMTP id i18mr28121493qtc.167.1597065175379; Mon, 10 Aug 2020 06:12:55 -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 d20sm13659902qkl.36.2020.08.10.06.12.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2020 06:12:54 -0700 (PDT) Subject: Re: [PATCH] Update tcache double-free check To: Eyal Itkin References: <22dd78e7-13a7-0bec-37ba-f3e32a9630ab@redhat.com> Organization: Red Hat Message-ID: <5c6aa5c1-7962-6f05-a114-0d79c9cd9bc5@redhat.com> Date: Mon, 10 Aug 2020 09:12:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 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: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) -- Cheers, Carlos.