From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932137AbcEKWRj (ORCPT ); Wed, 11 May 2016 18:17:39 -0400 Received: from mga11.intel.com ([192.55.52.93]:17861 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932065AbcEKWRg (ORCPT ); Wed, 11 May 2016 18:17:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,609,1455004800"; d="scan'208";a="951325810" Date: Wed, 11 May 2016 15:17:34 -0700 (PDT) From: Mat Martineau X-X-Sender: mjmartin@mjmartin-mac01.local To: David Howells cc: mathew.j.martineau@linux.intel.com, tadeusz.struk@intel.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, dwmw2@infradead.org Subject: Re: [RFC PATCH 2/8] KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver 3] In-Reply-To: <20160511142207.4743.40300.stgit@warthog.procyon.org.uk> Message-ID: References: <20160511142152.4743.14414.stgit@warthog.procyon.org.uk> <20160511142207.4743.40300.stgit@warthog.procyon.org.uk> User-Agent: Alpine 2.20 (OSX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 May 2016, David Howells wrote: > diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt > index ca72b70a24b9..01c2ae28a8c0 100644 > --- a/Documentation/security/keys.txt > +++ b/Documentation/security/keys.txt > + If the key needs to be unlocked with a password, a logon-type key that > + holds the password may be given as the password argument ... > + If the key must be unlocked with a password before it can be used, > + password_id should point to a logon-type key that holds this. It should be noted that the password_id should be 0 if no password is to be used. > diff --git a/security/keys/keyctl_pkey.c b/security/keys/keyctl_pkey.c > new file mode 100644 > index 000000000000..7f51db984aaa > --- /dev/null > +++ b/security/keys/keyctl_pkey.c > +long keyctl_pkey_e_d_s(int op, ... > + ret = params.key->type->asym_eds_op(¶ms, in, out); Need to check for NULL asym_eds_op before calling. Regards, -- Mat Martineau Intel OTC