From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by sourceware.org (Postfix) with ESMTPS id DEE873858C60 for ; Thu, 8 Feb 2024 06:41:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEE873858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DEE873858C60 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=192.198.163.9 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707374519; cv=pass; b=VvJ98PgzGFisHVvxab0Gi10h+naJHidbxmMWN0GJdmBRFqPidGEflJT2xtu/4eL/JTtrQ3VDPqJseJh1TbaDCxzD0nkkSzewWn80hylgvTE+2oBgTa2MYeqU5yYn6HVnAYt8DRozDy1+moA0mN2x75qiZFoJSiDqNY632M3b6WQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707374519; c=relaxed/simple; bh=rTODjW381tYLT7Y0mN0mu1n0BFwe2IxsQbuLNM0vu2A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HhEyc6trXdjd8HE/qlDQtFadtiXT3/MS9npIi+8Mt/8qMZnn/09xRSI5TWTYQASR+dEm/Crd5RXJhn5LCnrF+M45+hPnuukw9HXJV4DYUBEf0jge1Vo372KxzvNcjAg9mN+mInlbMQ8OkwSaTlCl3ycMheMnUQiVLI2EzLYyqM0= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707374518; x=1738910518; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rTODjW381tYLT7Y0mN0mu1n0BFwe2IxsQbuLNM0vu2A=; b=bwNwd7x2rymBsUiV4VCIOuNNwyYB3h/Wz+P4Q4qWF85EbGLnaH5cz6Gd JW4/ybe4Ik0+rTLK4qOYvUBlM7jH3kPkwEAjqIZ9KqcNqPjRf8C6ORlKm gq8FtUhOWfQTLPye96R4BTfsNnDamd8sZ0a3F0X8sMVculcfG+wV7gdbN oT/b9KSX/SsyXid43LIteSlwnvk9JT4usaKY9IUsL7114vZ8U9tVieW+T sbqMwFsx1ywRO3nM0A6R4uCdWAkBFGuDWtJRB/gpYXNObib/HinEmd5Bg xAlYWt3oiAm4vnY7of0PjjSs4b7tMdf/aeAPRUHgtHlyEonO49x921CoJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="11891864" X-IronPort-AV: E=Sophos;i="6.05,252,1701158400"; d="scan'208";a="11891864" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2024 22:41:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,252,1701158400"; d="scan'208";a="24823820" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Feb 2024 22:41:57 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 7 Feb 2024 22:41:55 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 7 Feb 2024 22:41:54 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 7 Feb 2024 22:41:54 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 7 Feb 2024 22:41:54 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+3O/YdhkRx0MBbmxUaXWdp3ng3aBys5WLrOoX5wT4oTPMcciS2DGipgTdQ1NqSxaw6o6+kuEoCvgKxmBvoWwBvaHBaBAEqHUhCskc53IZ2nOWwjfyCmx6EnKu3d3YUkpIyoneiLO57QaRjYIdaVRnShR32gG271W0W5VCKfiiLSUPXKJv4Ts/BvAzMAhwKHB+QCAq4Y72eo10XP1+xms/mo7KaMMfWcRD5VXH8qH0Jy83sqRyDTIYmPEE0hyNetTDS52tx0cG9O5PE++PrjuRC/Ca3hK8nPNBfkNF8RYpEAM62NP0C3feZ+JUmuW+2jm1/a3+PBr8exdXJSmVNk8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KaEMsctnwHtBDeunGSMHk1cz0hSsNu83ulIVM7DglXE=; b=BzJXCNHJc1eKiUNXyIqdUgjX8hB8ZGIghFwCtE98ZfIb85J1ucn8kxER5o9JC1M3XQPfeY1QuMmoYiExQ/qEdzAN3viy9hVZV1kTbrD5wTBF+VIs8y/PIKxEFIZfRs7Bf5wh+vA5z1pxvifEEIKg0hZg62Fk8nWYyHR+TqG64AmahxKsC/TNuV/oJ717EuF2uGJmBJZRDf8vVBqsMj/EpVvLp8qZkL6Zg2Y2sKTxju458ahIyMyuS3l5niJRaSuHh53DciDdUL5XwXHailaCeuQCy1KlqdyYG1n+G893scAVUIy9niCW/qV3zvnFubZoFFhkyQ4EVznDkI9sczB4Bg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SJ0PR11MB5600.namprd11.prod.outlook.com (2603:10b6:a03:3ab::16) by CH3PR11MB8443.namprd11.prod.outlook.com (2603:10b6:610:1bd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38; Thu, 8 Feb 2024 06:41:51 +0000 Received: from SJ0PR11MB5600.namprd11.prod.outlook.com ([fe80::60d2:5c94:ad85:5c70]) by SJ0PR11MB5600.namprd11.prod.outlook.com ([fe80::60d2:5c94:ad85:5c70%4]) with mapi id 15.20.7249.039; Thu, 8 Feb 2024 06:41:51 +0000 From: "Cui, Lili" To: Michael Matz , "H.J. Lu" CC: "Beulich, Jan" , "binutils@sourceware.org" Subject: RE: [PATCH] x86: Warn .insn instruction with length > 15 bytes Thread-Topic: [PATCH] x86: Warn .insn instruction with length > 15 bytes Thread-Index: AQHaWG5C4bIhPvYlJEe3AtZX5mDt8rD8+acAgAA21ACAAAGTAIAADF4AgAAmgYCAAAGMgIAABCWAgAAIaYCAAAPWgIAChxhw Date: Thu, 8 Feb 2024 06:41:51 +0000 Message-ID: References: <20240205200028.219844-1-hjl.tools@gmail.com> <4b1c3da8-d218-460b-89e6-6844096ed393@suse.com> <533a896f-8eec-b73b-cb18-26240ad822fc@suse.de> <8059bdee-392a-b9cd-41d5-8dea538c957c@suse.de> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR11MB5600:EE_|CH3PR11MB8443:EE_ x-ms-office365-filtering-correlation-id: 2795cece-15ef-4adf-ad42-08dc28710825 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: F0/iY2LaPnj2S0BcQv1kfNfRxDhTQGBWOyArl5EoMxuLsXNup8t+8wGe8zJrj/FZqhY4e6ZeieSplCw19lqI4CT7tYwFNpVlLv5BfgyqiKDRVYvAXyKFB8FuXP36ymuBJghRqPYCxuJVwPHwlHKWmvRAwXn0p89BAG33JvmLJi0VJ0jU98E33OlBMMYIKnhdDYb/KqL+8biloYiTtcS6hXe5qBqdt3W0V8dlRSmX5ajw3sNgU6atfQkvNMu4jZ2c9AJX6vcVCrgmAeaW1avaAie5HqExvPugJyp03M+6weK/jmapTdt2pV7PRDrPDvnn5N6ICWzBE+nYjLIIf7IixZn4ZZ14gODnGVgIGPMaqFnIVschsQCp+Xw3WdecQfreDNiuMbO9nuDaYTyv8tdSUsBJodZy1V0Cu2DEdR5rmS2WnhgTqADRzSGn6ow/5j129PSTWrddm5sBEfitBZuDCv3+cedQTe3m6PzrXe+X0nCgfEzNqJq8ceAxy5q8RShsV+vT3SoF+ap5jxHRreFGGIobNkZdDncaQb/k9xQWZv+lBKDDnlaqxB2GFzN4yo+WCo4EgZexYMtYXpuTu8iDIGxP62likEarLsuYvFV98EBDjsrw+3sMOm2wKVDWUAyx x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR11MB5600.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(346002)(396003)(39860400002)(376002)(230922051799003)(230273577357003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(82960400001)(76116006)(9686003)(478600001)(6506007)(7696005)(110136005)(66446008)(64756008)(54906003)(71200400001)(66556008)(66946007)(66476007)(8676002)(38070700009)(8936002)(316002)(4326008)(122000001)(38100700002)(86362001)(26005)(83380400001)(33656002)(52536014)(5660300002)(2906002)(55016003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1YM31FlCBK4mzOS5dseHrKOYWI5NIigwWHnhHQb7t+gXhM+/gbeVJ4NI/DQX?= =?us-ascii?Q?07Inu6/akC+1eay80Xoj5dT7Ph8fvPW/5tpGBSG8kOQen96XP8fpl0wnkhCT?= =?us-ascii?Q?EG+wFe4P93i+UkWEYGa38It0Tdk5ZgI03dWOMFe8aaIk47CL2jR+cpjJi2U3?= =?us-ascii?Q?hq9TcVX9C7G+JmAiKyEvjzAUY9zODVpRx0IyOEGscbQlL/OlX/d3CYy7G7mc?= =?us-ascii?Q?BuxmTIg16dH1E1jp87wDSTC6cSPba73KroU+iriuZm5gW3wMqmdcD/FolRLQ?= =?us-ascii?Q?H51WFNu629+yztE067/gyiw8yxxoGyEoo+4Rqoff+GD9w1vEt7EZwtw6AXox?= =?us-ascii?Q?9SNWAE6lXCfCyeVKYUb00e6kJUisSmWQlWAXMaWzNqfhGACNY/8ABoRcr48B?= =?us-ascii?Q?fX6R57UsyUKIIU1vvvooqj3wUg1CLJPFeg+YYQFwxZn/0ArlwRQuKKrN2nX6?= =?us-ascii?Q?wCL503RNmYoKMPWVXIHBcOCE1i6IC8Tef7VX7eiYvxZRGhVdfQAZ1KH2/Jou?= =?us-ascii?Q?Jha1gSid0T45xjXYUSWkFhBijPhE0TBz47echMez5NK4UNtdvyPIpfxZsQeW?= =?us-ascii?Q?vvr5VRy4viZfWdmp5g6kcBEuYpPkcVdo5Gs1buRE7wLJi5DWAjlNmkiXEPGh?= =?us-ascii?Q?M26zJPbuJxBHg8DneJxxKNwHsZGfJTPhgpRdiOJhlbD2zidtVlD0hbbW2D5p?= =?us-ascii?Q?P4YxSD/8wk02C9GGTom30oidUVI7Ik4SRkn+9DuPUWGd6sT+ER31o5llEkC/?= =?us-ascii?Q?1usgjrd4mAvLeh+/UYQhqjWdp3rdP9QIzHr+BKD/9bFdOquJf9k3+9O+lueJ?= =?us-ascii?Q?hW1U3/MLl4hNb6tWEy8h4vW3V6qONIaWrb1GjSB9gIPERj++KqOPq6IP4Z4e?= =?us-ascii?Q?ltBMIdJSM9RmOe8CIuRrdNXM/LK2mhyzyhulzvuKNnEF29feVzL+kn1a9Upi?= =?us-ascii?Q?hlHcQxROSbk+AolPXOUJgGk1lO815zfY7rpRF2/RinrN1rkz6yRRCxfD7xob?= =?us-ascii?Q?ZcguC48++o0+ZC7tRDuIV7eM5e6oamu37Mw+FL4crb9pqxl+ndBhPQ53WaXn?= =?us-ascii?Q?XqtpY/lW80NdJmRi/y+mWnssc7tmv6M6ZeOizpruGqOhAYVxB4wLH7zWQKV8?= =?us-ascii?Q?kV9N/M+mhhiAnUAPXNJ8fJiMy3yW4KTxeiV8JibVOsdSpHsvW18TRPuEsf8U?= =?us-ascii?Q?x2j3MafK72dqpoZC8JXzMzUoBLT+b4Ad0E7yS/ADznDW33mOfjC+EsB2V31/?= =?us-ascii?Q?6iHbn9A7l5ymKcm1cCZ38npNmacoXq+bXP3P1imqEFMogRlsfDdrQ0vQgo34?= =?us-ascii?Q?h9HWl/rMSdtBggwKtEmzqDVs16Et0zhmMt92cAy6WgeSjhr10rVAbpe7sqZZ?= =?us-ascii?Q?/h86ZPYbe11qhFRPUORskp19Mh3zggg0Nr0y2MZRFu9iVwD5h+EeUjT0STDf?= =?us-ascii?Q?6ANx/nWSshqpv2RDzjXp9jiBIy8D5L8PZcznKYF8AkEKnu17akZ367ljC0Gb?= =?us-ascii?Q?xAgeXqM/y9Tl0hCKIGctzpxv+WcFe/xoo0uCFH+7Hbvaoh6ADIGGP/PO1bDq?= =?us-ascii?Q?m1S/ngb5cQzQV0DyBsI=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5600.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2795cece-15ef-4adf-ad42-08dc28710825 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2024 06:41:51.2546 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rS8AKw9Pwr4qQ5SZ5OTfqY+Blbnwwl2F8e+iZCWW47hsxRLPeuQol4Of7NxO39Qy4aYwDmnycybgU30JMDMAtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8443 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > > When a warning is given, a decodable instruction should still be > > generated. >=20 > A software library can decode such instruction just fine. A human as wel= l. >=20 > > Assembler shouldn't generate something which can't be decoded by > > default. >=20 > That's the important words: "by default". Here's the documentation for > as_bad and as_warn: >=20 > as_bad() is used to mark errors that result in what we > presume to be a useless object file. Say, we ignored > something that might have been vital. > ... >=20 > as_warn() is used when we have an error from which we > have a plausible error recovery. eg, masking the top > bits of a constant that is longer than will fit in the > destination. In this case we will continue to assemble > the source, although we may have made a bad assumption, > and we will produce an object file and return normal exit > status (ie, no error). > ... >=20 > It's obvious to me that just continuing to assemble the over-long instruc= tion is > a "plausible error recovery". It's even more plausible than "masking the= top > bits of a constant". Certainly an object file containing a byte sequence > correspending to the overlong instruction is not "useless". >=20 > I understand why you want to give an error by default, even though I disa= gree > with even that (in my book only a warning is justified). But ruling out = that this > can be demoted to a warning, possibly with an option, is not in line with= my > expectation of how the GNU assembler should work and has traditionally > worked. >=20 It is a hardware limitation. Once an incorrect command occurs, it will be d= ifficult to locate. This is a critical issue and should be reported as an e= rror, especially with the addition of APX our prefixes are becoming more co= mplex and diverse, it's time to make a change. Thx, Lili.