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: 540850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id C56091402A9 for ; Fri, 6 Nov 2015 19:09:05 +1100 (AEDT) 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-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 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