Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5538678img; Wed, 27 Mar 2019 10:17:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8EBvmAhkqJ2B1U4K+LDdbd3ygG63UQ18mWbXRsx2/XWIa/lNxckP4nu8XLMSIyT8+sWef X-Received: by 2002:a63:6881:: with SMTP id d123mr35068761pgc.10.1553707024477; Wed, 27 Mar 2019 10:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553707024; cv=none; d=google.com; s=arc-20160816; b=pogKdhYqMoY4ESo+eB2s9LkCZyBo0QHxuIsoXyAnxZS8S7Oah1yF2YExCr+yjTArho cSAkBSY6yII37WxU6bxCg1B6g4Ci1jA1k6jFYZ9VWVg3KZjrPOi1kvrZ4VNTRUWrG+Iq 9ndNxsLzFb03APp0PtwqzOQht9NbniRkqt16pfJk0jkatglOcuL2wD9ctklKS+cefZ8s soLnC+blOXZKBquk2xQ/NkrBr3pQGg56wK1mjOtIDhg6VO4NWeEfJRpZzM7diwRimwxH cA5Fy+l5On3juki/HoF+KIeCbDklvWNXJSGDc8rARIwpHe/o8y3FktbQZPcIls9+U+FV WW+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HENEyDmJZGOh65ItVsa8GK+oMLDtRRD6rVwzbFATzko=; b=r88Q3B5T1VB0NE+azHF1jn6J+oO0IJgeBAgTUw2AjqeEiM39sRi8zGeeL25dbJb//h zfh/cL1/TDhAlfWAETX9hVNNL5hvLI824E4hPd7o7QvnX7ML4zL4p++aI9dQ1nkhhqNm ASA6N091cTWtHMv2Ztn/slDZ1QLkaKZs59vCcVjfClj+ueD3AxBig10dfC9ON9e+YUgB y3MVrqO6m0Z5ScUuY880my8iZxkaXuMwdJwTZDcnSk5TxUttvBjPVcc/qQYL+h/4+vPo TFdkJFHNkkocGTUK6ASQvD2D50Gj55nU+l2bRGaNhOP3yPt+5AhN8aYbi0QBuQnQftgl CRIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZoRGZRmW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si18292528pgs.579.2019.03.27.10.16.49; Wed, 27 Mar 2019 10:17:04 -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=@gmail.com header.s=20161025 header.b=ZoRGZRmW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728366AbfC0RQC (ORCPT + 99 others); Wed, 27 Mar 2019 13:16:02 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:36187 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727569AbfC0RQC (ORCPT ); Wed, 27 Mar 2019 13:16:02 -0400 Received: by mail-it1-f193.google.com with SMTP id h9so1409982itl.1; Wed, 27 Mar 2019 10:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HENEyDmJZGOh65ItVsa8GK+oMLDtRRD6rVwzbFATzko=; b=ZoRGZRmWyn0OMiisZgFMcK7u0lWc9fOj4z/8TTaiiz8SozvzBG2e8EueF0w5MmnP/y mG58L6FnRi75hrECtPHTlDlO7SY2gbOh5mGJeb9PA2fkwTGqOZtXrUHOSCx9eL+Bg6AP angbFGsXcP8RaifF09upcJ6cxPM6Y6cs/pLW1kI7c5J2NV5uYTSUz+tr/Baz/TYx7x2E F6NCF3dIxfNN6IALvuprTV4P+OyTkeWD+uXxBK+POjOIukZiAxyI+tHuEeRhnLLJg7p1 e9VFYO+fTLXxN0+0EnUyUdM3UbX2IX2w3VKgFZsz+coaJWhoYq9QfV1Q9bi53Pmup2pS C2FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HENEyDmJZGOh65ItVsa8GK+oMLDtRRD6rVwzbFATzko=; b=CPmm0iMgcu94Z2PMU7ZAJIFe1UE5e4s51tHemWH/uygoyj478P4GBDSzmg13809ipf VL3gRAu14eJa5SOh4gT55qQjtE+zSqDBm6fGrGgmOm38zqx0Wypmu2K39XAc0rK9evyd EjEOENaWI4ftv3/HJEH7BSu4j3VX4RY/3omQFGIiWLtRwO3bFtOShGWQFRRAtTEwFDHU jbMMEXM8p4ys18dzVt0V/rUPHOPfOW8xD0YUeg1ISXG1pgdOWiILobqsC9lMN2RdVuIM grPZgDreXsot09J6gHedDRVLRIsrbUXRSNXusvmHk4nfXQ4Ia8dWg5JyuO2rI3W7e9ZH bUJg== X-Gm-Message-State: APjAAAXMwl6PhT4K7jLeRAh7h5PnEsKg0ZOM1VO0ccgK+oRNqK+U210k tuRPj0s3BKz9v6tc76bCRm6yLcXAjiuROnMmVmg= X-Received: by 2002:a02:6d12:: with SMTP id m18mr28569551jac.54.1553706961262; Wed, 27 Mar 2019 10:16:01 -0700 (PDT) MIME-Version: 1.0 References: <20190326121158.13499-1-jarkko.sakkinen@linux.intel.com> In-Reply-To: <20190326121158.13499-1-jarkko.sakkinen@linux.intel.com> From: Dan Williams Date: Wed, 27 Mar 2019 10:15:50 -0700 Message-ID: Subject: Re: [PATCH v3] KEYS: trusted: allow trusted.ko to initialize w/o a TPM To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, James Morris , James Bottomley , Mimi Zohar , David Howells , "Serge E. Hallyn" , "open list:KEYS-TRUSTED" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 5:13 AM Jarkko Sakkinen wrote: > > Allow trusted.ko to initialize w/o a TPM. This commit adds checks to the > key type callbacks and exported functions to fail when a TPM is not > available. > > Cc: James Morris > Reported-by: Dan Williams > Tested-by: Dan Williams > Fixes: 240730437deb ("KEYS: trusted: explicitly use tpm_chip structure...") > Signed-off-by: Jarkko Sakkinen > --- > v3: > - remove unnecessary check for chip in init_trusted() v3 also tests ok here.