Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp47439ybl; Thu, 12 Dec 2019 13:48:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwK49HAFkEuSqVLpNA37zHo/qhN/xCiVK1Qm9n7X3J0fHW891NV3GIlW4PEqT/1Qd4h4HSf X-Received: by 2002:a9d:7f02:: with SMTP id j2mr10443960otq.123.1576187338514; Thu, 12 Dec 2019 13:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576187338; cv=none; d=google.com; s=arc-20160816; b=HYZV+4aCwXkJX9buzRPysJZPtl8oOLwDjn8nrN574GfKgGz4qQh8KnDAMq2qSu8uei D7CteRVbtM7BrEwtHanODJiu8wX98wrb1MI0X/dYV19cToqoJzrqm1YRBDLSFe+uVUrj o8QWUlokfk3DgSEKOSDD4WRVw6BQQL3p/wyvDDLtJd6DkjEqovqpHGXKhH5c52LlmhQc Wf8nQQs6oUJpC4EpAn8njbjRbNjRzTZ3yhojzOYzwheFfhiWRqbeLnrnKRgz1ezExTiu K/SfnT6tHyhjOZB83GiPVAVkboEM7RQ7rOeolkwxuYoiDOBknM4QxYpK+lSQdVtGctHX Mpfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:cc:to:date:from:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:dkim-signature:dkim-signature; bh=cn5SwL/woZdHkdZ5Iqflx95PMvurY58IPbwq2p/vqfg=; b=Lyitbu9Ar18Ut7GZyXJJctQhbPP9zQ187/j91H9LonNmihLIykRE/kEWVpih6MeXDA USN0PCfrrrA1zd0phVcv/vPu2RnFn5XJjHaoj/SnbOmV4VhpqS8l6jHArghtqtVC9iWv w+cUEgEHhzqwtq+d8XORhkIN2wVAkm7cQ6btRN9SmK72P0PkNITDIeOjKeHqigD56A/t 8fuxWBxDX7H9I0zs0Ey0zmm6hkS4kLy7lxoP6psqGG4xWi8iLYedpBLPuo/OJzDWstFR k9X+KOooSOsPqWu0INLthIiy21DX75C/VhmbW8iSMl3XfoODJFx5EHJ9BXrYmEdOaEmb lf4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=RhFXmawa; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=RhFXmawa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si3876717otl.138.2019.12.12.13.48.45; Thu, 12 Dec 2019 13:48:58 -0800 (PST) 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=fail header.i=@hansenpartnership.com header.s=20151216 header.b=RhFXmawa; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=RhFXmawa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731018AbfLLVLv (ORCPT + 99 others); Thu, 12 Dec 2019 16:11:51 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:52650 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730806AbfLLVLu (ORCPT ); Thu, 12 Dec 2019 16:11:50 -0500 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 464A88EE18E; Thu, 12 Dec 2019 13:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1576185110; bh=yv+HcFhaQIT9rAZ7nFInNgC/snyyLwKN8IuDMxHyfBk=; h=In-Reply-To:References:Subject:From:Date:To:CC:From; b=RhFXmawa0U2zgCzGKSIRRJRSNVq5buQ59TU3mTXfiGbN9ZJ9dPx7WZ6Utb39OyqTr P9D8Pf4tWKAIn3WF3oHUErLxGbZQ719fCx5VVdUjSKWp2Q6j/hude1hbEAGjyMR3qn CxzA4cH3t2YVcShy6uV3o23/vJfnItviTjwga5Gw= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8tNC8mHn8sfW; Thu, 12 Dec 2019 13:11:50 -0800 (PST) Received: from [9.232.166.242] (unknown [129.33.253.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 07B058EE0C7; Thu, 12 Dec 2019 13:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1576185110; bh=yv+HcFhaQIT9rAZ7nFInNgC/snyyLwKN8IuDMxHyfBk=; h=In-Reply-To:References:Subject:From:Date:To:CC:From; b=RhFXmawa0U2zgCzGKSIRRJRSNVq5buQ59TU3mTXfiGbN9ZJ9dPx7WZ6Utb39OyqTr P9D8Pf4tWKAIn3WF3oHUErLxGbZQ719fCx5VVdUjSKWp2Q6j/hude1hbEAGjyMR3qn CxzA4cH3t2YVcShy6uV3o23/vJfnItviTjwga5Gw= User-Agent: K-9 Mail for Android In-Reply-To: References: <157617292787.8172.9586296287013438621.stgit@tstruk-mobl1> <157617293957.8172.1404790695313599409.stgit@tstruk-mobl1> <1576180263.10287.4.camel@HansenPartnership.com> <1576184085.10287.13.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH =v2 3/3] tpm: selftest: cleanup after unseal with wrong auth/policy test From: James Bottomley Date: Thu, 12 Dec 2019 16:11:42 -0500 To: Tadeusz Struk , jarkko.sakkinen@linux.intel.com CC: peterz@infradead.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, mingo@redhat.com, jeffrin@rajagiritech.edu.in, linux-integrity@vger.kernel.org, will@kernel.org, peterhuewe@gmx.de Message-ID: <0cfd1aa8-b4d4-4903-a7cc-70191ca842f4@email.android.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On December 12, 2019 4:07:26 PM EST, Tadeusz Struk wrote: >On 12/12/19 12:54 PM, James Bottomley wrote: >> Not in the modern kernel resource manager world: anyone who is in the >> tpm group can access the tpmrm device and we haven't added a >dangerous >> command filter like we promised we would, so unless they have >actually >> set lockout or platform authorization, they'll find they can execute >it > >The default for the tpm2_* tools with '-T device' switch is to talk to >/dev/tpm0. > >If one would try to run it, by mistake, it would fail with: > >$ tpm2_clear -T device >ERROR:tcti:src/tss2-tcti/tcti-device.c:439:Tss2_Tcti_Device_Init() >Failed to open device file /dev/tpm0: Permission denied > >To point it to /dev/tpmrm0 it would need to be: >$ tpm2_clear -T device:/dev/tpmrm0 And most other toolkits talk to the tpmrm device because the tpm 1.2 daemon based architecture didn't work so well. The point is that if tpm2_clear works on your emulator, it likely works on your real tpm, so making the tests safer to run is not unreasonable. James -- Sent from my Android device with K-9 Mail. Please excuse my brevity.