Skip to content

Commit

Permalink
Tweak style
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Jul 3, 2024
1 parent 38418b0 commit d2dce8d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions gum/gum.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,6 @@ gum_do_query_cpu_features (void)
gboolean cpu_supports_cet_ss = FALSE;
gboolean os_enabled_xsave = FALSE;
guint a, b, c, d;
#ifdef HAVE_WINDOWS
PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY pol;
#endif

if (gum_get_cpuid (7, &a, &b, &c, &d))
{
Expand All @@ -749,16 +746,19 @@ gum_do_query_cpu_features (void)
features |= GUM_CPU_AVX2;

#ifdef HAVE_WINDOWS
if (cpu_supports_cet_ss &&
GetProcessMitigationPolicy (
GetCurrentProcess (),
ProcessUserShadowStackPolicy,
&pol,
sizeof pol
) &&
!pol.EnableUserShadowStack)
{
cpu_supports_cet_ss = FALSE;
PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY pol;

if (cpu_supports_cet_ss &&
GetProcessMitigationPolicy (
GetCurrentProcess (),
ProcessUserShadowStackPolicy,
&pol,
sizeof (pol)) &&
!pol.EnableUserShadowStack)
{
cpu_supports_cet_ss = FALSE;
}
}
#endif

Expand Down

0 comments on commit d2dce8d

Please sign in to comment.