public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org, Michael Matz <matz@suse.de>
Subject: Re: [PATCH] x86: Warn .insn instruction with length > 15 bytes
Date: Thu, 8 Feb 2024 03:38:27 -0800	[thread overview]
Message-ID: <CAMe9rOq6gYyn4dnHvH5_HTGSWyXQP1CaBVBazRk3Ny=3uRg21A@mail.gmail.com> (raw)
In-Reply-To: <35dbe455-4917-4a97-bae5-619b96be2f30@suse.com>

On Thu, Feb 8, 2024 at 12:23 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 07.02.2024 18:03, H.J. Lu wrote:
> > On Wed, Feb 7, 2024 at 8:59 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 07.02.2024 17:53, H.J. Lu wrote:
> >>> On Wed, Feb 7, 2024 at 7:32 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>
> >>>> On 07.02.2024 16:24, H.J. Lu wrote:
> >>>>> On Tue, Feb 6, 2024 at 11:51 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>>>
> >>>>>> On 06.02.2024 19:06, H.J. Lu wrote:
> >>>>>>> On Tue, Feb 6, 2024 at 9:05 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>>>>>
> >>>>>>>> On 06.02.2024 17:28, H.J. Lu wrote:
> >>>>>>>>> With as_bad, assembler will continue to assemble, just not generate
> >>>>>>>>> an object file.   We ran into this with APX.  Not everyone checks
> >>>>>>>>> assembler warnings closely.  It led to mysterious crashes.   I am
> >>>>>>>>> not against it if someone else implements an assembler option to
> >>>>>>>>> turn this error into a warning.
> >>>>>>>>
> >>>>>>>> But it should be the other way around: The compiler could pass an
> >>>>>>>> option to promote the (default) warning to an error. And if you
> >>>>>>>> don#t pay attention to warning for assembly files, you could pass
> >>>>>>>> the same option as well. Without harming anyone else with anything
> >>>>>>>
> >>>>>>> People who use/need instructions > 15 bytes belong to a very small
> >>>>>>> minority.  If they want to do it, they can use .insn or use binutlls 2.41
> >>>>>>> or older.  The default assembler isn't for them.
> >>>>>>
> >>>>>> No, staying on an old assembler isn't viable. And minority or not, you
> >>>>>> have to face it: In the present discussion it is you who represents a
> >>>>>> minority. As such I'm even inclined to suggest that your earlier patch
> >>>>>> wants reverting, on the basis that it was put in despite there being
> >>>>>> disagreement. Unless you soon come forward with an incremental change
> >>>>>> undoing at least the worst of its effects ...
> >>>>>
> >>>>> Please tell me exactly which projects are negatively impacted by
> >>>>> disallowing > 15 byte instructions.
> >>>>
> >>>> I already told you: I'm using such in testing of my personal disassembler
> >>>> library.
> >>>
> >>> So, it is only you.  You can either use .insn or add a switch to turn
> >>> this error to warning.
> >>
> >> I has been a warning until 2.42, which you've regressed for my use case.
> >> This is why I expect you to at least soften the regression, in allowing
> >> people like me to simply add a command line option to the gas invocations.
> >
> > So this is for your personal use case.  If you asked nicely, I might have
> > considered spending my time on this.
>
> Well, to be blunt: I would have asked more nicely if you hadn't overridden
> my concern. The more that this isn't the first time that you went ahead
> with changes without having reached consensus.

Well, you disagreed on my change to make the long instruction an error
by default.  For most x86 binutils developers, it is a non-starter.

> >> Plus, as you have learnt from Michael's responses, I'm not the only one
> >> to think that this diagnostic ought to continue to be a warning by
> >> default.
> >
> > I can also tell you that there are other binutils developers who want to
> > treat this as an error.   Should I ask them for their opinions?
>
> From further reactions I can see that I suddenly moved to the minority. So

You shouldn't be surprised.

> be it then, so long as a future patch to allow this diagnostic to be
> converted to a warning won't be blocked.
>

Thank you for your work and feedback.  I am not against it if someone
else adds an option to change the error to warning as long as it isn't
the default.

-- 
H.J.

  reply	other threads:[~2024-02-08 11:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 20:00 H.J. Lu
2024-02-06  8:19 ` Jan Beulich
2024-02-06 11:36   ` H.J. Lu
2024-02-06 11:41     ` Jan Beulich
2024-02-06 12:26       ` H.J. Lu
2024-02-06 14:43         ` Michael Matz
2024-02-06 14:49           ` H.J. Lu
2024-02-06 15:04             ` Michael Matz
2024-02-06 15:34               ` H.J. Lu
2024-02-06 15:48                 ` Michael Matz
2024-02-06 16:28                   ` H.J. Lu
2024-02-06 17:05                     ` Jan Beulich
2024-02-06 18:06                       ` H.J. Lu
2024-02-07  7:51                         ` Jan Beulich
2024-02-07 15:24                           ` H.J. Lu
2024-02-07 15:32                             ` Jan Beulich
2024-02-07 16:53                               ` H.J. Lu
2024-02-07 16:59                                 ` Jan Beulich
2024-02-07 17:03                                   ` H.J. Lu
2024-02-08  4:09                                     ` Jiang, Haochen
2024-02-08  4:47                                       ` Hongyu Wang
2024-02-08  8:15                                         ` Jan Beulich
2024-02-08  8:23                                     ` Jan Beulich
2024-02-08 11:38                                       ` H.J. Lu [this message]
2024-02-08  6:26                     ` Sunil Pandey
2024-02-08  6:41                   ` Cui, Lili
2024-02-08  8:18                     ` Jan Beulich
2024-02-08 11:31                       ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOq6gYyn4dnHvH5_HTGSWyXQP1CaBVBazRk3Ny=3uRg21A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=matz@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).