From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597AbcGMRgy (ORCPT ); Wed, 13 Jul 2016 13:36:54 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:43399 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbcGMRgq (ORCPT ); Wed, 13 Jul 2016 13:36:46 -0400 Date: Wed, 13 Jul 2016 11:36:13 -0600 From: Jason Gunthorpe To: Ed Swierk Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Jarkko Sakkinen , Stefan Berger Subject: Re: [PATCH v9 0/5] tpm: Command duration logging and chip-specific override Message-ID: <20160713173613.GD19657@obsidianresearch.com> References: <1466557831-113440-1-git-send-email-eswierk@skyportsystems.com> <1468426776-42762-1-git-send-email-eswierk@skyportsystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.151 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 13, 2016 at 09:44:05AM -0700, Ed Swierk wrote: > On Wed, Jul 13, 2016 at 9:19 AM, Ed Swierk wrote: > > v9: Include command duration in existing error messages rather than > > logging an extra debug message. Rebase onto Jarkko's tree. > > Incidentally, with Jarkko's tree the tpm_tis module refuses to > initialize (with or without force=1): > > tpm_tis 00:03: can't request region for resource [mem 0xfed40000-0xfed44fff] > tpm_tis: probe of 00:03 failed with error -16 > > The memory region is not marked reserved by the BIOS: > fed30000-fedfffff : RAM buffer I think your bios is broken? A working BIOS will look like this: $ cat /proc/iomem | grep -i fed400 fed40000-fed44fff : pnp 00:00 It sets aside the struct resource during pnp: [ 0.097318] pnp: PnP ACPI init [ 0.097366] system 00:00: [mem 0xfed40000-0xfed44fff] has been reserved What did your system do? You should see prints like this: printk(KERN_DEBUG "e820: reserve RAM buffer [mem %#010llx-%#010llx]\n", start, end); Which only happen if E820_RAM is set, which is certainly not right for TPM memory. I don't know what kernel convention is to handle these sorts of defects? Is the use of the memmap kernel command line an appropriate work around? Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH v9 0/5] tpm: Command duration logging and chip-specific override Date: Wed, 13 Jul 2016 11:36:13 -0600 Message-ID: <20160713173613.GD19657@obsidianresearch.com> References: <1466557831-113440-1-git-send-email-eswierk@skyportsystems.com> <1468426776-42762-1-git-send-email-eswierk@skyportsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Ed Swierk Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Wed, Jul 13, 2016 at 09:44:05AM -0700, Ed Swierk wrote: > On Wed, Jul 13, 2016 at 9:19 AM, Ed Swierk wrote: > > v9: Include command duration in existing error messages rather than > > logging an extra debug message. Rebase onto Jarkko's tree. > > Incidentally, with Jarkko's tree the tpm_tis module refuses to > initialize (with or without force=1): > > tpm_tis 00:03: can't request region for resource [mem 0xfed40000-0xfed44fff] > tpm_tis: probe of 00:03 failed with error -16 > > The memory region is not marked reserved by the BIOS: > fed30000-fedfffff : RAM buffer I think your bios is broken? A working BIOS will look like this: $ cat /proc/iomem | grep -i fed400 fed40000-fed44fff : pnp 00:00 It sets aside the struct resource during pnp: [ 0.097318] pnp: PnP ACPI init [ 0.097366] system 00:00: [mem 0xfed40000-0xfed44fff] has been reserved What did your system do? You should see prints like this: printk(KERN_DEBUG "e820: reserve RAM buffer [mem %#010llx-%#010llx]\n", start, end); Which only happen if E820_RAM is set, which is certainly not right for TPM memory. I don't know what kernel convention is to handle these sorts of defects? Is the use of the memmap kernel command line an appropriate work around? Jason ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev