Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp200663ybi; Fri, 24 May 2019 02:26:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNfZBYEttvAUmXev9MUVx6VOo+d0WLWGp9YNUrpg29zqdUwyEs58e4U92f8lfNZMav7WCM X-Received: by 2002:a17:902:1ea:: with SMTP id b97mr77470836plb.317.1558689992641; Fri, 24 May 2019 02:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558689992; cv=none; d=google.com; s=arc-20160816; b=EU7dQPcf1Vyeu1WP2phYImUHv38JZCnDonOGnqe+bV4Vnr4YR0zg6IQPhlX/osiMhR kzP9mJDTmvsrlJpLnnfmaFJxxN8D5EkX3ngF9oIu6xaYR0x8rVkH+cXGaEuvvYC68XLW 2nmWkTBwlKLJHVdf58wgwf89GJaiccD2c0cKsAheOouFTiUXHJm7BAdALR5hOqBVjfoS 9DuhZEn0N/y/bZnxmR3//FI0O3LrdWsPV154JEVgG6jeZmQfswBwu8LMeirtnGm7+HpT wgBayHX5oNLL0dSekyZuehHdgUPVVrfj1uZxeJzkDle+joEwAX89U0YsbZtSoTSofL8V xJ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=O5uzxv6jScEZI69BEin99uQol9SSmWGmZYkTmXGN+tk=; b=WAYcSXrq4j0K4XxjnZSHEIG7e8sffEQMhmQp3cJKFaSP/zgwftZ3oZN6h2ICI2jEQi QFH7IzqoIjW9q979ctEiRVFhAVbMypdGecpc+ZP0IwIsIfzLZ8Qv1VGD/EHqqhhuRa6C vx+ypcHoM+AFmJr6tyVx5uaG0DZLukxZJthCe6thdUnrxjlBLHnfxx4ziorOsqlml9Hi 3ovG5m+Fi6Cr218QtHAOXNpEQX35QQoQiCJuo9+bUTulSjEhDcdDaRkedMCTC1kKV7nU 5eIFxu1jCUroV2T/PZ4/oWAErgce/QTR1N5BjNeiUCXZrzLjT2uJ31enlsb0icShtjeW 1CXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4l6g1i+; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185si2901980pfa.180.2019.05.24.02.26.15; Fri, 24 May 2019 02:26:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@linaro.org header.s=google header.b=T4l6g1i+; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389782AbfEXJ0G (ORCPT + 99 others); Fri, 24 May 2019 05:26:06 -0400 Received: from mail-io1-f47.google.com ([209.85.166.47]:34905 "EHLO mail-io1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389758AbfEXJ0G (ORCPT ); Fri, 24 May 2019 05:26:06 -0400 Received: by mail-io1-f47.google.com with SMTP id p2so7257822iol.2 for ; Fri, 24 May 2019 02:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O5uzxv6jScEZI69BEin99uQol9SSmWGmZYkTmXGN+tk=; b=T4l6g1i+FaEHnFix9NYAoDm+dJq/pt1TCp1GA1lOVr9HAsDfxIwQYaR/fAt7TDjb4j 3Pn0AdAD3rwJjveq9qyB/EAM8Bw8yhtSVZY0lIrOrez0fic8CB0Y0qbwXa/bDhcSod7h 8zWtL+bELQiDcteUDtT2XYgh3oH42JF94PCAHtmfGBWbhGJWveqhFS86ZnOUbM9GLIbZ QmJxzvdtFvxrICa5OPPBttkkat6WRz7bqNYFop//e48CWbz0mecBC2PUh3hiMbKYb68w hdIesWYtJTKM089FqM+HgGINA/uVA2gO8032X0g4UwBXVVqEwXJw9JSE+5dFGAIfmt+Z tQfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O5uzxv6jScEZI69BEin99uQol9SSmWGmZYkTmXGN+tk=; b=AeZN645hp0xQgTtLWkUg67WV+J559FEA8lxJ98fhcRZpXk3fNpiw9gJmyE3T+7fcvd gVFXJLrKQ9EDr5cAQO1YjYeSRRw94MNDhL59iuk7ngFuTCRhSIgwoWkZT5uCpPgR83N7 g5Tp8XMgKkyE92B9oGvQK36T25Hl12L6fSwGP97xSOPwFfBwPXgX90wOWmWk0Xk5fs48 uybguJ3jldpSw/3D8qrRu2K29vZ2edsz/AFXdSL0yMuXD9IIr31Bkq9lhi+9aSovwuON Z+nn+i+Gt8/Gv+OW4MLxU7IenA5IcwCe9cnL3e+OCpLEnRzy8gLdbr+zcHzGFFum2A77 rpwQ== X-Gm-Message-State: APjAAAXwmDSe73gpZk2tY2ZGgYZlYXmJTNwLAHNEO9ux4iTGSTj0UJ8r ryOPR+WRIfqHLoyg3Bd2QrWyYdQHJafrH/FuD2tiLg== X-Received: by 2002:a5d:968e:: with SMTP id m14mr25232883ion.49.1558689965527; Fri, 24 May 2019 02:26:05 -0700 (PDT) MIME-Version: 1.0 References: <20190523185833.GA243994@google.com> <20190523200557.GA248378@gmail.com> <20190523234853.GC248378@gmail.com> <907eb6a5-dc76-d5ee-eccf-e7bd426a0868@c-s.fr> In-Reply-To: From: Ard Biesheuvel Date: Fri, 24 May 2019 11:25:52 +0200 Message-ID: Subject: Re: another testmgr question To: Pascal Van Leeuwen Cc: Christophe Leroy , "linux-crypto@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 24 May 2019 at 11:21, Pascal Van Leeuwen wrote: > > > > As I already mentioned in another thread somewhere, this morning in the > > > shower I realised that this may be useful if you have no expectation of > > > the length itself. But it's still a pretty specific use case which was > > > never considered for our hardware. And our HW doesn't seem to be alone in > > > this. > > > Does shaXXXsum or md5sum use the kernel crypto API though? > > > > The ones from libkcapi do (http://www.chronox.de/libkcapi.html) > > > > Christophe > > > I was not aware of that, so thanks for pointing that out. > Do they use the async calls (_aio) though? Because otherwise they shouldn't > end up being hardware accelerated anyway ... > All userland clients of the in-kernel crypto use it specifically to access h/w accelerators, given that software crypto doesn't require the higher privilege level (no point in issuing those AES CPU instructions from the kernel if you can issue them in your program directly) Basically, what is used is a socket interface that can block on read()/write(). So the userspace program doesn't need to be aware of the asynchronous nature, it is just frozen while the calls are being handled by the hardware.