public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Andrew Burgess <aburgess@redhat.com>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Backporting minor fix to older gdb releases
Date: Wed, 15 Mar 2023 12:26:00 +0000	[thread overview]
Message-ID: <8d4ac3fc-c508-2a92-5af2-efaa18da7a20@arm.com> (raw)
In-Reply-To: <87bkkufdw0.fsf@redhat.com>

On 3/15/23 11:33, Andrew Burgess wrote:
> Luis Machado via Gdb <gdb@sourceware.org> writes:
> 
>> I have a small issue (fixed in gdb 13 via commit
>> 1ba3a3222039eb2576d29c9fd3af444f59fa51d2) that I'd like to backport a
>> fix to at least gdb 12 and gdb 11.
> 
> Does that change fix some bug that is always present?  Or does the
> problem only occur in some situations?  i.e. are GDB 11/12 broken with
> QEMU in all cases, or only if QEMU is run in a certain mode?
> 

The bug has always been there, but it has never manifested because it requires the
target to provide pauth support *and* additional system registers (registers gdb doesn't
care about).

The qemu folks have recently added pauth support to their gdbstub, and for older gdb's (9, 10, 11
and 12), the sight of that pauth feature makes them crash, which is not good.

>>
>> I did, however, notice that it is easily backportable to gdb 10 and
>> gdb 9, versions also affected by the same bug.
>>
>> Given the backport is small and helps prevent crashes when connecting
>> to a QEMU that supports pointer authentication, I'm wondering what
>> global maintainers think about it.
>>
>> If distros want to pick up the fix, they can do so without having to
>> worry about conflicts.
> 
> For any back-ports to have use we'd need to make an additional release
> from those branches, right?  I don't know how many distros are going to
> update to anything other than an actual release.

That is true. My reasoning for backporting this fix all the way to gdb-9 was to
allow package maintainers to easily pick the fix up and apply it without having to
deal with conflicts.

I see Ubuntu 20.04, for example, uses gdb-9. If we were to use it with qemu 8.0.0,
it would crash.

> 
> Generally GDB hasn't made additional point releases for anything other
> than the last major release.  I wouldn't object if we did want to do
> such a thing - but then I likely wouldn't be the one having to do any
> work - so I'm certainly not going to say we _should_ do such a thing.
> 
> If we did want to allow such a thing then I would suggest we limit
> ourselves to only doing this for smallish patches that fix GDB crashes,
> and which apply relatively cleanly to the release branches.

This is a fairly small and localized patch, which is why I'm considering it.

> 
> Which is why I asked above for more details about the commit.  If what's
> really happening is that we're fixing GDB to work with QEMU when run in
> mode X, then I'd say this is less of a fix, and more of a new feature -
> support QEMU mode X.  And I'd suggest we shouldn't get in the habit of
> back-porting new features, that feels like a bad can of worms to open.
> 
> But if this problem is more that QEMU changed, and now GDB 9/10/11/12 is
> just broken with QEMU in every mode, then back-porting begins to sounds
> more reasonable.

They will be broken with qemu 8.0.0 for AArch64 when connecting to qemu's gdbstub.

> 
> Thanks,
> Andrew
> 


  reply	other threads:[~2023-03-15 12:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 23:18 Luis Machado
2023-03-15 11:33 ` Andrew Burgess
2023-03-15 12:26   ` Luis Machado [this message]
2023-03-15 13:11     ` Joel Brobecker
2023-03-15 13:45       ` Luis Machado
2023-03-20  4:18         ` Joel Brobecker
2023-03-22  9:57           ` Luis Machado
2023-04-11  6:04             ` Luis Machado

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=8d4ac3fc-c508-2a92-5af2-efaa18da7a20@arm.com \
    --to=luis.machado@arm.com \
    --cc=aburgess@redhat.com \
    --cc=gdb@sourceware.org \
    /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).