From patchwork Fri Nov 6 08:08:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 7567301 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 09E23C05C6 for ; Fri, 6 Nov 2015 08:09:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2814B206AD for ; Fri, 6 Nov 2015 08:09:02 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E35B2068E for ; Fri, 6 Nov 2015 08:09:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Zuc4w-0005cW-MD; Fri, 06 Nov 2015 08:08:58 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Zuc4v-0005bf-Fi for tpmdd-devel@lists.sourceforge.net; Fri, 06 Nov 2015 08:08:57 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of ts.fujitsu.com designates 80.70.172.49 as permitted sender) client-ip=80.70.172.49; envelope-from=martin.wilck@ts.fujitsu.com; helo=dgate10.ts.fujitsu.com; Received: from dgate10.ts.fujitsu.com ([80.70.172.49]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Zuc4u-0001J4-A4 for tpmdd-devel@lists.sourceforge.net; Fri, 06 Nov 2015 08:08:57 +0000 X-SBRSScore: None Received: from abgze77e.fsc.net ([172.25.138.143]) by dgate10u.abg.fsc.net with ESMTP/TLS/RC4-MD5; 06 Nov 2015 09:08:50 +0100 Received: from ABGEX74E.FSC.NET ([172.25.138.141]) by abgze77e.FSC.NET ([172.25.138.143]) with mapi; Fri, 6 Nov 2015 09:08:49 +0100 From: "Wilck, Martin" To: Jarkko Sakkinen Date: Fri, 6 Nov 2015 09:08:49 +0100 Thread-Topic: TPM_CHIP_FLAG_TPM2 ABI change in commit 9b774d5c Thread-Index: AdEYal4gEhk24uANTqCaw6/dUkYIFw== Message-ID: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US MIME-Version: 1.0 X-Spam-Score: -1.6 (-) X-Headers-End: 1Zuc4u-0001J4-A4 Cc: "tpmdd-devel@lists.sourceforge.net" Subject: [tpmdd-devel] TPM_CHIP_FLAG_TPM2 ABI change in commit 9b774d5c X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, HK_RANDOM_ENVFROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Jarko, tpm_tis driver under RHEL7.2 beta. The in-kernel parts of the TPM_Driver were using BIT(2) while the module code had BIT(1), so my TPM was misdetected as a 1.2 TPM. This is very hard-to-track ABI change which may go unnoticed in future distro backports, too. Is there a good reason to change the bit? I know upstream doesn't care about ABI, but there are folks out there who (have to) care. Regards Martin ------------------------------------------------------------------------------ --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -158,8 +158,7 @@ struct tpm_vendor_specific { enum tpm_chip_flags { TPM_CHIP_FLAG_REGISTERED = BIT(0), - TPM_CHIP_FLAG_PPI = BIT(1), - TPM_CHIP_FLAG_TPM2 = BIT(2), + TPM_CHIP_FLAG_TPM2 = BIT(1), }; This change has made me pull my hair out when I tried to run the latest