qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests


From: Luis Machado
Subject: Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests
Date: Mon, 13 Mar 2023 11:16:42 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 3/10/23 18:07, Peter Maydell wrote:
On Fri, 10 Mar 2023 at 18:00, Fabiano Rosas <farosas@suse.de> wrote:

Peter Maydell <peter.maydell@linaro.org> writes:

On Fri, 10 Mar 2023 at 10:31, Alex Bennée <alex.bennee@linaro.org> wrote:

You need a very new gdb to be able to run with pauth support otherwise
your likely to hit asserts and aborts. Disable pauth for now until we
can properly probe support in gdb.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

If it makes gdb fall over, then shouldn't we be disabling
the pauth gdbstub stuff entirely ? Otherwise even if our
tests are fine our users will not be...


Have you seem my message on IRC about changing the feature name in the
XML? I think the issue is that we're putting the .xml in a "namespace"
where GDB expects to only find stuff which it has code to
support. Changing from "org.gnu.gdb.aarch64.pauth" to
"org.qemu.aarch64.pauth" made it stop crashing and I can read the
registers just fine.

It might be a better option to emit a pauth feature in the qemu namespace to 
dodge the crashing bug from older
gdb's (a latent pauth-related bug in gdb that is triggered by having gdb 
identify that a target supports
pauth and at the same time having a target description containing system 
registers gdb doesn't
care about).


But then presumably a pauth-aware GDB won't actually know
the values it needs to be able to convert between with-PAC
and without-PAC addresses for backtracing?

Luis, how is this intended to work? Is there some way the
stub can check with the gdb that's connected whether the
gdb is able to cope with the pauth XML, so it can avoid
sending it to a gdb that is going to crash if it sees it ?

There isn't a probing mechanism unfortunately, and gdb isn't supposed to crash 
in this case.

With the changes from commit 6d0020873deb2f2c4e0965dc2ebf227bc1db3140, gdb now 
unmasks signed
addresses using the additional pauth registers. If gdb doesn't detect the pauth 
feature, it will
still mask out the top bits using a default mask of 0xff80000000000000.

While that should be enough for user addresses, it won't help with "kernel" 
addresses (when the VA select bit is 1).

To dodge the crashing bug of older gdb's, I can adjust gdb to also look for the 
pauth registers in the qemu namespace and
document that accordingly.


thanks
-- PMM

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]