Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp73485img; Tue, 19 Mar 2019 18:12:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKDGxxqc5OBYbehku3PRHmmYJp8RYssjA8YLnfTpDRRHhJYSt933N+PUfS9ijvGWJNUTqY X-Received: by 2002:a17:902:aa87:: with SMTP id d7mr27694037plr.146.1553044379772; Tue, 19 Mar 2019 18:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553044379; cv=none; d=google.com; s=arc-20160816; b=CdojMSzCTeDvblWWfFNBvKXzu6jdBvPWCeh17fFy58jrljgpNOWgDcdMf1ZbuOYyOk gAMyGXXMjHVRB1r/a5KmgAta2gAU7CTDadghF3vPBKgoNvRKse+xfjZbkY3HwNsaExeN 4tAC369XcKfXLnQb+aQqvpx7/eTpiZuNDRZPKgg9FoPPmy+O8X70wvHnIeXXT6RARU0c fojIBHhkqu7nnd3i5SRJgCig5XYwsX3WRltsJS29AjvG7AbSgCDbvZDHAtfI+jU6SwA1 tdHHbc7tx2fl3pU6J0tb35wttdL3bn24TiXQmNdMbdPB3zK2hm7uoAEA9eiioY/WuTzP 13ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=Ar9enAZQVPglyHYH+TzSFrk1556eUxde0VssF7+y68A=; b=apokH1IeUPydbJXDQ1UfvSDf6ofyZt9v8ct8GJB+lMEyU1wdcZbQ35PFCA5XNZg7U4 KIbfSbwpG/aPV+W1zb1UzkaoAS+jroj3orES8OLPxR3q4ks4DJ6hEittV+8rU73muC1P G6rxiwJNGp1brUhQ1uB170WVaYygi2Y8ak16omqBnCzmbm+atAkVh1mZdmTuEwjv05JV 5nkxc5Ho2RYI3kYS7AjgQ9r5U3L9309bLFEjtIh2+wolDd7FSN0u8Ws1T04IoY2oPz3T 7yzuCPTLXVGIDcTfo9Jta6ZC2vXTbowXmfoTzvHhz4yLmj0txsVMgAGjd47NvUMPnjOt qgXg== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si317713pgk.150.2019.03.19.18.12.44; Tue, 19 Mar 2019 18:12:59 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbfCTBLL (ORCPT + 99 others); Tue, 19 Mar 2019 21:11:11 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45400 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbfCTBLL (ORCPT ); Tue, 19 Mar 2019 21:11:11 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2K19ekg045940 for ; Tue, 19 Mar 2019 21:11:10 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rbakrafq8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Mar 2019 21:11:09 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Mar 2019 01:11:02 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 20 Mar 2019 01:10:59 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2K1B3k946596286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 01:11:03 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8ED5852052; Wed, 20 Mar 2019 01:11:03 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.93.235]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id A677C5204F; Wed, 20 Mar 2019 01:11:02 +0000 (GMT) Subject: Re: [PATCH 2/6] security/keys/encrypted: Clean up request_trusted_key() From: Mimi Zohar To: Dan Williams Cc: keyrings@vger.kernel.org, James Bottomley , David Howells , Vishal L Verma , linux-nvdimm , Linux Kernel Mailing List Date: Tue, 19 Mar 2019 21:10:52 -0400 In-Reply-To: References: <155297557534.2276575.16264199708584900090.stgit@dwillia2-desk3.amr.corp.intel.com> <155297558570.2276575.11731393787282486177.stgit@dwillia2-desk3.amr.corp.intel.com> <1553040398.4899.149.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19032001-0016-0000-0000-00000264EB9A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19032001-0017-0000-0000-000032C00283 Message-Id: <1553044252.4899.165.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-20_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=938 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200006 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-03-19 at 17:20 -0700, Dan Williams wrote: > On Tue, Mar 19, 2019 at 5:07 PM Mimi Zohar wrote: > > On Mon, 2019-03-18 at 23:06 -0700, Dan Williams wrote: > > > > diff --git a/security/keys/key.c b/security/keys/key.c > > > index 696f1c092c50..9045b62afb04 100644 > > > --- a/security/keys/key.c > > > +++ b/security/keys/key.c > > > @@ -706,6 +706,7 @@ struct key_type *key_type_lookup(const char *type) > > > found_kernel_type: > > > return ktype; > > > } > > > +EXPORT_SYMBOL_GPL(key_type_lookup); > > This needs to be moved to patch1. > > > Only the kernel is calling key_type_lookup(). Why does > > key_type_lookup() need to be exported? > > This patch series adds several new callers outside of keys-subsystem > core that need this export, the first one being encrypted-keys itself > in patch1. It's needed, because they could be compiled as kernel modules, not builtin (eg. EVM). Mimi > > drivers/nvdimm/security.c:57: type = key_type_lookup("encrypted"); > fs/ecryptfs/keystore.c:1627: type = key_type_lookup("encrypted"); > security/integrity/evm/evm_crypto.c:361: type = > key_type_lookup("encrypted"); > security/keys/encrypted-keys/encrypted.c:440: type = > key_type_lookup("trusted"); >