From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by sourceware.org (Postfix) with ESMTPS id 548183858D37 for ; Tue, 6 Feb 2024 12:26:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 548183858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 548183858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707222399; cv=none; b=TEpiDnqA9gEXDdBMsGTp45o4Xj1qS6RJsLlub+IfvnqDcj6NJksSTWlWNosr/nukIdyjwTBiHPQYD5XQxHMwTF804lr42psE+wDyQtKyFBbZucGdTI4PO6IweAwwuIBr3Iget/JbDPbDlXN9PlFrZPhDnvGrpTv5AW6GIRhobpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707222399; c=relaxed/simple; bh=PwSWjPmFwtVYkZVtgmD6hWnN29gc6k6v19+BmnEDOq0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=M0lzCUfFWcPn5PunNxKv8TeHg0d4fPXJm4QJOeZ0NroIRPreHOktK81kaphYFrJEL+tu9NHnZ8SS0dMqYZXkSaL2iKF1vcOdSeHz5t0JX0t97CY94EKvXfECBg/pgi1XLuRMrRBxn/5cY/d1FG7iM8K/11FCmp9qeu3B0znxmaM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-dc6f6d10ea9so3693643276.2 for ; Tue, 06 Feb 2024 04:26:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707222396; x=1707827196; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=v602NciHWtOUrFWiLE8uAoKCMqj/XlphAJRkKbVrtM8=; b=G3fwkYWKkouP4H95O+oPjdHf0YxBVGWweiTRHPMdhL8xQos6CZ3CTNDMkPTNhhbpTE 87iRnNX0aHFwnfQAHldSjrJ/X9biNHrDv+ZA6MaC3SuB2ZDMb/eR6al+fjYD888e9mWV UDqcdK0r3ACzgC7mPMeQKDLzfn/0GMpN2m6zu3gZh03L60D4Pgeg7IqrCBWd66yaRJf+ SV/u+j578b4E/a33f1IKhKNOY85czJCEWrT/lARo/K4lri23Lz3HOvAoPPA+SWmY6Xem Nhc6wA908rIViRchtVn7eVdR8s1ZePT2sCPdP/ngdD4mIkXbl6p9l6qcw8UuY4pfKrOK AxQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707222396; x=1707827196; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v602NciHWtOUrFWiLE8uAoKCMqj/XlphAJRkKbVrtM8=; b=mLxopxrarX39uUgxIX+m2y6BPGzVmpZ/FvAjcLpTS/fVbkzCvknCklaEfsRShEwjdZ 4noCh339i1Uf3cvJusfz4R19FL2cT0ePBzRMUJb8DbWE0FQIzgXHVrFf82A6u2UDMzu/ bfSxtrX0g53USgqmYG+xSOW4HEaChLj+HXQtki29R1HK0gJDuXCA+JArNfeAbPW3tZ4J JmUYRhOObJ+CaDi3O1gMjYvvB6jIZ2mv7jWDYeIPPdmA1ECvm/If+37+WVxWKsc3OL9E F20SJikUDWwwntsuiFk1WiYIDvQPkEvUmSI3a074zGEkVKboJi5KnyyzHIjDb7R2B5i8 iYnw== X-Gm-Message-State: AOJu0YymGyceLI4ZjaTux0sArjU2+tRqYCEgdOCJoMG3CmMOf9UqnSSV VGpj0J6y8BC9D1mej2WpE0CQ+niYYEdsrrZQ7Lu5x0djp5ZZYHbwcS0bDg+6ub2eA0TZt+xthTl Rir0JeV3WbnYNtt8ha/5G4XUQctpCht6/ X-Google-Smtp-Source: AGHT+IFm7tBmGEAanQygnIy/3fm97OkL6NRE5fQ8w8oc3AmfSCziZRyIZVRCixjbNVWvIHwkcJ4rd0X61+XafG9FBBM= X-Received: by 2002:a25:b222:0:b0:dc7:134a:c43b with SMTP id i34-20020a25b222000000b00dc7134ac43bmr1341498ybj.2.1707222396655; Tue, 06 Feb 2024 04:26:36 -0800 (PST) MIME-Version: 1.0 References: <20240205200028.219844-1-hjl.tools@gmail.com> <4b1c3da8-d218-460b-89e6-6844096ed393@suse.com> In-Reply-To: From: "H.J. Lu" Date: Tue, 6 Feb 2024 04:26:00 -0800 Message-ID: Subject: Re: [PATCH] x86: Warn .insn instruction with length > 15 bytes To: Jan Beulich Cc: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3014.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On Tue, Feb 6, 2024 at 3:41=E2=80=AFAM Jan Beulich wrot= e: > > On 06.02.2024 12:36, H.J. Lu wrote: > > On Tue, Feb 6, 2024 at 12:19=E2=80=AFAM Jan Beulich = wrote: > >> > >> On 05.02.2024 21:00, H.J. Lu wrote: > >>> Change .insn instruction with length > 15 bytes from error to warning= . > >> > >> Thanks for doing this. FTAOD though - it addresses only half of my > >> concern. Besides .insn (where the concern was of general nature) I > >> also use > >> > >> bextr eax, fs:[eax*4], 0x11223344 > >> xacquire lock add qword ptr gs:[eax*8], 0x11223344 > >> > >> in testing of my own disassembler library. I expect to continue to > >> be able to avoid using .insn (and even more so .byte) when assembling > >> this code. IOW there will still need to be a way to also override > >> the defaulting to as_bad() when not using .insn. > > > > We issue a warning when something is wrong in input, but still manage > > to generate an instruction. This is an error case. > > I disagree. It was a warning until you changed it (without me really > agreeing), and some hypothetical vendor could come and lift the limit, > on precisely the basis that there are legal encodings exceeding it. I'm > okay if this can be forced to be an error, but I continue to think that > it ought to be a warning only by default. > It is an error on both Intel and AMD processors. There is no valid reason not to be an error at the moment. We can change it when there is such a vendor in the future. --=20 H.J.