From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=68.232.153.95; helo=esa5.dell-outbound.iphmx.com; envelope-from=jim.dailey@dell.com; receiver=edk2-devel@lists.01.org Received: from esa5.dell-outbound.iphmx.com (esa5.dell-outbound.iphmx.com [68.232.153.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2FEAC21962301 for ; Thu, 10 Jan 2019 15:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1547163241; x=1578699241; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=pdx9RACebCwkkhLRMeUGxrXPfdHdn0qd0/RaJcL9doQ=; b=abSBpvJbFGaNz+neryU9f2yHNkuS6+6JUpv96hcPLjCZWFqDloCSS99n ki/yq6AXi/CYtIAoijP9lCgi+u362hzCL9Xmlk2wcwjTazWxm8lB/Vk1x vFj7jPkaot/W6WGvDn1UnafpBbjLPotsvLvXwfC74wwDnkwHn0/jKKHNY 8=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EFAAAI1jdchyeV50NkGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBUQYBAQELAYJpgQInCowQX4sQgg2Xd4F7CwEBGAsLhD4CgiYiNAk?= =?us-ascii?q?NAQMBAQIBAQIBAQIQAQEBCgsJCCkjDII6IhyBCwEBAQEBAQEBAU0CDWMBAQE?= =?us-ascii?q?EAQEQFRM0CwwEAgEIEQQBAR8JBycBHgkIAgQOBQgagwABggEPoWI9AoFuiQY?= =?us-ascii?q?BAQGBazOKKgWMP4IWgRGDEoMeAQSHPgKhG1oHAocZhkKEHCCBZIhahz6OfIs?= =?us-ascii?q?+AgQCBAUCFIFGgg9wUIJsgjWIaIU/QAExiTOBHwEB?= X-IPAS-Result: =?us-ascii?q?A2EFAAAI1jdchyeV50NkGwEBAQEDAQEBBwMBAQGBUQYBA?= =?us-ascii?q?QELAYJpgQInCowQX4sQgg2Xd4F7CwEBGAsLhD4CgiYiNAkNAQMBAQIBAQIBA?= =?us-ascii?q?QIQAQEBCgsJCCkjDII6IhyBCwEBAQEBAQEBAU0CDWMBAQEEAQEQFRM0CwwEA?= =?us-ascii?q?gEIEQQBAR8JBycBHgkIAgQOBQgagwABggEPoWI9AoFuiQYBAQGBazOKKgWMP?= =?us-ascii?q?4IWgRGDEoMeAQSHPgKhG1oHAocZhkKEHCCBZIhahz6OfIs+AgQCBAUCFIFGg?= =?us-ascii?q?g9wUIJsgjWIaIU/QAExiTOBHwEB?= Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa5.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Jan 2019 17:34:00 -0600 Received: from pps.filterd (m0142699.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0ANXF6K044018 for ; Thu, 10 Jan 2019 18:34:00 -0500 Received: from esa1.dell-outbound2.iphmx.com (esa1.dell-outbound2.iphmx.com [68.232.153.201]) by mx0a-00154901.pphosted.com with ESMTP id 2pxeasrect-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 10 Jan 2019 18:34:00 -0500 From: Received: from ausxipps306.us.dell.com ([143.166.148.156]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 11 Jan 2019 05:34:00 +0600 X-LoopCount0: from 10.166.136.214 X-IronPort-AV: E=Sophos;i="5.56,463,1539666000"; d="scan'208";a="259402752" To: CC: , Thread-Topic: [edk2] A question about shell-application's argument make system blocked; Thread-Index: AQHUqKuFlgl2AEVamkq5xEMEmX9deqWonOvggACGb7A= Date: Thu, 10 Jan 2019 23:33:58 +0000 Message-ID: References: <5740a63b.9ab0.16836642cdd.Coremail.sssky307@163.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Jim_Dailey@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2019-01-10T23:15:18.5505244Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; Sensitivity=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-10_09:, , 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901100178 Subject: Re: A question about shell-application's argument make system blocked; X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 23:34:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jaben, The shell does not parse properly (my opinion) in some instances. That is one of the reasons I wrote a separate parser for the shell I maintain here at Dell. One of the areas I feel the parsing is wrong is when an unescaped "#" is inside a quoted string: FS0:\> echo "This should # work." Command Error Status: Invalid Parameter FS0:\> echo "This should ^# work." This should # work. FS0:\> The first command is parsed as if this were the command line: FS0:\> echo "This should=20 Command Error Status: Invalid Parameter FS0:\> I think many people would expect certain characters inside a quoted string, like "#" for example, to NOT need escaping. The only ones that should need escaping (again IMHO) are: ", ^, and %. Regards, Jim -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Cars= ey, Jaben Sent: Thursday, January 10, 2019 9:16 AM To: krishnaLee; edk2-devel@lists.01.org Subject: Re: [edk2] A question about shell-application's argument make syst= em blocked;=20 Is this in a script file? I don't remember how "comments" work on raw comm= and lines where the user types them. -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > krishnaLee > Sent: Wednesday, January 09, 2019 10:13 PM > To: edk2-devel@lists.01.org > Subject: [edk2] A question about shell-application's argument make system > blocked; > Importance: High >=20 > Hi everybody, > I meet a question,a special arg can make system blocked,follow is my step= s. > 1,go to uefi shell v2.2(uefi v2.70),run this application in QEMU-ovmf: > testapp.efi > 2,the output is "index:0,string:FS0:\testapp.efi" >=20 >=20 > 3,testapp.efi #abc. > 4,the output is same as step 2. ///< I had read the uefi shell specifica= tion > 2.2,the '#' is a comment remark,so I think it is ok. >=20 >=20 > 5 testapp.efi "#abc" > 6,the system blocked(dead). ///< I think it is a bug. >=20 >=20 > //follow is the testapp.efi source code: > EFI_STATUS > EFIAPI > UefiMain ( > IN EFI_HANDLE ImageHandle, > IN EFI_SYSTEM_TABLE *SystemTable > ) > { > EFI_STATUS status; > EFI_SHELL_PARAMETERS_PROTOCOL* param; > status=3DSystemTable->BootServices- > >HandleProtocol(ImageHandle,&gEfiShellParametersProtocolGuid,¶m); > if(status!=3DEFI_SUCCESS) > { > return0; > } >=20 >=20 > for(UINTN i=3D0;i< param->Argc;i++) > { > Print(L"index:%d,string:%s\n",i,param->Argv[i]); > } >=20 >=20 > return EFI_SUCCESS; > } >=20 >=20 > //test environment: > //QEMU v2.10.95 + edk2-2018-ovmf-x64. > //shell command line: > //"D:\qemu\qemu-system-x86_64.exe" -machine pc-q35-2.9 -pflash > "D:\qemu\bios\OVMF_x64_debug.fd" -serial stdio -hda fat:rw:G:\temp -net > none > //end >=20 >=20 >=20 >=20 >=20 >=20 > thanks, > krishna. >=20 >=20 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel