From: "Joos, Christina" <christina.joos@intel.com>
To: Hannes Domani <ssbssa@yahoo.de>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX) support
Date: Thu, 27 Aug 2026 16:30:27 +0000 [thread overview]
Message-ID: <SN7PR11MB763826A5470752C547F45C7D89AD2@SN7PR11MB7638.namprd11.prod.outlook.com> (raw)
In-Reply-To: <368021957.698828.1787846747063@mail.yahoo.com>
> -----Original Message-----
> From: Hannes Domani <ssbssa@yahoo.de>
> Sent: Donnerstag, 27. August 2026 18:06
> To: gdb-patches@sourceware.org; Joos, Christina <christina.joos@intel.com>
> Subject: Re: [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX)
> support
>
> Am Donnerstag, 27. August 2026 um 17:17:46 MESZ hat Joos, Christina
> <christina.joos@intel.com> Folgendes geschrieben:
>
> > > -----Original Message-----
> > > From: Hannes Domani <ssbssa@yahoo.de>
> > > Sent: Donnerstag, 27. August 2026 16:21
> > > To: gdb-patches@sourceware.org; Joos, Christina
> > > <christina.joos@intel.com>
> > > Subject: Re: [PATCH v2 7/8] Windows gdb: Implement XState (Intel
> > > AVX) support
> > >
> > > Am Donnerstag, 27. August 2026 um 12:43:04 MESZ hat Joos, Christina
> > ><christina.joos@intel.com> Folgendes geschrieben:
> > >
> > > > > -----Original Message-----
> > > > > From: Hannes Domani <ssbssa@yahoo.de>
> > > > > Sent: Mittwoch, 26. August 2026 17:20
> > > > > To: gdb-patches@sourceware.org; Joos, Christina
> > > > > <christina.joos@intel.com>
> > > > > Subject: Re: [PATCH v2 7/8] Windows gdb: Implement XState (Intel
> > > > > AVX) support
> > > > >
> > > > > Am Mittwoch, 26. August 2026 um 16:28:41 MESZ hat Joos,
> > > > >Christina <christina.joos@intel.com> Folgendes geschrieben:
> > > > >
> > > > > > Hi Hannes,
> > > > > >
> > > > > > Thanks a lot for working on this.
> > > > > >
> > > > > > I did not find the time to try this out on windows myself,
> > > > > > since I was not able
> > > > > to work last week.
> > > > > > This is my code-based review for now.
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Hannes Domani <ssbssa@yahoo.de>
> > > > > > > Sent: Montag, 27. Juli 2026 19:43
> > > > > > > To: gdb-patches@sourceware.org
> > > > > > > Subject: [PATCH v2 7/8] Windows gdb: Implement XState (Intel
> > > > > > > AVX) support
> > > > > >
> > > > > > The commit message header still seems somewhat misleading, as
> > > > > > it references only Intel AVX, while the commit also includes
> > > > > > changes related to
> > > > > AVX-512 and shadow stack.
> > > > > >
> > > > > > I think it would be helpful if we'd adapt the commit message
> > > > > > header of this patch to include AVX-512, too.
> > > > > >
> > > > > > For shadow stack I think it would make sense to move this to a
> > > > > > separate commit and give more details on the tests that are
> > > > > > passing/ not passing and the limitations we have in windows
> > > > > > for shadow stack enabled
> > > > > programs.
> > > > >
> > > > > I agree, at least shadow stack should be its own commit.
> > > > >
> > > > > And I wonder if, instead of splitting up into gdb/gdbserver as
> > > > > it is now, maybe I should merge them, and split them again into
> > > > > AVX/AVX-
> > > 512/shadow-stack.
> > > >
> > > > I think this is up to you. I usually prefer to have gdb + gdbserver together.
> > > > But this also depends on how complicated/big the patches are, I guess.
> > > >
> > > > At the state of this patch your general NEWS comment doesn't state
> > > > any specifics about gdb or gdbserver.
> > > > My assumption would be that both is working. However, gdbserver
> > > > only works with the next patch. So, from that perspective it would
> > > > make sense to
> > > merge them.
> > >
> > > I now also think it's better to merge them, so I'll do that.
> > >
> > >
> > > > > > Besides reading or writing the shadow stack pointer for linux
> > > > > > we had to enable
> > > > > > - displaced stepping
> > > > > > - the return command
> > > > > > - inferior calls
> > > > > > for shadow stack enabled programs, which are all covered by
> > > > > > current shadow
> > > > > stack tests.
> > > > > >
> > > > > > Based on what you said
> > > > > >
> > > > > > ~~~
> > > > > > It turns out binutils/gcc really don't support this on windows yet.
> > > > > > To enable this in the executable, at least a special marker
> > > > > > bit has to be set in
> > > > > the Extended DLL Characteristics [1].
> > > > > > With msvc you can do that with the /CETCOMPAT linker argument [2].
> > > > > >
> > > > > > So I compiled amd64-shadow-stack.c with msvc and /CETCOMPAT,
> > > > > > and tried
> > > > > it out with my gdb build.
> > > > > > Before I always got $pl3_ssp=0, and with this new exe I always
> > > > > > get
> > > > > $pl3_ssp=1.
> > > > > > ~~~
> > > > > > I assume you cannot execute those tests. Can you confirm?
> > > > > >
> > > > > > Would it make sense to add dedicated tests for windows shadow
> > > > > > stack (in the shadow-stack specific patch), based on the
> > > > > > current enablement you
> > > > > describe above ?
> > > > > >
> > > > > > Or, maybe even better, can you adapt the proc allow_ssp_tests
> > > > > > for window
> > > > > support?
> > > > > > You said:
> > > > > > " It turns out binutils/gcc really don't support this on windows yet."
> > > > > > Could you add a fix to make this work for windows using msvc
> > > > > > and
> > > > > /CETCOMPAT ?
> > > > >
> > > > > I'm not sure what you mean here.
> > > > > Instead of the binutils linker, use the one from msvc?
> > > >
> > > > You said "So I compiled amd64-shadow-stack.c with msvc and
> > > > /CETCOMPAT, and tried it out with my gdb build." Based on that I
> > > > assumed it's somehow possible to enable shadow stack for a msvc
> > > > compiled program in
> > > windows.
> > >
> > > Yes.
> > >
> > >
> > > > I also inferred that GDB was able to debug such programs and run
> > > > relevant tests against them. That may have been an incorrect
> > > > assumption on my part, as I'm not very familiar with the current
> > > > state of support in this area. 😊
> > >
> > > msvc doesn't create dwarf debug info, so in my tests I was only
> > > debugging in assembly mode.
> >
> > Yes, this is what I expected. Can we run tests in the gdb testsuite with msvc?
>
> I don't think it's possible with msvc directly.
> But Pedro has recently made changes to the testsuite for clang configured as
> x86_64-pc-windows-msvc, which could maybe be used for this as well.
I see. So based on that, I tend to agree with you that we should better not add
support for shadow stack in windows for now, especially if we can't add a test for it.
But other maintainers may have a different opinion on that. I'm afraid this topic is a bit
outside my current area of expertise.
In any case, I found your experiments very interesting, so thank you very much for
sharing them.
Christina
________________________________________
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 (89) 99143-0
www.intel.de
Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman
Chairperson of the Supervisory Board: Sonja Pierer
Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next prev parent reply other threads:[~2026-08-27 16:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260727174619.1089041-1-ssbssa.ref@yahoo.de>
2026-07-27 17:42 ` [PATCH v2 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc Hannes Domani
2026-07-27 17:42 ` [PATCH v2 2/8] Windows gdb: Use allocated buffer for CONTEXT Hannes Domani
2026-08-21 18:03 ` Tom Tromey
2026-08-21 18:37 ` Hannes Domani
2026-08-22 1:14 ` Tom Tromey
2026-07-27 17:42 ` [PATCH v2 3/8] Windows gdb: Remove mappings member from windows_per_inferior Hannes Domani
2026-08-21 18:06 ` Tom Tromey
2026-07-27 17:42 ` [PATCH v2 4/8] Windows gdb: Refactor getting pointer to register inside context Hannes Domani
2026-08-21 18:27 ` Tom Tromey
2026-07-27 17:42 ` [PATCH v2 5/8] Windows gdb: Prepare XState functions Hannes Domani
2026-08-21 18:22 ` Tom Tromey
2026-07-27 17:42 ` [PATCH v2 6/8] Windows gdb: Get available XState features Hannes Domani
2026-08-21 18:37 ` Tom Tromey
2026-07-27 17:42 ` [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX) support Hannes Domani
2026-08-10 17:25 ` Hannes Domani
2026-08-13 6:39 ` Joos, Christina
2026-08-26 14:28 ` Joos, Christina
2026-08-26 15:20 ` Hannes Domani
2026-08-27 10:42 ` Joos, Christina
2026-08-27 14:20 ` Hannes Domani
2026-08-27 15:17 ` Joos, Christina
2026-08-27 16:05 ` Hannes Domani
2026-08-27 16:30 ` Joos, Christina [this message]
2026-07-27 17:42 ` [PATCH v2 8/8] Windows gdbserver: " Hannes Domani
2026-08-12 22:00 ` [PATCH v2 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc Luis
2026-08-12 22:08 ` Hannes Domani
2026-08-21 17:56 ` Tom Tromey
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=SN7PR11MB763826A5470752C547F45C7D89AD2@SN7PR11MB7638.namprd11.prod.outlook.com \
--to=christina.joos@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.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