From: "Schimpe, Christina" <christina.schimpe@intel.com>
To: "Willgerodt, Felix" <felix.willgerodt@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "eliz@gnu.org" <eliz@gnu.org>,
"luis.machado@arm.com" <luis.machado@arm.com>
Subject: RE: [PATCH v2 2/3] LAM: Enable tagged pointer support for watchpoints.
Date: Mon, 3 Jun 2024 14:25:58 +0000 [thread overview]
Message-ID: <SN7PR11MB7638CDEC17666D7999690EC1F9FF2@SN7PR11MB7638.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN2PR11MB4566CEC5969C0C8B604E94348EFF2@MN2PR11MB4566.namprd11.prod.outlook.com>
> > > Or maybe we even want to warn if we find the string but can't
> > > convert it to a proper mask.
> >
> > As I said before I am not sure how we should handle those error
> conditions.
> > Maybe somebody else can help us here?
>
> I think we want to warn or error out. You can look at existing GDB code.
> For example here GDB prints an error if it couldn't read an integer from a
> Linux file:
> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/nat/linux-
> btrace.c;h=5715168d2f0887da2321694b5a8f3e21e74c4ad7;hb=8e8b2ab688b3
> d7e6035e6c782a2b42501d57c667#l601
> Not sure if there are other examples or counter examples, this just one I
> knew of.
>
> In your case it is very unlikely that this will ever happen yes. But I think GDB
> is just much better off to check this. Otherwise the function might return
> some wrong mask silently. A warning or error makes it much easier to
> understand, if there ever is a bug.
>
> Is the untag_mask string in the file, even if the default mask is "active"?
> In that case you could argue a warning is good enough, as we don't actually
> know if the watchpoint would be set to a wrong address.
As long as the kernel supports LAM the untag_mask string should be in the file,
even if LAM is not enabled. So in practise we have to deal with both scenarios
with and without untag_mask string (older kernels).
> Though to be on the safe side, I lean towards an error. We have the
> indication that LAM is supported (or even active), but can't read the mask.
> So we don't know if we can set a watchpoint on the right address.
> Yes this prevents users from setting watchpoints, but since it is an unlikely
> scenario I hope this is never a real problem for someone.
I am fine with an error here.
> And note that my code was just a rough sketch, please double check it.
Ok.
Christina
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2024-06-03 14:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 10:24 [PATCH v2 0/3] Add amd64 LAM watchpoint support Schimpe, Christina
2024-05-27 10:24 ` [PATCH v2 1/3] gdb: Make tagged pointer support configurable Schimpe, Christina
2024-06-03 7:58 ` Willgerodt, Felix
2024-06-03 8:40 ` Schimpe, Christina
2024-06-03 13:29 ` Luis Machado
2024-06-03 14:13 ` Schimpe, Christina
2024-06-10 14:00 ` Luis Machado
2024-06-10 15:05 ` Schimpe, Christina
2024-06-14 9:38 ` Schimpe, Christina
2024-06-14 9:54 ` Schimpe, Christina
2024-06-14 10:09 ` Luis Machado
2024-05-27 10:24 ` [PATCH v2 2/3] LAM: Enable tagged pointer support for watchpoints Schimpe, Christina
2024-06-03 7:58 ` Willgerodt, Felix
2024-06-03 12:04 ` Schimpe, Christina
2024-06-03 12:48 ` Willgerodt, Felix
2024-06-03 14:25 ` Schimpe, Christina [this message]
2024-05-27 10:24 ` [PATCH v2 3/3] LAM: Support kernel space debugging Schimpe, Christina
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=SN7PR11MB7638CDEC17666D7999690EC1F9FF2@SN7PR11MB7638.namprd11.prod.outlook.com \
--to=christina.schimpe@intel.com \
--cc=eliz@gnu.org \
--cc=felix.willgerodt@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
/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).