Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 93EA0200B9D for ; Thu, 29 Sep 2016 01:28:32 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9295B160AD4; Wed, 28 Sep 2016 23:28:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D195B160AD3 for ; Thu, 29 Sep 2016 01:28:31 +0200 (CEST) Received: (qmail 70859 invoked by uid 500); 28 Sep 2016 23:28:31 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 70716 invoked by uid 99); 28 Sep 2016 23:28:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2016 23:28:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 19149181590 for ; Wed, 28 Sep 2016 23:28:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id jfUKgbixJ1eV for ; Wed, 28 Sep 2016 23:28:28 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 2E56D5FADE for ; Wed, 28 Sep 2016 23:28:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u8SNSRGo018293; Wed, 28 Sep 2016 23:28:27 GMT Message-Id: <201609282328.u8SNSRGo018293@ip-10-146-233-104.ec2.internal> Date: Wed, 28 Sep 2016 23:28:27 +0000 From: "Alex Behm (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Ho Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4118=3A_extract_encryption_utils_from_BufferedBlockMgr=0A?= X-Gerrit-Change-Id: Ibebe431f69c3c569cbff68171beaa32ef2ab03b6 X-Gerrit-ChangeURL: X-Gerrit-Commit: 63d48baefe509892037be21d884ab4e70c217681 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Wed, 28 Sep 2016 23:28:32 -0000 Alex Behm has posted comments on this change. Change subject: IMPALA-4118: extract encryption utils from BufferedBlockMgr ...................................................................... Patch Set 9: (2 comments) http://gerrit.cloudera.org:8080/#/c/4389/6/be/src/util/openssl-util.cc File be/src/util/openssl-util.cc: Line 78: SeedOpenSSLRNG(); > The RNG is global. Was the concern performance? Concern was not really about perf, but about making the behavior as simple/understandable as possible. If the RNG was thread-local some threads might never reseed their RNG because they never happen to hit the right global counter value, so that would have been wrong. A global RNG and a global counter seem correct and easy to understand, so I'm happy. Might be worth adding a comment somewhere that the RNG is global. http://gerrit.cloudera.org:8080/#/c/4389/6/be/src/util/openssl-util.h File be/src/util/openssl-util.h: Line 35: public: > I thought about it and it seemed mostly not useful, since verification agai How can you be sure the verification will fail? It seems like there's a remote chance that the hash_ will be initialized to a value that coincidentally matches the hash of the data you are passing in Verify(), but not the hash that would have been computed in Compute(). That chance even exists if we explicitly zero out hash_ or initialise it in some other way. -- To view, visit http://gerrit.cloudera.org:8080/4389 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibebe431f69c3c569cbff68171beaa32ef2ab03b6 Gerrit-PatchSet: 9 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes