public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin-patches@cygwin.com
Subject: [PATCH v3 3/3] fhandler/proc.cc: use wincap.has_user_shstk
Date: Fri, 16 Jun 2023 11:17:10 -0600	[thread overview]
Message-ID: <336c97a31de9e273e5ace0badeb6312d10da4ebb.1686934097.git.Brian.Inglis@Shaw.ca> (raw)
In-Reply-To: <cover.1686934096.git.Brian.Inglis@Shaw.ca>

Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
 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 */
-- 
2.39.0


  parent reply	other threads:[~2023-06-16 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 17:17 [PATCH v3 0/3] use wincap in format_proc_cpuinfo for user_shstk Brian Inglis
2023-06-16 17:17 ` [PATCH v3 1/3] wincap.h: add wincap member has_user_shstk Brian Inglis
2023-06-16 17:17 ` [PATCH v3 2/3] wincap.cc: set wincap member has_user_shstk true for 2004+ Brian Inglis
2023-06-16 17:17 ` Brian Inglis [this message]
2023-06-16 19:51 ` [PATCH v3 0/3] use wincap in format_proc_cpuinfo for user_shstk Corinna Vinschen
2023-06-16 21:26   ` Brian Inglis
2023-06-19  8:55     ` Corinna Vinschen
2023-06-19 18:27       ` Brian Inglis
  -- strict thread matches above, loose matches on Subject: below --
2023-06-07 16:37 [PATCH v2 " Brian Inglis
2023-06-07 16:37 ` [PATCH v2 3/3] fhandler/proc.cc: use wincap.has_user_shstk Brian Inglis
2023-06-16  0:16   ` [PATCH v3 " Brian Inglis
2023-06-16  8:28   ` Corinna Vinschen
2023-06-16  8:32     ` Corinna Vinschen

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=336c97a31de9e273e5ace0badeb6312d10da4ebb.1686934097.git.Brian.Inglis@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=cygwin-patches@cygwin.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).