From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dpqmOVEEj2qULAMAWB0awg (envelope-from ) for ; Wed, 26 Aug 2026 11:20:49 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=EKLSIGOb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D4EC21E033; Wed, 26 Aug 2026 11:20:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1ACDB1E033 for ; Wed, 26 Aug 2026 11:20:48 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B0F2B4BA79BC for ; Wed, 26 Aug 2026 15:20:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0F2B4BA79BC Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=EKLSIGOb Received: from sonic.asd.mail.yahoo.com (sonic-euwe4-0022.asd.mail.yahoo.com [34.2.86.21]) by sourceware.org (Postfix) with ESMTPS id B2C034BA2E37 for ; Wed, 26 Aug 2026 15:20:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2C034BA2E37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=yahoo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yahoo.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B2C034BA2E37 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=34.2.86.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787757621; cv=none; b=cCA35GLkmu9lZt3sLlU8FzIXJvzLocabP1FRlFwa0mj1LIlHBy6grwuhGWJ3w3odpLFsN8No5DsXFMs8lzPcKTIVaMBqpoWVEd3KFhqLqK63YvMtw698azHdwLwLnPOd0/k1gbdh+8BrOAtJg2HasE16nci4dW31W+l+NKbzMGc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787757621; c=relaxed/simple; bh=DsE3Td6yChAbbICK/DeSuP67B/Kj3SgYI+Rat9c/EWI=; h=DKIM-Signature:Date:From:To:Message-ID:Subject:MIME-Version; b=XPZ4to7SsiIzwFovR+ZBxZck7Uhw0FycmOyJcEmtsrisehB4Yrgjdhw0qQWFVb0GHPHKOP7wNPJfdcRS0OhgLMzAiAZU9DxMqHwXFyj5KjRtASQxoJzqk3YcJvJHtvHZLinVQzbQwX3VyUCW3ReecBrYWdRyd0TfJgQHL55FraM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=EKLSIGOb DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2C034BA2E37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1787757618; bh=DsE3Td6yChAbbICK/DeSuP67B/Kj3SgYI+Rat9c/EWI=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject:Reply-To; b=EKLSIGObPv2J+8iKDgRRz3/JTuEibDN4PchyNryNi6pCpc272VXsxA5+nylPM4AySzn0+EGqqTFiXGTtX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0TBvWZ3U6d4bo8a4aBdRhidQOylAGCTV3gNJL9ZKDPbiMQx3lEHg DTKgyGCB7LXywT5Tj2O4.hPF8EdB4.9Gt4c49DWe9KNiJ34H.rmN__YKwsjAHS5UbU7dKZmHcysT _h9kNxmd.zsQt3fhl9VwiiNvqUfAsww3fDF.ql19FCL.vt1NK_gvKAANFIZGKazg139houv6Wi2J 4o4iHEMAFumf5HL7XXi5Zcys5KlTmm2_hI63hDSbrdk10H8SxS6EilJ.3klHyWKvZX2.H.c7prKV 1dUTPs2OANFWlO4kLN0bm3KO3lhk4Qeb4bbzD7IWkkeC.BkK3GOm5drTwdJm_PHscMBycY67VPXk Cynkm3.gLe01FBQlheuSnstRCKwNngz7.3a2.dutcpUkiYbEE4E5E3ePes8KYMOPsVSC3ub69kVG LGeGBJBkGCcGAyNKjlaHSoqvCnR_lb2hDaRY7t_QG3bk49hJEqnYzh69pkg90rGD2_A1gwtrfcRf uJUglqARgprfTuI2GH1KCc6LJES8v9TOGvzhHr_CCo71cBb9Xsj8KMbWcaFw00MwPyXCd2DGKvwf 8.3GF.JwN89_DgTVKWVCIKArhl0sX8ppHLjnc5MIHNQfxARFS5Y7UWWt7GpwMXsyjVGzFWvHytjd UgMfH_zkqz1SxoaATM4TBgHck3Ir31eSa_gXtZv1dspN0Mmc6hYHy9gDwW.2gVIFFARcp3xThnQ- - X-Sonic-MF: X-Sonic-ID: b1225835-4324-4464-9deb-fa48c5232da3 Received: from sonic.gate.mail.ne1.yahoo.com by mail-asdoutdeli-p-cin-euwe4-prod-sonicconsumer-svc-102 with HTTP; Wed, 26 Aug 2026 15:20:18 +0000 Date: Wed, 26 Aug 2026 15:20:17 +0000 (UTC) From: Hannes Domani To: "gdb-patches@sourceware.org" , "Joos, Christina" Message-ID: <1041475645.327467.1787757617271@mail.yahoo.com> In-Reply-To: References: <20260727174619.1089041-1-ssbssa@yahoo.de> <20260727174619.1089041-7-ssbssa@yahoo.de> Subject: Re: [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX) support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.26380 YMailCLDNorrin X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Am Mittwoch, 26. August 2026 um 16:28:41 MESZ hat Joos, Christina Folgendes geschrieben: > Hi Hannes, >=C2=A0 > Thanks a lot for working on this. >=C2=A0 > I did not find the time to try this out on windows myself, since I was no= t able to work last week. > This is my code-based review for now. >=C2=A0 > > -----Original Message----- > > From: Hannes Domani > > Sent: Montag, 27. Juli 2026 19:43 > > To: gdb-patches@sourceware.org > > Subject: [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX) suppo= rt >=C2=A0 > The commit message header still seems somewhat misleading, as it referenc= es only > Intel AVX, while the commit also includes changes related to AVX-512 and = shadow stack. >=C2=A0 > I think it would be helpful if we'd adapt the commit message header of th= is patch to > include AVX-512, too. >=C2=A0 > For shadow stack I think it would make sense to move this to a separate c= ommit and give > more details on the tests that are passing/ not passing and the limitatio= ns 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-sta= ck. > Besides reading or writing the shadow stack pointer for linux we had to e= nable > - displaced stepping > - the return command > - inferior calls > for shadow stack enabled programs, which are all covered by current shado= w stack tests. >=C2=A0 > Based on what you said >=C2=A0 > ~~~ > 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]. >=C2=A0 > 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=3D0, and with this new exe I always get $pl3= _ssp=3D1. > ~~~ > I assume you cannot execute those tests. Can you confirm? >=C2=A0 > Would it make sense to add dedicated tests for windows shadow stack=C2=A0= (in the > shadow-stack specific patch), based on the current enablement you describ= e above ? >=C2=A0 > 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 /CETCOMP= AT ? I'm not sure what you mean here. Instead of the binutils linker, use the one from msvc? > In any case, all this information should be part of the commit message. >=C2=A0 > I also wonder if we should provide some feedback to the user when he atte= mpts to > write the shadow stack pointer. >=C2=A0 > Currently we see this, right? >=C2=A0 > ~~~ > (gdb) p $pl3_ssp=3D0x12345678 > $11 =3D (void *) 0x12345678 > (gdb) ni > error return C:/gdb/src/gdb.git/gdb/x86-windows-nat.c:242 was 1660: The t= hread context could not be updated because this has been restricted for the= process. > 0x00007ffd63720574 in ntdll!ZwMapViewOfSection () from C:\WINDOWS\SYSTEM3= 2\ntdll.dll > ~~~ >=C2=A0 > I am not GDB windows expert, so I am not sure if that is useful informati= on for the user. > Whatever we display when attempting to write the register, I think it wou= ld make sense > to document this somehow. At least in the commits message + even better w= e could add > a test for this. To be honest, the shadow stack stuff is not that important to me. And since binutils/gcc currently can't create executables with this enabled, maybe it's not worth it including it at this time. I only added it because windows suddenly provided this register info, probably after some update. > > This adds support for the Intel AVX and AVX-512 registers on Windows. > > It enables accessing registers $ymm0 - $ymm31, $zmm0 - $zmm31, and > > $k0 - $k7 where they are available. > > > > It also enables reading the shadow stack pointer register $pl3_ssp (for > > executables marked compatible with CET shadow stack [1]), but modifying= it > > seems to be restricted restricted by windows. >=C2=A0 > Nit: duplicate restricted >=C2=A0 > > > > After this patch the tests gdb.arch/i386-avx.exp and gdb.arch/i386-avx5= 12.exp > > pass on windows. >=C2=A0 > Nit: let's add for on windows for Unix boardfile, or something like that. > So it's clear that gdbserver support is missing. What gdbserver support is missing? > Did you run the tests for 32 bit, too ? Yes, the same tests succeed for 32 bit as well (with both 32 and 64 bit gdb= ). Hannes