Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1965885imj; Fri, 8 Feb 2019 10:09:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IbEXFZbP8sbVJeq8E572ygB3+g+IkQtpQ0vepMoVPVH9Cvr4cPsXfH6sG8jv9h4pUbaENXl X-Received: by 2002:a17:902:3181:: with SMTP id x1mr23754761plb.58.1549649380894; Fri, 08 Feb 2019 10:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549649380; cv=none; d=google.com; s=arc-20160816; b=JiG0OCHzZRl80bICNPU8yOINRxV/MZ6dHmArV4tfDR/h2wozABS2KzH2dF5z431VFp FO6tSbnADMGZ+3dYVMBerx15eKIPRv4AiJYnQaEH2EJ1OivdKlu8nvEDveuXQPVduZQg NE4o7vs7hJSqClNLr4w84fYK8uIDE2Xn5y9mnU7uj9CE9Js3NzQjdotAYzmkn4kt4Awb 4hFQBxiCwuzFfvMJStTvknBmz2x29lu44JBPguL0TMXjzEgIJ4wzsV5un5U2U3OelcBq 3UrDeCQvVnnVn/LWfo8xC1bwF9QYlNwsDB39LbeEEZDQ2lRc95sCgy/rsLwLVIKDhi1s jUEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ntf4/qnuUbYevWpf77XZ2HkqS4gd3Q0alF1yESZIiBo=; b=Shg19p2JXzE9GIrmmI6585aijukrmK720TMVhWmbH4jCjJvB5IYckksGqpetbihzFY Hg9vdt/VG/gvrLQTT2CqRsxYU3w/CIMv2F22xX0gMuilI88UcExkGLqdfXbeS6+rWVYx j0yf3rq9nTrDh51JvkgqxgSsg6A2qX4jMwi4qBhd6hQ+1TngfbEGyLW61X74lkOgVshJ qA0bzF3VsvJdVF3Ojzmlr193Q062ghHf31ltsCxmf5zg/onH491EamfV1h4gyG9H++HA 88Nf3nI7Q7/LzJq/rT3ILaoTmKDP5FGdktve9WQkHEN1DD+aguoWVV3ngh5+V0tnh8wX CNIA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si2458527pgv.1.2019.02.08.10.09.24; Fri, 08 Feb 2019 10:09:40 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbfBHSJF (ORCPT + 99 others); Fri, 8 Feb 2019 13:09:05 -0500 Received: from mga09.intel.com ([134.134.136.24]:54965 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727373AbfBHSJF (ORCPT ); Fri, 8 Feb 2019 13:09:05 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2019 10:09:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,348,1544515200"; d="scan'208";a="116299433" Received: from shivamur-mobl1.gar.corp.intel.com (HELO localhost) ([10.249.254.162]) by orsmga008.jf.intel.com with ESMTP; 08 Feb 2019 10:09:00 -0800 From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Stefan Berger , Alexander Steffen , Jarkko Sakkinen Subject: [PATCH v4 0/2] tpm: Unify send() callbacks Date: Fri, 8 Feb 2019 20:08:55 +0200 Message-Id: <20190208180857.12330-1-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jarkko Sakkinen A portion of send() callbacks have returned length, in many cases just returning back what was given as an argument, and tpm_crb has returned 0 on success. This patch set fixes and unifies the behaviour. v4: * Return zero already in tpm_tis_send_main() so that it is applied to all call sites of tpm_tis_send(). * Fixup tpm_ibmvtpm_send() documentation. v3: tpm_tis_core fix was left out of the staging area :-( v2: The drivers tpm_nsc and tpm_infineon were forgotten. For this version I checked both with find and command and from Kconfig that everything that is supposed to be a driver directly interfacing with the TPM core, is included (e.g. discluding tpm_tis_spi). Jarkko Sakkinen (2): tpm: Unify the send callback behaviour tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete drivers/char/tpm/st33zp24/st33zp24.c | 2 +- drivers/char/tpm/tpm_atmel.c | 2 +- drivers/char/tpm/tpm_i2c_atmel.c | 10 +++++++++- drivers/char/tpm/tpm_i2c_infineon.c | 2 +- drivers/char/tpm/tpm_i2c_nuvoton.c | 2 +- drivers/char/tpm/tpm_ibmvtpm.c | 8 ++++---- drivers/char/tpm/tpm_infineon.c | 2 +- drivers/char/tpm/tpm_nsc.c | 2 +- drivers/char/tpm/tpm_tis_core.c | 2 +- drivers/char/tpm/tpm_vtpm_proxy.c | 3 +-- drivers/char/tpm/xen-tpmfront.c | 2 +- 11 files changed, 22 insertions(+), 15 deletions(-) -- 2.19.1