Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5136051yba; Wed, 10 Apr 2019 12:09:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdUN/1JDx6WyNUGmhvp7/a8CtgEj/14pr+vNR/SA6R0mSg6i/6/e6UHWXKNq6MjXpQOma6 X-Received: by 2002:a65:648c:: with SMTP id e12mr43097262pgv.346.1554923354330; Wed, 10 Apr 2019 12:09:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554923354; cv=pass; d=google.com; s=arc-20160816; b=vYBj7OTZJHFfBFyrx7Mt8Wp9K8i+WnJ4h269YBnrU4SCXFcwZLuHtKBgMIGiyUy5AP CYt6D1b66PaPifPRq1qu/U7WNSCyTS0QiIAln4onhl66Ah+gmZCDfkVahZAYp2BDhuba QEu/A7OF8ikaJTQL7TrZzViAjokA/AZ4oR3vtLpmakRCQkzAs3WgBqQLrTHCK5jDJH9p y/3jLq/0NAmcxBdV6L17KG0QWqI1RCUXh9JRUcHldi/aiDhy/+8hUd98mli9YNSLZcnZ 4HlYBtVAyCyO3ZDemtSzPVK90LQ22DzN3cX55QFv330JyldlDde4U4Dk6y5285w4T8jc 5Zdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=hYPBuvgpuE2Zds3hBSSmSVuO4K3jFllqn06kjDD1Gzw=; b=BxhpNoCOKtUy+gQX4vMxJo9hLeJ/LZLYYrDqJeuJU4ekfKeGAkXwmnvkrjKBhUFVAZ v+bF0OjGIz9MbKr/zpiQaoEW9isjFVbOKF+om4Ar79cQCs6cz2zuaBO7lzaJxFQsMbqU b2g227al9ShkZbarNQSuhh0nZJ89KHv/+uDB0205I9n8HTpngIqAH40tiSFvj05hzu4Z zoXToir2O+JY0rrbRzkZ2KowlCdKXaCxH+ArYkVrmUWnKv6LzTFJg4ISiV1dF3YzfVap B7j7imvQVfc0HaOQ/SCmErsd5t0spZVROAjUOYdkSijyfLV5+lDs+EPLYdNOEGX2UQ7q plRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ElOu+iaI; arc=pass (i=1); 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si32180669pff.201.2019.04.10.12.08.58; Wed, 10 Apr 2019 12:09:14 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ElOu+iaI; arc=pass (i=1); 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731314AbfDJSLJ (ORCPT + 99 others); Wed, 10 Apr 2019 14:11:09 -0400 Received: from mail-eopbgr750129.outbound.protection.outlook.com ([40.107.75.129]:15726 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727431AbfDJSLI (ORCPT ); Wed, 10 Apr 2019 14:11:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=o1MKxrUL9hAS7Ws//LMS/WJREoACt53CgJZhjLG5u7xhdYWuFVEBPqeOcmU09Bc/U2iZNbBxTykkFkIlx2VCGZQOgyyrDi2I5FJRzRBjiagaVxWHBOSxLaCkALmlZN6clBN0mnmplpF18e9ZSYaF6I20SUhTk14fHdE6A3qE93o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hYPBuvgpuE2Zds3hBSSmSVuO4K3jFllqn06kjDD1Gzw=; b=OAX3VF3Ff2zCow/CrcYjsovEhAftuL1AyOpb6W5rUvRvHEmjWoFrVJ4C1Cs+rttwzzY3Eo2qVfvpZBIgk1LjlPjU5cdt31rhwd5KWfHXE4wYMEkQy+ZP8SmpQ8fs/XRPEQmv55CXjDO2952+SCuiEp0m48uKp3OOXxoDNVFRWmA= ARC-Authentication-Results: i=1; test.office365.com 1;dmarc=none action=none header.from=microsoft.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hYPBuvgpuE2Zds3hBSSmSVuO4K3jFllqn06kjDD1Gzw=; b=ElOu+iaItWaPoX9kN6rFbIn1rsyEqm42Jd3HyvBXdBhMPbLiDq+h5gLKYmLJqsG9kTfRmeP2LmflkvJGsmYAAMmw7iXJCl3+kmTlbzUutV+C/QZqlQlTVmemnooPsX7DRTJMe1FpiGgiRjZ0be86dplUB++y+JhdUoLL1aDuQ4w= Received: from CY4PR21MB0279.namprd21.prod.outlook.com (10.173.193.145) by CY4PR21MB0631.namprd21.prod.outlook.com (10.175.115.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.4; Wed, 10 Apr 2019 18:11:02 +0000 Received: from CY4PR21MB0279.namprd21.prod.outlook.com ([fe80::f5b8:74a7:6037:4977]) by CY4PR21MB0279.namprd21.prod.outlook.com ([fe80::f5b8:74a7:6037:4977%9]) with mapi id 15.20.1813.000; Wed, 10 Apr 2019 18:11:02 +0000 From: Thirupathaiah Annapureddy To: Jason Gunthorpe , Sasha Levin CC: Rob Herring , Peter Huewe , Jarkko Sakkinen , Mark Rutland , Jonathan Corbet , Arnd Bergmann , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Linux Doc Mailing List , "linux-integrity@vger.kernel.org" , Microsoft Linux Kernel List , "Bryan Kelly (CSI)" Subject: RE: [PATCH v2 1/3] ftpm: dt-binding: add dts documentation for fTPM driver Thread-Topic: [PATCH v2 1/3] ftpm: dt-binding: add dts documentation for fTPM driver Thread-Index: AQHU7wUUBWAv80WpfkyhtUpqzqEGmaY0VYOAgAE+44CAAAutgIAAAHYAgAAOLICAAADhAIAAAZjA Date: Wed, 10 Apr 2019 18:11:02 +0000 Message-ID: References: <20190409184958.7476-1-sashal@kernel.org> <20190409184958.7476-2-sashal@kernel.org> <20190410161949.GC11568@sasha-vm> <20190410170316.GK8997@ziepe.ca> <20190410175359.GE11568@sasha-vm> <20190410175708.GM8997@ziepe.ca> In-Reply-To: <20190410175708.GM8997@ziepe.ca> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=thiruan@microsoft.com; x-originating-ip: [2001:4898:80e8:1:1d2a:5ca0:ad29:1539] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bec83de8-cfaa-4aaf-d4d5-08d6bddfe429 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:CY4PR21MB0631; x-ms-traffictypediagnostic: CY4PR21MB0631: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(366004)(396003)(136003)(199004)(189003)(13464003)(71190400001)(7416002)(71200400001)(6436002)(68736007)(14454004)(8990500004)(4326008)(74316002)(478600001)(54906003)(86362001)(7696005)(110136005)(14444005)(256004)(305945005)(7736002)(99286004)(10290500003)(76176011)(486006)(46003)(10090500001)(86612001)(11346002)(476003)(52536014)(105586002)(316002)(22452003)(6506007)(53546011)(229853002)(25786009)(446003)(186003)(102836004)(93886005)(6116002)(33656002)(81156014)(81166006)(53936002)(97736004)(55016002)(6246003)(2906002)(8676002)(8936002)(106356001)(107886003)(9686003)(5660300002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0631;H:CY4PR21MB0279.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UxNnj+S7hBonGzb6j7jPxqzohyrrCiq7MBxPFtOqgwTuc0aPoR8DLHk+aLyHWY/wk59+TfozVZ31LK+bS3ic+p8y9uKrMZYQ5kHSQAF7tyU3lj+S1ZygqNLuRTUdTtG6EdicCaS5qQBlvO9vWXDEIiCC88vgEto7XeITv3MjGmnZUkfqLzhfYnXuwUGc5F1rMpcqdNJhw24Q3C7RPE48akLmL4tUJqAYkZoHa7o5ckbwz1MqC2IynZe6JhFETHJQdAufOWeDHdEKYR6Eqo9HxccdpDDH0SVv0FwbVyRr6tDkgujuoLCDwHiQY/6qZbQn/MuT/46rrT4xsp2wG5D5o4jRqNssbDIzTqtoCUm8CCbjU7WW1ZsVBJwRxRJEER8i6lRzN/1e9K1Dq3/xKTIbw8oT33awf6acz1jDPuFARA4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: bec83de8-cfaa-4aaf-d4d5-08d6bddfe429 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 18:11:02.1646 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0631 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Jason Gunthorpe > Sent: Wednesday, April 10, 2019 10:57 AM > To: Sasha Levin > Cc: Rob Herring ; Peter Huewe ; > Jarkko Sakkinen ; Mark Rutland > ; Jonathan Corbet ; Arnd Bergmann > ; Greg Kroah-Hartman ; linux- > kernel@vger.kernel.org; Linux Doc Mailing List ; > linux-integrity@vger.kernel.org; Microsoft Linux Kernel List kernel@microsoft.com>; Thirupathaiah Annapureddy ; > Bryan Kelly (CSI) > Subject: Re: [PATCH v2 1/3] ftpm: dt-binding: add dts documentation for > fTPM driver >=20 > On Wed, Apr 10, 2019 at 01:53:59PM -0400, Sasha Levin wrote: > > On Wed, Apr 10, 2019 at 02:03:16PM -0300, Jason Gunthorpe wrote: > > > On Wed, Apr 10, 2019 at 12:01:37PM -0500, Rob Herring wrote: > > > > On Wed, Apr 10, 2019 at 11:19 AM Sasha Levin > wrote: > > > > > > > > > > On Tue, Apr 09, 2019 at 04:18:29PM -0500, Rob Herring wrote: > > > > > >On Tue, Apr 9, 2019 at 1:50 PM Sasha Levin > wrote: > > > > > >> > > > > > >> The parameters are similar to the ones used by IBM's vTPM and > the > > > > > >> various I2C tpm drivers. > > > > > > > > > > > >Bindings describe h/w (or firmware interfaces in this case), not > drivers. > > > > > > > > > > > >> > > > > > >> Signed-off-by: Sasha Levin > > > > > >> .../bindings/security/tpm/tpm_ftpm_tee.txt | 13 > +++++++++++++ > > > > > >> .../devicetree/bindings/vendor-prefixes.txt | 1 + > > > > > >> 2 files changed, 14 insertions(+) > > > > > >> create mode 100644 > Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > > >> > > > > > >> diff --git > a/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > b/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > > >> new file mode 100644 > > > > > >> index 000000000000..20fca67a56c4 > > > > > >> +++ > b/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > > >> @@ -0,0 +1,13 @@ > > > > > >> +Required properties: > > > > > >> +- compatible: should be "microsoft,ftpm" > > > > > >> +- linux,sml-base: 64-bit base address of the reserved memory > allocated > > > > > >> + for the firmware event log > > > > > >> +- linux,sml-size: size of the memory allocated for the firmwa= re > event log > > > > > > > > > > > >Firmware is defining linux specific properties? What if I want t= o > run > > > > > >BSD? We should use 'reg' here instead. > > > > > > > > > > This is based on already existing code that defines these names, > see > > > > > tpm_read_log_of() in drivers/char/tpm/eventlog/of.c . > > > > > > > > BTW, that probably needs updating to handle endianness correctly. > > > > > > IIRC this legacy IBM code has broken endianness in the firmware.. > > > > > > All that stuff in read_log_of, and the related DT stuff, is historica= l > > > IBM special case-ness and should not be copied into new things. > > > > The fTPM driver does not use it on it's own, so I guess I can just drop > > this patch then? >=20 > If your ARM system boots via EFI then it should pass the firmware > event log through EFI mechanisms, IIRC. >=20 > Otherwise maybe you could make a case for using this, but only if the > old IBM stuff is perfectly emulated, bugs and all. >=20 > Do you even have an event log? >=20 Our ARM system is booting using U-boot and Device Tree.=20 So the ACPI/EFI table mechanism to pass binary boot measurements won't be a= pplicable.=20 We have event logs working and we are able to successfully read them using= =20 /sys/kernel/security/tpm0/binary_bios_measurements and parse them --Thiru > Jason