From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D130C433ED for ; Wed, 12 May 2021 21:33:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4AFE61106 for ; Wed, 12 May 2021 21:33:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4AFE61106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FNgVEOnYMZvbJsjB2EPpq5a/8ior0wl5DjgMRk9U13o=; b=UbEqcykKSM319pPVxC4lKD2tv k4tklx5KNbq2Rt7QlBLHaUlpo+uutqytRBZGU3EHwYvMkCZohKmEqURK/aKS5Y2HFeDLhJmKAPJ4G Np7ErqD0Z2UJ6KokwfcIDBm5/HYn0kCTXiW91ChMhF0JadWNqVPOr7uIArUisg0uxY0sB+eZGmEEQ bUkH6cUKlstIYoA+K022TcgcQpAUwrjzWtgYQDZ1SY0gdTvDJI3KG1zo96Y+qmIGCEZ3Bne8XbIwL 3e/GvJchocc8nRWNPIMh4kOvjfVAoLuor2ZCGiXHfgwwQMotWb722Slzpap+OeR5kczRt4HRk80KA sa4rFcn0A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgwRy-0043uH-7L; Wed, 12 May 2021 21:31:26 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgwRu-0043tn-32 for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 21:31:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OAAlNOf1uOXTWb17XYkxTD2FRz+0rfsKiFX8+G83r0o=; b=eOCqJr7cFN43KnvLubi3oiTv73 CT78/emm/sJFJ1fjY5f1IP7QoLqQ+ridTU+s+yNOrGjpsk0pLoP+Lig1P/0aHfw3E5bXmmP7fqUCk zssa3VEfEgA3zLPycdEAcxM9Z1G7fPVT0TUwHr2tJQ5No3EETdqCjDje0yba/19c5BBJL0e7iYJ+J wAFisowIRKLWqILvrR2PaXBOnu/KuPbPJJrICRTV9L8KU/70/NfdwQQbf3Am6mLL33DtOq1jo8MS/ U1QfErhusezgi25Q+UatUQdl8XuoRhXEIhIJi6BlgWuG67NvL5G5xICK2QuT0naB23dESlSK66Kn3 Hs8cl5Ag==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgwRr-00AqEt-65 for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 21:31:20 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D7D461407 for ; Wed, 12 May 2021 21:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620855078; bh=OAAlNOf1uOXTWb17XYkxTD2FRz+0rfsKiFX8+G83r0o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=u0wt+mvVnpqtUirH/i1z/hLrWQc1u8GiS1LRUg2uLxhAWeV7lr8NND/061hJBw8c5 2e3hKJjVy1KOY/n568ac9ZBjtiA8kYErjPs7hZ6zmmU3KSEYoAptnHUPgcipmO3siG wN7kZ02vFBHpv0EUlRSDDd/FnHjBfoqH65vqPml/tVCMQdpWkxgQLE/E/DYIJfWn2K XR4nVSsyaF1CGOArSrRLfXQPbs5P8CK4SWfeOGLXml96+WRRXtMpZnCnZ1ewXp85+f T6sCn57AvwDRDtpRC2j9+nohAsP7n2zbsrJTOi01gCn/ivD5vtfsxvMJjhDeoIhpaw 2GbRfp0rjFH0w== Received: by mail-ot1-f44.google.com with SMTP id t10-20020a05683022eab0290304ed8bc759so771443otc.12 for ; Wed, 12 May 2021 14:31:18 -0700 (PDT) X-Gm-Message-State: AOAM530zDYm2wFQwYSCh6MPdqBcbj9thFmGjJQKcyoZ/wqjuZnL78F2i aafRlNzls+2J0CrLbsIRHY7X7z3xyruD1kJxMTA= X-Google-Smtp-Source: ABdhPJyrUMSRYMeITDk5+ILCDguAypmRVcPtQOTC2Xo5lgpzcNFod81nouBZbhXIWcH8a7oJ+AgJk3CCQCDUoOQ5H4w= X-Received: by 2002:a9d:69c5:: with SMTP id v5mr31870218oto.108.1620855077847; Wed, 12 May 2021 14:31:17 -0700 (PDT) MIME-Version: 1.0 References: <20210512184439.8778-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Wed, 12 May 2021 23:31:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 0/7] running kernel mode SIMD with softirqs disabled To: Eric Biggers Cc: Linux Crypto Mailing List , Linux ARM , Herbert Xu , Will Deacon , Android Kernel Team X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_143119_311388_07896D7A X-CRM114-Status: GOOD ( 26.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 12 May 2021 at 22:11, Eric Biggers wrote: > > On Wed, May 12, 2021 at 08:44:32PM +0200, Ard Biesheuvel wrote: > > This is a follow-up to [0], but given that the arm64 architectural > > pieces have been merged for arm64, the only remaining changes are crypto > > specific. Therefore, the audience has been reduced to those people who > > are likely to care about these specifics. > > > > Patch #1 addresses an issue in the skcipher walker which doesn't handle > > zero sized AEAD inputs entirely consistently, which is uncovered by the > > change in patch #7. > > > > Patches #2 and #3 add some sanity checks to the public AEAD and skcipher > > APIs to limit their availibility to either task or softirq context > > (which is the only way in which they are currently being used). Adding > > this restriction permits the arm64 crypto code to get rid of all scalar > > fallbacks, given that on this architecture, softirqs are no longer > > served while the SIMD unit is being used in kernel mode, which means > > that the scalar fallbacks are never needed. These are removed in the > > remaining 4 patches. > > > > [0] https://lore.kernel.org/linux-arm-kernel/20210302090118.30666-1-ardb@kernel.org/ > > Did you check whether any updates to the self-tests in testmgr.c are warranted? > Specifically, is disabling the use of SIMD for testing still something that > makes sense? > The situation is not ideal, but I am not sure what we can do about this: the scalar fallbacks are gone, which means that the SIMD unit will be used in the test even if testmgr attempts to disable it. But keeping the scalar fallbacks just for the test suite makes no sense either. So I don't think we should change anything, other than perhaps document this somewhere (any suggestions on a place to put that) Note that the library routines, as well as shashes (which are sometimes exposed via library routines, e.g., CRC-T10DIF and CRC-32, and maybe others) are different, which is why their scalar fallbacks are retained. There, we need the testmgr to override SIMD availability to ensure that combinations of the SIMD and scalar code are tested. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel