From patchwork Wed Sep 18 20:35:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 13807155 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C036D17E019; Wed, 18 Sep 2024 20:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726691767; cv=none; b=tPWjCmGTO6y1c1uebcTL/d7RFm/JRoYYvc/0M/rH2aYSPKG0z7QM6WgbZCUlm6ylWKUxfAj2ED9qyYgw9ArIVbr016nnRVFvLVlj2un6NGpouW0/gIaL0tdNWqkkK3UKFEHcQxMu1VN44NhzRKZWrG0Wsir29gdSkCApYjSIi74= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726691767; c=relaxed/simple; bh=bZjsGt2Pe4l16jCjFZuojXhJsBQT5BkyvpLMlnl2ZRc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FiQuPj4yK1Xm4VZNgXP2cP3xShY3Q8wY2gEjzYRA02GaP9NMk313VzEN67NCUyFYB4eKwVBthikk2RFIvoenA1hTYtPM7nag7xzvH8ioj/b2AdpZx6+t0umJdKzo2QokSgFBBoBbyrgfaQPDPMyX8quc5YyVUQln7XnijPmTPoY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HLiiRii3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HLiiRii3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 157DEC4CEC2; Wed, 18 Sep 2024 20:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726691767; bh=bZjsGt2Pe4l16jCjFZuojXhJsBQT5BkyvpLMlnl2ZRc=; h=From:To:Cc:Subject:Date:From; b=HLiiRii3N5eUiY8A10VZp1df1SjzgZnJNsmCnN4pYIvOo3U0kRWg8jjq/7JSAu1sA 0oPnS05GARDUMyQTAI7KlfF4dkNv424DsMNe2ZSugOCTMxVa1LEmiKZUPRWoN8iTEk g9VfDu5/lW1NYyW74K9uBKI9gmL1mVTja791AtcCV4iWM1ll/OvuVYWT+CHQfjKX6Y GPnUtqsmcqu9WpMSxmd4Sq6X0SxFJxdSwmwYjNzg+lkcbzr7aLxhH7DnSokAjxGK9a xw6KHVbQW1acU0kL+s2gn14R7hnaYpfV8Wz8OHLUINqo9SDLQLHNMGjsvV8SLv9dFN ydVBH2LU5jNVA== From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org Cc: James.Bottomley@HansenPartnership.com, roberto.sassu@huawei.com, mapengyu@gmail.com, Jarkko Sakkinen , Mimi Zohar , David Howells , Paul Moore , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/5] Lazy flush for the auth session Date: Wed, 18 Sep 2024 23:35:44 +0300 Message-ID: <20240918203559.192605-1-jarkko@kernel.org> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: keyrings@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 For the sake of: https://bugzilla.kernel.org/show_bug.cgi?id=219229 The baseline for the series is v6.11 tag. v3: https://lore.kernel.org/linux-integrity/20240917154444.702370-1-jarkko@kernel.org/ v2: https://lore.kernel.org/linux-integrity/20240916110714.1396407-1-jarkko@kernel.org/ v1: https://lore.kernel.org/linux-integrity/20240915180448.2030115-1-jarkko@kernel.org/ Jarkko Sakkinen (5): tpm: Return on tpm2_create_null_primary() failure tpm: Return on tpm2_create_primary() failure in tpm2_load_null() tpm: flush the null key only when /dev/tpm0 is accessed tpm: Allocate chip->auth in tpm2_start_auth_session() tpm: flush the auth session only when /dev/tpm0 is open drivers/char/tpm/tpm-chip.c | 14 ++++ drivers/char/tpm/tpm-dev-common.c | 8 +++ drivers/char/tpm/tpm-interface.c | 10 ++- drivers/char/tpm/tpm2-cmd.c | 3 + drivers/char/tpm/tpm2-sessions.c | 109 +++++++++++++++++++----------- include/linux/tpm.h | 2 + 6 files changed, 104 insertions(+), 42 deletions(-)