Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nCPd7-000841-Aw for mharc-grub-devel@gnu.org; Tue, 25 Jan 2022 12:29:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCPd4-00082T-BU for grub-devel@gnu.org; Tue, 25 Jan 2022 12:29:14 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:25198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCPd2-0007l8-8z for grub-devel@gnu.org; Tue, 25 Jan 2022 12:29:14 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20PG5xxb026122; Tue, 25 Jan 2022 17:28:55 GMT 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=HJS+BcwMwDQZ7S0g/Pj065xzWzmJIyVFq5CIp/liFtE=; b=J9PSBc82DqH//2DUq6iJ6NBoUV83MQqj5qR2yu7xIiGxhDI2/ESr9pLZz1rcNoDs7Lu3 krzHrjrG5ASdLI2aH17NZGnUyFfOXmXzFla7XtePDCxb7kZ1EZyhreQEwUCVLeSlegAI iPUwMTqjOBtS4JkF/vJJDrECPaWhV6/fvmhzmr/cQo6H1/a52RQ9PBV1cWCmfB58TXtq aRqDpXUwybQhc6hIvGuWTf2e/lb1kSXkwoZdLp59lUlg2c0QUhggfANp02amnkILxFWc ksxyic9t6u9IdoR5MFB0oY34kwU6zWQ+Qgw24Mo5kI8clIvaAjXklLnl3gzvYFURmB4j TA== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dtjspmpnk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 17:28:55 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20PHDksx007608; Tue, 25 Jan 2022 17:28:54 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 3dr9jb06uv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 17:28:54 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20PHSrDR20382028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jan 2022 17:28:53 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2D84078064; Tue, 25 Jan 2022 17:28:53 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C7DB7805C; Tue, 25 Jan 2022 17:28:52 +0000 (GMT) Received: from jarvis.int.hansenpartnership.com (unknown [9.211.41.208]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 25 Jan 2022 17:28:52 +0000 (GMT) Message-ID: <19c33bf87f813f3598664c24112b189456e3e170.camel@linux.ibm.com> Subject: Re: [PATCH 4/5] cryptodisk: Support key protectors From: James Bottomley Reply-To: jejb@linux.ibm.com To: development@efficientek.com, Hernan Gatta Cc: The development of GNU GRUB Date: Tue, 25 Jan 2022 12:28:51 -0500 In-Reply-To: <20220124234237.2b961106@crass-HP-ZBook-15-G2> References: <1643033538-19024-1-git-send-email-hegatta@linux.microsoft.com> <1643033538-19024-5-git-send-email-hegatta@linux.microsoft.com> <20220124234237.2b961106@crass-HP-ZBook-15-G2> 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-ORIG-GUID: stq_2KUZTDW6GCVeu6RhV0YTelHdGDeG X-Proofpoint-GUID: stq_2KUZTDW6GCVeu6RhV0YTelHdGDeG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-25_03,2022-01-25_02,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 bulkscore=0 phishscore=0 adultscore=0 malwarescore=0 impostorscore=0 mlxscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201250106 Received-SPF: pass client-ip=148.163.156.1; envelope-from=jejb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com 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_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.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2022 17:29:14 -0000 On Mon, 2022-01-24 at 23:42 -0600, Glenn Washburn wrote: > On Mon, 24 Jan 2022 06:12:17 -0800 > Hernan Gatta wrote: [...] > > + } > > + > > if (state[0].set) /* uuid */ > > { > > int found_uuid; > > @@ -1385,7 +1404,7 @@ GRUB_MOD_INIT (cryptodisk) > > { > > grub_disk_dev_register (&grub_cryptodisk_dev); > > cmd = grub_register_extcmd ("cryptomount", grub_cmd_cryptomount, > > 0, > > - N_("[-p password] > b>"), > > + N_("[-p password] [-k protector[:args]] > > "), > > This looks eerily similiar to what I proposed to James in response to > his SEV patches[1]. As such, I am in favor of this syntax and it > looks to me like a framework that James can use for his SEV series. Well, I could, but I've got to say for a shell like system, which grub is, argument lists passed as a single argument always cause problems with quoting and interpolation. if the protector needs additional arguments to initialize, then it should really be done as a separate module to avoid the arguments within argument problem, so protector_init [args] crtptomount -k protector ... means that [args] can use the standard arguments and doesn't have any internal quoting issues. James