From patchwork Thu May 11 11:53:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 99627 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp689962qge; Thu, 11 May 2017 04:55:40 -0700 (PDT) X-Received: by 10.84.254.2 with SMTP id b2mr8564637plm.185.1494503740687; Thu, 11 May 2017 04:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494503740; cv=none; d=google.com; s=arc-20160816; b=mCFn9HD709aO7lkXo0VcJxDCqq5ec3jmJEwFKlvO4k55ZkubbLd88dpPy820k8lE4c xFop6He54yLJen6dxjXvihg9FdWeM9UYLdksRdH6w+Z7BZ47vnLCyiNmnjawTuMbIlJj XwVTnuG4pRSoPHicLlbY8YfPqqEotlvs8djUuN3P6YrKsgu9JtWCUIrJ6LGR5rqBWgoC d+Cu9qWj97Ln3Fyqzw/hryh+LUa4ShJquUZ9bQtysOPLPPkZ4TBF7c3YMzwFOHcBTBHh TiPGwLFNF9PLKXnSGZpGnqM0JhxQ/NPomHca1RnsA0lHms284vpWNIQgrcLE9K4hFLXE 9cSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=22Uk3PnSKObTFZOJ+2K31Ls7B2fjy1SePwBBixGhIY8=; b=Tndi65oh6vPM5g9EdJTB69Dz8Q1yeT4I6GVrkMcrpD7MhQcZ7AgzFwfmSQI5f6GJ+K 75QyXkZS9cDQoeRMwjq1IRBeJ+PAZWY/myVIqEehe0tYbJ/W/E2wAYm19LTDjaq3t8ct VxlwXhQ/+dhLMQ/Fkq8qrpWqVH094ouw/43t8yOaICqWlNAsWpSxcXMGkfSdyvCC96Sg wJTLw4lIGxNxYfLIhbY6zDC0M2/jka0RX60EgrQSRmIjaMXfwkOWtP4A9GMcLOIgSwYX sQoi63lF3CRq9F878dtDIv6IYSmZkP5hNbaGR9TSHIbI4EgPblesDUT6zYC+ZnxY0Ma2 8aOw== ARC-Authentication-Results: i=1; mx.google.com; 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 k65si1618878pge.99.2017.05.11.04.55.40; Thu, 11 May 2017 04:55:40 -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; 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 S932609AbdEKLyE (ORCPT + 25 others); Thu, 11 May 2017 07:54:04 -0400 Received: from foss.arm.com ([217.140.101.70]:46570 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932586AbdEKLyB (ORCPT ); Thu, 11 May 2017 07:54:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56EF72B; Thu, 11 May 2017 04:53:56 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 68B473F4FF; Thu, 11 May 2017 04:53:53 -0700 (PDT) From: Gilad Ben-Yossef To: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells Cc: Ofir Drang , Gilad Ben-Yossef , Eric Biggers , stable@vger.kernel.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org Subject: [PATCH 0/4] crypto: async crypto op fixes Date: Thu, 11 May 2017 14:53:41 +0300 Message-Id: <1494503626-15877-1-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set fixes various usage and documentation errors in waiting for async crypto op to complete which can result in data corruption. Note: these were discovered in the process of working on a patch set that replaces these call sites and more with a generic implementation that will prevent these problems going forward. These are just the fix ups for current code. Signed-off-by: Gilad Ben-Yossef CC: stable@vger.kernel.org CC: Eric Biggers Gilad Ben-Yossef (4): crypto: handle EBUSY due to backlog correctly crypto: drbg wait for crypto op not signal safe crypto: gcm wait for crypto op not signal safe crypto: Documentation: fix none signal safe sample Documentation/crypto/api-samples.rst | 2 +- crypto/asymmetric_keys/public_key.c | 2 +- crypto/drbg.c | 5 ++--- crypto/gcm.c | 6 ++---- 4 files changed, 6 insertions(+), 9 deletions(-) -- 2.1.4