From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbcGMVLb (ORCPT ); Wed, 13 Jul 2016 17:11:31 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:49437 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbcGMVL3 (ORCPT ); Wed, 13 Jul 2016 17:11:29 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Ed Swierk Cc: Jason Gunthorpe , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Jarkko Sakkinen , Stefan Berger References: <1466557831-113440-1-git-send-email-eswierk@skyportsystems.com> <1468426776-42762-1-git-send-email-eswierk@skyportsystems.com> <20160713173613.GD19657@obsidianresearch.com> Date: Wed, 13 Jul 2016 15:58:35 -0500 In-Reply-To: (Ed Swierk's message of "Wed, 13 Jul 2016 13:00:28 -0700") Message-ID: <8760s9l0g4.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1bNRRE-0001ii-0V;;;mid=<8760s9l0g4.fsf@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19N41kMG1XwSpYCcHKx9Lt1f1OanTC4z0s= X-SA-Exim-Connect-IP: 67.3.204.119 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 1.0 XM_Doc_Oz_Body BODY: Dr. Oz body dropper * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Ed Swierk X-Spam-Relay-Country: X-Spam-Timing: total 1418 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.3 (0.2%), b_tie_ro: 2.4 (0.2%), parse: 1.14 (0.1%), extract_message_metadata: 17 (1.2%), get_uri_detail_list: 1.77 (0.1%), tests_pri_-1000: 10 (0.7%), tests_pri_-950: 1.98 (0.1%), tests_pri_-900: 1.58 (0.1%), tests_pri_-400: 32 (2.2%), check_bayes: 30 (2.1%), b_tokenize: 11 (0.8%), b_tok_get_all: 10 (0.7%), b_comp_prob: 3.7 (0.3%), b_tok_touch_all: 3.1 (0.2%), b_finish: 0.77 (0.1%), tests_pri_0: 1339 (94.4%), check_dkim_signature: 0.80 (0.1%), check_dkim_adsp: 5 (0.4%), tests_pri_500: 6 (0.4%), poll_dns_idle: 0.14 (0.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v9 0/5] tpm: Command duration logging and chip-specific override X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ed Swierk writes: > On Wed, Jul 13, 2016 at 10:36 AM, Jason Gunthorpe > wrote: >> I think your bios is broken? > > The BIOS is broken in many ways. I already have to pass > memmap=256M$0x80000000, otherwise PCIe extended config space > (MMCONFIG) is inaccessible. Also I found memmap=0x7000$0x7a7d0000 > works around "APEI: Can not request [mem 0x7a7d0018-0x7a7d0067] for > APEI ERST registers", as the BIOS seems to be mistakenly reserving > 0x7b7d0000-7b7d7000 instead. > >> 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. > > On my system I see > > e820: reserve RAM buffer [mem 0x0009b000-0x0009ffff] > e820: reserve RAM buffer [mem 0x75b02000-0x77ffffff] > e820: reserve RAM buffer [mem 0x7a1f6000-0x7bffffff] > e820: reserve RAM buffer [mem 0x7b800000-0x7bffffff] > e820: reserve RAM buffer [mem 0xfed30000-0xffffffff] > e820: reserve RAM buffer [mem 0x505deb000-0x507ffffff] > > which doesn't make a whole lot of sense, as several of those areas > overlap each other, never mind devices. > >> 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? > > It works for me, though I would like to know if there's another > approach. There is always poke your BIOS vendor until they deliver code that is not so b0rked it can not be used. You can also add a quirk based on the BIOS's mainboard identification string that fixes up the data provided by the BIOS. I remember a fair number of those dealing with reboot behavior and the like. Eric