From patchwork Thu Nov 29 14:42:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 10704685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94CCF17F0 for ; Thu, 29 Nov 2018 14:44:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 875922F2DB for ; Thu, 29 Nov 2018 14:44:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8578E2F37C; Thu, 29 Nov 2018 14:44:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22D542F39C for ; Thu, 29 Nov 2018 14:44:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388153AbeK3BsO (ORCPT ); Thu, 29 Nov 2018 20:48:14 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37056 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729463AbeK3BsK (ORCPT ); Thu, 29 Nov 2018 20:48:10 -0500 Received: by mail-wm1-f68.google.com with SMTP id g67so2487387wmd.2 for ; Thu, 29 Nov 2018 06:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=IHkt2HGx7WuiDkTk3GBuMzWLRqccGVKmG+KvpRRwvfM=; b=qK613Bt4ok/pOB7qu9PEYyBBDcu2oeLjZnwEI7lYEF1cVD8UZKVteAvKS5qtxy4PyH NMB3xReq+u0Tm6Ygu0JvHffIPpKgUT3y4m0A3j74XUjVG0zyvVaNVf9ciKiEHl4BRFh2 COpPbyD15hyxVhXn9FYLH/Kh6zcy16gHCPNIURMq/L1aSbpfp4IuXonTHcdg1eAXD7Qp 7vu9E2Py1Ti1QPagT50oXsNnL2WT9up97Yp/ZMbD2qMuBLT3QDuhK+KmiqwJCAMUUuQT 8I5VSVTO2p1GQgQAUo+dOb4VQEiWIGHBQ8c3cuLV7eFkpND51VixMLAnNX/8vtiP4F+q zqRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IHkt2HGx7WuiDkTk3GBuMzWLRqccGVKmG+KvpRRwvfM=; b=tI+9fryl6ELGhEOpgA6kQqe3Fnzyx5imnRaQ4v7L8SstChob5fwYGqoYrD7URv2Jks OYomnSV+HaxQJNujtgLb8gPbWQtTQG1O3y/4OeU24VIq6OUuzd2iBNePvCVXTOro5r6v SczDpypPbQ8yGE5D8Wy1mI1Vx+F8WaP9p+/UyTMFPRy5iPOyLTAASVoFv7nPmbt4ieSU v6ysOT0qXHC91ozar/tiLkIbKiMECw+D64IMcFgUlBnS0equWEL8KcJCXVM1l9lILgWX 0iyESA91N5BV+bYlTD5IdlNBldcPTFn6jLAPSJ4eHX0+Wab2aK45P7gEFoB9kqV3tnsh pj+w== X-Gm-Message-State: AA+aEWYsreAKXc2bkvFI4AGfthYapEkIiSRNxjbazljKFIWQgvHd0bvh YwkETH9ouWeDohG206fsggzd6Q== X-Google-Smtp-Source: AFSGD/VFQGa4xQUv7uqWismRnCoCOCRKX2wrPdWabhnQYPME6jS3yG34DG6LSTFRiTtICC7G3oO1Zw== X-Received: by 2002:a1c:5656:: with SMTP id k83mr808322wmb.125.1543502553934; Thu, 29 Nov 2018 06:42:33 -0800 (PST) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id t131sm875406wmt.1.2018.11.29.06.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Nov 2018 06:42:32 -0800 (PST) From: Corentin Labbe To: davem@davemloft.net, ebiggers@kernel.org, herbert@gondor.apana.org.au, nhorman@tuxdriver.com Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v5 00/11] crypto: crypto_user_stat: misc enhancement Date: Thu, 29 Nov 2018 14:42:15 +0000 Message-Id: <1543502546-23870-1-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello This patchset fixes all reported problem by Eric biggers. Regards Changes since v4: - Inlined functions when !CRYPTO_STATS Changes since v3: - Added a crypto_stats_init as asked vy Neil Horman - Fixed some checkpatch complaints Changes since v2: - moved all crypto_stats functions from header to algapi.c for using crypto_alg_get/put Changes since v1: - Better locking of crypto_alg via crypto_alg_get/crypto_alg_put - remove all intermediate variables in crypto/crypto_user_stat.c - splited all internal stats variables into different structures Corentin Labbe (11): crypto: crypto_user_stat: made crypto_user_stat optional crypto: CRYPTO_STATS should depend on CRYPTO_USER crypto: crypto_user_stat: convert all stats from u32 to u64 crypto: crypto_user_stat: split user space crypto stat structures crypto: tool: getstat: convert user space example to the new crypto_user_stat uapi crypto: crypto_user_stat: fix use_after_free of struct xxx_request crypto: crypto_user_stat: Fix invalid stat reporting crypto: crypto_user_stat: remove intermediate variable crypto: crypto_user_stat: Split stats in multiple structures crypto: crypto_user_stat: rename err_cnt parameter crypto: crypto_user_stat: Add crypto_stats_init crypto/Kconfig | 1 + crypto/Makefile | 3 +- crypto/ahash.c | 17 +- crypto/algapi.c | 247 ++++++++++++++++++++++- crypto/crypto_user_stat.c | 160 +++++---------- crypto/rng.c | 4 +- include/crypto/acompress.h | 38 +--- include/crypto/aead.h | 38 +--- include/crypto/akcipher.h | 74 ++----- include/crypto/hash.h | 32 +-- include/crypto/internal/cryptouser.h | 17 ++ include/crypto/kpp.h | 48 +---- include/crypto/rng.h | 27 +-- include/crypto/skcipher.h | 36 +--- include/linux/crypto.h | 290 ++++++++++++++++++--------- include/uapi/linux/cryptouser.h | 102 ++++++---- tools/crypto/getstat.c | 72 +++---- 17 files changed, 676 insertions(+), 530 deletions(-)