public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] fhandler/proc.cc: use wincap.has_user_shstk
@ 2023-06-20 8:09 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-06-20 8:09 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6604db8b80bd8c5aed4673ade49f768b9f51898b
commit 6604db8b80bd8c5aed4673ade49f768b9f51898b
Author: Brian Inglis <Brian.Inglis@Shaw.ca>
AuthorDate: Mon Jun 19 12:15:19 2023 -0600
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Tue Jun 20 10:06:56 2023 +0200
fhandler/proc.cc: use wincap.has_user_shstk
In test for AMD/Intel Control flow Enforcement Technology user mode
shadow stack support replace Windows version tests with test of wincap
member addition has_user_shstk with Windows version dependent value
Fixes: 41fdb869f998 ("fhandler/proc.cc(format_proc_cpuinfo): Add Linux 6.3 cpuinfo")
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
Diff:
---
winsup/cygwin/fhandler/proc.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc
index 3c79762e0fbd..cbc49a12a417 100644
--- a/winsup/cygwin/fhandler/proc.cc
+++ b/winsup/cygwin/fhandler/proc.cc
@@ -1486,12 +1486,12 @@ format_proc_cpuinfo (void *, char *&destbuf)
/* ftcprint (features1, 6, "split_lock_detect");*//* MSR_TEST_CTRL split lock */
- /* cpuid 0x00000007 ecx & Windows [20]20H1/[20]2004+ */
- if (maxf >= 0x00000007 && wincap.osname () >= "10.0"
- && wincap.build_number () >= 19041)
+ /* Windows [20]20H1/[20]2004/19041 user shadow stack */
+ if (maxf >= 0x00000007 && wincap.has_user_shstk ())
{
+ /* cpuid 0x00000007 ecx CET shadow stack */
cpuid (&unused, &unused, &features1, &unused, 0x00000007, 0);
- ftcprint (features1, 7, "user_shstk"); /* "user shadow stack" */
+ ftcprint (features1, 7, "user_shstk"); /* user shadow stack */
}
/* cpuid 0x00000007:1 eax */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-20 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 8:09 [newlib-cygwin/main] fhandler/proc.cc: use wincap.has_user_shstk Corinna Vinschen
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).