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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDE89C433F5 for ; Tue, 1 Mar 2022 14:17:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235172AbiCAOSR (ORCPT ); Tue, 1 Mar 2022 09:18:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbiCAOSQ (ORCPT ); Tue, 1 Mar 2022 09:18:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83012671; Tue, 1 Mar 2022 06:17:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8EB7D61549; Tue, 1 Mar 2022 14:17:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFA2BC340F9; Tue, 1 Mar 2022 14:17:33 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="FxuRFGkE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1646144249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wi3i96/wmqMIwx3wn7eIDg7ic4mvqpHlhPzqx/cxrvg=; b=FxuRFGkEk6bsiaMmwLO+GSj9BMSQzNGo3JLCFOX6lFbKZ2Xi+0R5zshySjhYq30vBbZogE KZGsFCX3JMrkaBvJvjVj9lyAL6c9TZCotqgv7FSUZo7lKmmz39cnosYJC1YjOt4dwdFUDH d5gwbmKbElhGAJYDcRwBSXi0Sfqovp8= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f2e36451 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 1 Mar 2022 14:17:29 +0000 (UTC) Received: by mail-yb1-f177.google.com with SMTP id f5so3653447ybg.9; Tue, 01 Mar 2022 06:17:29 -0800 (PST) X-Gm-Message-State: AOAM531sXDsWLQRv5ZcMLyQoI3zk4hyKaRmXNA39kEw5ZTVkwgIrH4KE SanbJnrvJBDYo4Jg+9ccPNYm9vIbfe4ifuwwDuw= X-Google-Smtp-Source: ABdhPJy+JE8PV2WW9wy7wujk4BA2IH2XCT1livVxX2BSwxc+6BFGyr7tWjee+U7ChBP6OKDVPnXxw23xb6xo+dT1IF8= X-Received: by 2002:a25:b905:0:b0:61e:23e4:949f with SMTP id x5-20020a25b905000000b0061e23e4949fmr24865932ybj.373.1646144246594; Tue, 01 Mar 2022 06:17:26 -0800 (PST) MIME-Version: 1.0 References: <20210610134459.28541-1-tianjia.zhang@linux.alibaba.com> <20210610134459.28541-2-tianjia.zhang@linux.alibaba.com> <52be961d-a00d-785d-8fb1-15b1a17bd74e@linux.alibaba.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 1 Mar 2022 15:17:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] crypto: sm4 - create SM4 library based on sm4 generic code To: Tianjia Zhang Cc: Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Gilad Ben-Yossef , Ard Biesheuvel , "Markku-Juhani O . Saarinen" , Jussi Kivilinna , X86 ML , Linux Crypto Mailing List , linux-arm-kernel , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Mar 1, 2022 at 2:22 PM Jason A. Donenfeld wrote: > You additional export symbols of those SIMD implementations in > arch/crypto/, which is not correct either, since nothing in the tree > uses those symbols. Please remove those EXPORT_SYMBOL directives as > well. Those functions can be static, and do not need to be declared in > the .h file. Actually, this part isn't quite so, because you share the avx implementation in the avx2 implementation. However, > Yes, and those accelerated implementations are part of the crypto API, > and are not used by anything except the crypto API. Hence this should > be in crypto/, just like everything else that is /only/ used for the > cryto API. lib/crypto/ is for in-kernel users of crypto via normal > code paths. sm4.c does not belong in lib/crypto/ and should be moved. This still holds. Jason 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A958C433F5 for ; Tue, 1 Mar 2022 14:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=6rW7jqOqdkGo14M0TiUopF/4Ap9v/0BofbjQHEgNX1s=; b=NRk2hWwGo1d/2+ e0dG5j1iXxRL608bvZ5EihAlbXaLmvQU2483dDryyXaAieNS1dNXp4zDpetlJbnEQfSoOyMAST+OI bQqI7bcsGW22h3EH6vjg/J9XhpCoSF+FfMadUiU3qNVgN9DG8eC2D76stgvhN7Hcg6j4lRmAkIPyf XyDRk/hmRSF/AVaURWmjysYHdtsVB36ykm9q1/AiTCthxkHN5JlQAH3XOVBLcAmNePIlhwAGihYa3 NpBsB69GSXTOUdD4/KMTzytt6MGZqbFClq5sMK9B7A1WW3wqIUDeOIt8SXiY5IhYYPWPl8XXlXR0/ K1n6BCz9X+Wh1RBavGIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP3Js-00H1Px-4h; Tue, 01 Mar 2022 14:17:40 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP3Jn-00H1OS-H3 for linux-arm-kernel@lists.infradead.org; Tue, 01 Mar 2022 14:17:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 17DC56155C for ; Tue, 1 Mar 2022 14:17:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 372C7C340F3 for ; Tue, 1 Mar 2022 14:17:34 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="FxuRFGkE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1646144249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wi3i96/wmqMIwx3wn7eIDg7ic4mvqpHlhPzqx/cxrvg=; b=FxuRFGkEk6bsiaMmwLO+GSj9BMSQzNGo3JLCFOX6lFbKZ2Xi+0R5zshySjhYq30vBbZogE KZGsFCX3JMrkaBvJvjVj9lyAL6c9TZCotqgv7FSUZo7lKmmz39cnosYJC1YjOt4dwdFUDH d5gwbmKbElhGAJYDcRwBSXi0Sfqovp8= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 0ec18ad5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Tue, 1 Mar 2022 14:17:29 +0000 (UTC) Received: by mail-yb1-f171.google.com with SMTP id y189so27470887ybe.4 for ; Tue, 01 Mar 2022 06:17:29 -0800 (PST) X-Gm-Message-State: AOAM530lKjKbskoHKl0dcTOZgv/fz2mz6ym9VzHWrEMa6cW6VoLEt6oj xfS3zgizJp3uKUUL0aXw3mWVU/Ch9mcyTqHMHds= X-Google-Smtp-Source: ABdhPJy+JE8PV2WW9wy7wujk4BA2IH2XCT1livVxX2BSwxc+6BFGyr7tWjee+U7ChBP6OKDVPnXxw23xb6xo+dT1IF8= X-Received: by 2002:a25:b905:0:b0:61e:23e4:949f with SMTP id x5-20020a25b905000000b0061e23e4949fmr24865932ybj.373.1646144246594; Tue, 01 Mar 2022 06:17:26 -0800 (PST) MIME-Version: 1.0 References: <20210610134459.28541-1-tianjia.zhang@linux.alibaba.com> <20210610134459.28541-2-tianjia.zhang@linux.alibaba.com> <52be961d-a00d-785d-8fb1-15b1a17bd74e@linux.alibaba.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 1 Mar 2022 15:17:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] crypto: sm4 - create SM4 library based on sm4 generic code To: Tianjia Zhang Cc: Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Gilad Ben-Yossef , Ard Biesheuvel , "Markku-Juhani O . Saarinen" , Jussi Kivilinna , X86 ML , Linux Crypto Mailing List , linux-arm-kernel , LKML X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_061735_676913_9C9CF7C3 X-CRM114-Status: GOOD ( 18.76 ) 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 Tue, Mar 1, 2022 at 2:22 PM Jason A. Donenfeld wrote: > You additional export symbols of those SIMD implementations in > arch/crypto/, which is not correct either, since nothing in the tree > uses those symbols. Please remove those EXPORT_SYMBOL directives as > well. Those functions can be static, and do not need to be declared in > the .h file. Actually, this part isn't quite so, because you share the avx implementation in the avx2 implementation. However, > Yes, and those accelerated implementations are part of the crypto API, > and are not used by anything except the crypto API. Hence this should > be in crypto/, just like everything else that is /only/ used for the > cryto API. lib/crypto/ is for in-kernel users of crypto via normal > code paths. sm4.c does not belong in lib/crypto/ and should be moved. This still holds. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel