Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4005444imm; Wed, 5 Sep 2018 09:12:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZGMZSLKExny8oQduDQ+nnigYDQF8S/nAv9YKEAv0Z2dqVM1CKhWtNwq/rSU7vWY5qqjuqi X-Received: by 2002:a17:902:163:: with SMTP id 90-v6mr39362176plb.322.1536163940620; Wed, 05 Sep 2018 09:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163940; cv=none; d=google.com; s=arc-20160816; b=odumC5MzL3+fZ1AzHbEAsYU7INwsWjDwlupZs+mTGoN5ibwfBS/CTpb8waJ9bNtlwc 9OeY5qtJLDP4b/gga77y54yKQyNF/9ZzTU2U0+6iGJyBX7jkH6kcYDwirjuGQrC9QKya A41LBMT8r37WntmPutL2/iKRNEe3igzF4Ea8ebpd4SZiL1odEoB/QqJVTo+zjLRSOyzo tyB5E6HPO6TQvlUwPzRmRifR9LOYB3dZkKLMZ5c7FKDwvXRfe/dDcUvMvuQ6NMvfbhrz HpJbuKJgNPW8D1pwtRIYMFdv7mmkLobuOx18fWgf//AqaeuJuT4MQlVQk7xTzfe7jcB1 vajA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=5uZKHnXivNKXFPp0+S3F7wcqXy7dhrffCOf5jF5od9c=; b=xnnLq9bxcNw/isqPy0976X6yDSnbnVZzzFNZHynwqs/uomvC2cjihudH1yej4D9QRd BiBBaI35efVOGGvDA9hdW31qpZ2BIEQTMXSM5S3+k+Lac9eLZEPx4zPX/zw1lWrt8epR xrBbUgbDeIW/Est8tWtutzJ5/Z+mtGU3V2ShSAiXQSMJBVtcjkCf6tmdphrRi37shMbV CuzaqXXE1HXN/507KEMoXjn5kqUSNtF47puLtvgWfLZ5SLmd3X2Qz2BBKirCtzDKcmIB RvBj5OwLvRSIl//DOqbJAOxOIR2y6jHRWgarSchiszeUvByApCoAdtHG0InyD8xeEzKM CzIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=A65+jT6J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11-v6si2463265pgj.46.2018.09.05.09.12.04; Wed, 05 Sep 2018 09:12:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=A65+jT6J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727651AbeIEUlU (ORCPT + 99 others); Wed, 5 Sep 2018 16:41:20 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:37725 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727625AbeIEUlU (ORCPT ); Wed, 5 Sep 2018 16:41:20 -0400 Received: by mail-io0-f193.google.com with SMTP id v14-v6so6426427iob.4 for ; Wed, 05 Sep 2018 09:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=5uZKHnXivNKXFPp0+S3F7wcqXy7dhrffCOf5jF5od9c=; b=A65+jT6Jpkmhte+9cYqdm4FKcdFFlDMAOPTNtRoaVhMiJXwHnue/qKVPH0LoojUwz2 xXzS0L0D7oZBEhB1KP8nEq7UfB77Kqs3S4dVz26LzzQ5JhOk53/MGlwi5mS0ZKaUGx40 mvTyoWaxF792s/+lTPO4+7sjVnMRBrvZ7rGhtuvek445fdjQBfQKRNJHBCReJ5NcROgQ LE4MSw3MdJRFx7Q2HnW7B81dAVDFTLXjeE1SUBjSCAdPJH2oWsd3mJhsEJBUUlhLCDlu 4FwDFL+Dmj9E2HcK6NbszD4ZsnPlywJOGD4I/ljKNb3M1DAlbCuQPrAFwKieW7QeqfJh xATQ== 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=5uZKHnXivNKXFPp0+S3F7wcqXy7dhrffCOf5jF5od9c=; b=PzQZMDx+nslJM5+a7ZLxEAE3lJ4VDgwLH3+MNXsOSuUksUdk39pO3fcYb9i16FNpw2 Qx2QhSHME74vOLo+S9pi62aDFlWWcKELQMW8G+cio6i52TFxiTK6BUOgBc56I7LM197s QZD9nJcY/5JyIAZatBG8J8rHLBG93FNBKZxlNKkIq2nGgv/jmy9WkpIX/yXEvLYkbf/8 +raZhIEYA5UgP0nLsH9nTz7axPVkDmg51QEdWpNSgE09ITy9VJLEVa3OpcqhDICeNcvl Q/F2ZzJKKemnPopgNnYONwUgpozp3yitBOrVvJiBhYD8VGn4De4kwmCMcicOkZaEI9vE cQlQ== X-Gm-Message-State: APzg51Cun5LKkyNwH1jj64lJd8Dnfjy9Edz81bGfH1i5VdT1ADZiQ1Uy nne/s1EVxGmPu2175ntaaf/Fmiq2hSs= X-Received: by 2002:a6b:1487:: with SMTP id 129-v6mr27848433iou.103.1536163827023; Wed, 05 Sep 2018 09:10:27 -0700 (PDT) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id g6-v6sm793227iom.48.2018.09.05.09.10.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 09:10:25 -0700 (PDT) Subject: Re: [PATCH v7] drbd: Convert from ahash to shash To: Kees Cook , Philipp Reisner , linux-block , drbd-dev@lists.linbit.com, LKML References: <20180806233216.GA6037@beast> <20180905083320.GA28462@soda.linbit> From: Jens Axboe Message-ID: <7a643254-cc1d-0a27-17a7-40651b503256@kernel.dk> Date: Wed, 5 Sep 2018 10:10:24 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/5/18 10:04 AM, Kees Cook wrote: > On Wed, Sep 5, 2018 at 1:33 AM, Lars Ellenberg > wrote: >> On Tue, Sep 04, 2018 at 08:04:18PM -0700, Kees Cook wrote: >>> On Mon, Sep 3, 2018 at 11:04 PM, Kees Cook wrote: >>>> On Mon, Aug 6, 2018 at 4:32 PM, Kees Cook wrote: >>>>> In preparing to remove all stack VLA usage from the kernel[1], this >>>>> removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of >>>>> the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash >>>>> to direct shash. By removing a layer of indirection this both improves >>>>> performance and reduces stack usage. The stack allocation will be made >>>>> a fixed size in a later patch to the crypto subsystem. >>>>> >>>>> The bulk of the lines in this change are simple s/ahash/shash/, but the >>>>> main logic differences are in drbd_csum_ee() and drbd_csum_bio(), which >>>>> externalizes the page walking with k(un)map_atomic() instead of using >>>>> scattergather. >>>> >>>> Hi Lars! How does this look to you? If you can Ack I assume Jens would >>>> be able to take this. >> >> Sure, I should have ACKed it a month ago already. As I said, I believe >> you the crypto. And you added the kmap_atomic as I pointed out. >> All good. > > Great, thanks! Jens, can you take this? Done, queued up for 4.20. -- Jens Axboe