From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753042AbbJZFow (ORCPT ); Mon, 26 Oct 2015 01:44:52 -0400 Received: from mga11.intel.com ([192.55.52.93]:29182 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbbJZFou (ORCPT ); Mon, 26 Oct 2015 01:44:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,200,1444719600"; d="scan'208";a="835403757" Date: Mon, 26 Oct 2015 07:44:39 +0200 From: Jarkko Sakkinen To: Mimi Zohar Cc: Peter Huewe , Marcel Selhorst , David Howells , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, chris.j.arges@canonical.com, seth.forshee@canonical.com, colin.king@canonical.com, josh@joshtriplett.org, Jason Gunthorpe , David Safford , James Morris , "Serge E. Hallyn" Subject: Re: [PATCH] keys, trusted: select TPM2 hash algorithm Message-ID: <20151026054439.GA22427@intel.com> References: <1445690562-11405-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1445800891.3072.36.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445800891.3072.36.camel@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 25, 2015 at 03:21:31PM -0400, Mimi Zohar wrote: > On Sat, 2015-10-24 at 15:42 +0300, Jarkko Sakkinen wrote: > > Added 'hashalg=' option for selecting the hash algorithm. > > > > Currently available options are: > > > > * sha1 > > * sha256 > > * sha384 > > * sha512 > > * sm3_256 > > Please consider using crypto/hash_info.c: hash_algo_name[], which > already define the algorithm string names. Use > include/crypto/hash_info.c to include a reference to this array. It wold work for me. I did ad-hoc because first example that I looked at was EcryptFS. I need to add sm3_256 to that array. I've found three different ways to write it: * sm3256 (various google hits) * sm3-256 (various google hits) * sm3_256 (TPM 2.0 Structures specification) Maybe the second option would be the most appropriate? > Boot command line options should be prefixed with the subsystem name. > So instead of hashalg, please use tpm_hashalg. The boot command line > option needs to be documented in Documentation/kernel-parameters.txt. I see. My commit message is clearly inadequate. It's an option for the keyring syscalls. > Mimi /Jarkko