Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kdbP7-0003NQ-88 for mharc-grub-devel@gnu.org; Fri, 13 Nov 2020 10:54:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdbP5-0003Mz-GJ for grub-devel@gnu.org; Fri, 13 Nov 2020 10:54:23 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdbP3-0008EE-Jf for grub-devel@gnu.org; Fri, 13 Nov 2020 10:54:23 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0ADFhJ8r151300; Fri, 13 Nov 2020 10:54:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : reply-to : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=iIQmQS0nqHWQ93ebd0orIHkKYIl9IyNO/8026WflAno=; b=fJvcH+SJMEFOqSGorELE+phzI/vs/g7LY3rimU8BR5+TuUXenFEToAThIgBFK+NG8eN1 ezxDz8qBQKal8KE6dy0KcIdrX2pivDQ21Ou16cEQulnEVSwCQ//W4Wza3FLn51PubKt+ A3eQJ83TMijGVYc9AzRp829Nh14/+EG0qhA5NSDtL+FPNA7MfP1elFyFfiw5vM9VULQd OFM6E5q+GLNa82AIJcZ1R0kFndstnD0wVb+JPShb0bf35Nv1fa4vMxWoaHHObCIyoQJF 8ME0JQRsA2RCQsd4TbIuuu6aGMuoIjM+ufl45JxnSOJLlvjsIH9lyKnQn+Jd8yhCtHBr tQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34sw1gr73w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Nov 2020 10:54:17 -0500 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0ADFsG56033650; Fri, 13 Nov 2020 10:54:17 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 34sw1gr62t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Nov 2020 10:54:16 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0ADFmBeL004491; Fri, 13 Nov 2020 15:49:13 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04wdc.us.ibm.com with ESMTP id 34q5nfcn1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Nov 2020 15:49:13 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0ADFn3ur35259048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Nov 2020 15:49:03 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7850C78063; Fri, 13 Nov 2020 15:49:09 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E091278060; Fri, 13 Nov 2020 15:49:06 +0000 (GMT) Received: from jarvis.int.hansenpartnership.com (unknown [9.85.145.64]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 13 Nov 2020 15:49:06 +0000 (GMT) Message-ID: <2b26a86217576e5fc90234f3d99b274d81e3c571.camel@linux.ibm.com> Subject: Re: [PATCH 2/3] cryptodisk: add OS provided secret support From: James Bottomley Reply-To: jejb@linux.ibm.com To: "Dr. David Alan Gilbert" Cc: grub-devel@gnu.org, dovmurik@linux.vnet.ibm.com, Dov.Murik1@il.ibm.com, ashish.kalra@amd.com, brijesh.singh@amd.com, tobin@ibm.com, david.kaplan@amd.com, jon.grimm@amd.com, thomas.lendacky@amd.com, frankeh@us.ibm.com Date: Fri, 13 Nov 2020 07:49:05 -0800 In-Reply-To: <20201113132309.GN3251@work-vm> References: <20201113012206.24246-1-jejb@linux.ibm.com> <20201113012206.24246-3-jejb@linux.ibm.com> <20201113132309.GN3251@work-vm> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-13_10:2020-11-13, 2020-11-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011130099 Received-SPF: pass client-ip=148.163.156.1; envelope-from=jejb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/13 09:01:54 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2020 15:54:23 -0000 On Fri, 2020-11-13 at 13:23 +0000, Dr. David Alan Gilbert wrote: > * James Bottomley (jejb@linux.ibm.com) wrote: [...] > > @@ -1117,11 +1151,28 @@ grub_cmd_cryptomount (grub_extcmd_context_t > > ctxt, int argc, char **args) > > else if (state[1].set || (argc == 0 && state[2].set)) > > { > > search_uuid = NULL; > > + os_passwd = NULL; > > check_boot = state[2].set; > > grub_device_iterate (&grub_cryptodisk_scan_device, NULL); > > search_uuid = NULL; > > return GRUB_ERR_NONE; > > } > > + else if (state[3].set) > > + { > > + /* do we have a secret? */ > > + if (os_secret_area == NULL) > > + return grub_error (GRUB_ERR_INVALID_COMMAND, "No OS secret is > > provisioned"); > > + > > + os_passwd = os_secret_area; > > + search_uuid = NULL; > > + grub_device_iterate (&grub_cryptodisk_scan_device, NULL); > > + os_passwd = NULL; > > + > > + if (!have_it) > > + return grub_error (GRUB_ERR_ACCESS_DENIED, "SEV password failed > > to unlock any volumes"); > > That's the only place you break the generality and admit to it being > a SEV password I think. Yes, I think it reflects the fact that there's likely a missing callback into the secret setting module so the message can be very specific and also that module can handle the secret destruction policy. James