From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=68.232.149.220; helo=esa2.dell-outbound.iphmx.com; envelope-from=jim.dailey@dell.com; receiver=edk2-devel@lists.01.org Received: from esa2.dell-outbound.iphmx.com (esa2.dell-outbound.iphmx.com [68.232.149.220]) (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 49EB3211B6988 for ; Fri, 11 Jan 2019 04:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1547209654; x=1578745654; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zX5K8em9qZTqPgKxWJjF+JvMA0I4P/iGOUOFWnH+0OU=; b=Jbn1AnOladKvo9hlTIBhlLRvIq08nkjWX9TBvr8vKXfEPkiDUW4vbpKZ XO0gnZRN48hnx8GoYX1+3ZJ1uThk25oHroK9npTHJPYkqfEXX48oYdDIc 7wKDnYf9mTTvIttt/k5qmoYjPV6Hg3hwY5hysPurF8J30UF1XScATR+Yp w=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EBAACGijhchyeV50NjGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUQUBAQEBCwGCaYECJwqMEV+NHpd6gXsLAQEYCwuEPgKCKiI?= =?us-ascii?q?0CQ0BAwEBAgEBAgEBAhABAQEKCwkIKSMMgjoiHIELAQEBAQEBAQEBTQINYwE?= =?us-ascii?q?BAQEDAQEQFRM0CwwEAgEIEQQBAR8JBycBHgkIAgQOBQgagwABgWkDFQ+gDT0?= =?us-ascii?q?CgW6JBwEBAYFrM4gEBIIhBYw/ghaBEYMSgx4BBIc+AqEnWgcChxuGR4QdIIF?= =?us-ascii?q?kiFyHP48Ciz4CBAIEBQIUgUaCD3BQgmyCNYhohT9AATGKHYEfAQE?= X-IPAS-Result: =?us-ascii?q?A2EBAACGijhchyeV50NjGgEBAQEBAgEBAQEHAgEBAQGBU?= =?us-ascii?q?QUBAQEBCwGCaYECJwqMEV+NHpd6gXsLAQEYCwuEPgKCKiI0CQ0BAwEBAgEBA?= =?us-ascii?q?gEBAhABAQEKCwkIKSMMgjoiHIELAQEBAQEBAQEBTQINYwEBAQEDAQEQFRM0C?= =?us-ascii?q?wwEAgEIEQQBAR8JBycBHgkIAgQOBQgagwABgWkDFQ+gDT0CgW6JBwEBAYFrM?= =?us-ascii?q?4gEBIIhBYw/ghaBEYMSgx4BBIc+AqEnWgcChxuGR4QdIIFkiFyHP48Ciz4CB?= =?us-ascii?q?AIEBQIUgUaCD3BQgmyCNYhohT9AATGKHYEfAQE?= Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa2.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Jan 2019 06:27:32 -0600 Received: from pps.filterd (m0133268.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0BCIDmc128706 for ; Fri, 11 Jan 2019 07:27:32 -0500 Received: from esa3.dell-outbound2.iphmx.com (esa3.dell-outbound2.iphmx.com [68.232.154.63]) by mx0a-00154901.pphosted.com with ESMTP id 2pu2xf25fd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 11 Jan 2019 07:27:32 -0500 From: Received: from ausxippc110.us.dell.com ([143.166.85.200]) by esa3.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 11 Jan 2019 18:27:15 +0600 X-LoopCount0: from 10.166.136.215 X-IronPort-AV: E=Sophos;i="5.56,465,1539666000"; d="scan'208";a="750019079" To: CC: , Thread-Topic: [edk2] A question about shell-application's argument make system blocked; Thread-Index: AQHUqKuFlgl2AEVamkq5xEMEmX9deqWonOvggACGb7CAAAylYIAAz7Dw Date: Fri, 11 Jan 2019 12:27:18 +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-11T12:27:05.0884974Z; 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-11_07:, , 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-1901110102 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: Fri, 11 Jan 2019 12:27:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My recollection is that the code that parses a command line is basically the same whether the line is in a script or not. Certainly there are places where that code checks to see if a script is active, but I don't think it does so when it looks to eliminate comments. -----Original Message----- From: Carsey, Jaben [mailto:jaben.carsey@intel.com]=20 Sent: Thursday, January 10, 2019 6:03 PM To: Dailey, Jim Cc: sssky307@163.com; edk2-devel@lists.01.org Subject: RE: [edk2] A question about shell-application's argument make syst= em blocked;=20 Agreed. That seems like a bug that needs a Bugzilla filed. =20 My question is if the comment character is valid on a command line typed in= versus in a script file. > -----Original Message----- > From: Jim.Dailey@dell.com [mailto:Jim.Dailey@dell.com] > Sent: Thursday, January 10, 2019 3:34 PM > To: Carsey, Jaben > Cc: sssky307@163.com; edk2-devel@lists.01.org > Subject: RE: [edk2] A question about shell-application's argument make > system blocked; > Importance: High >=20 > Jaben, >=20 > 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. >=20 > One of the areas I feel the parsing is wrong is when an unescaped "#" > is inside a quoted string: >=20 > FS0:\> echo "This should # work." > Command Error Status: Invalid Parameter > FS0:\> echo "This should ^# work." > This should # work. > FS0:\> >=20 > The first command is parsed as if this were the command line: >=20 > FS0:\> echo "This should > Command Error Status: Invalid Parameter > FS0:\> >=20 > 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 %. >=20 > Regards, > Jim >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Carsey, 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 > system blocked; >=20 >=20 > Is this in a script file? I don't remember how "comments" work on raw > command lines where the user types them. >=20 > -Jaben >=20 >=20 > > -----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 syst= em > > blocked; > > Importance: High > > > > Hi everybody, > > I meet a question,a special arg can make system blocked,follow is my st= eps. > > 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" > > > > > > 3,testapp.efi #abc. > > 4,the output is same as step 2. ///< I had read the uefi shell specifi= cation > > 2.2,the '#' is a comment remark,so I think it is ok. > > > > > > 5 testapp.efi "#abc" > > 6,the system blocked(dead). ///< I think it is a bug. > > > > > > //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; > > } > > > > > > for(UINTN i=3D0;i< param->Argc;i++) > > { > > Print(L"index:%d,string:%s\n",i,param->Argv[i]); > > } > > > > > > return EFI_SUCCESS; > > } > > > > > > //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 > > > > > > > > > > > > > > thanks, > > krishna. > > > > > > > > _______________________________________________ > > 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