public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] x86: Fix tst-cpu-features-cpuinfo on Ryzen 9 (BZ #27873)
Date: Wed, 23 Jun 2021 18:15:54 -0300	[thread overview]
Message-ID: <7b2557a7-9b86-7121-a366-5fee330f8364@linaro.org> (raw)
In-Reply-To: <CAMe9rOoo1KNWzz6CxNn2E5ySLAi_YdeaghiwC2OhpHFCODZeXg@mail.gmail.com>



On 23/06/2021 17:41, H.J. Lu wrote:
>> @@ -216,12 +233,15 @@ do_test (int argc, char **argv)
>>    fails += CHECK_PROC (sgx, SGX);
>>    fails += CHECK_PROC (sgx_lc, SGX_LC);
>>    fails += CHECK_PROC (sha_ni, SHA);
>> -  fails += CHECK_PROC (shstk, SHSTK);
>> +  fails += CHECK_PROC_OPTIN (shstk, SHSTK);
> 
> Why do you need this?  If kernel doesn't support SHSTK, it will be
> turned off:
> 
>  /* Check CET status.  */
>   unsigned int cet_status = get_cet_status ();
> 
>   if ((cet_status & GNU_PROPERTY_X86_FEATURE_1_IBT) == 0)
>     CPU_FEATURE_UNSET (cpu_features, IBT)
>   if ((cet_status & GNU_PROPERTY_X86_FEATURE_1_SHSTK) == 0)
>     CPU_FEATURE_UNSET (cpu_features, SHSTK)

The problem is this is only enabled for CET_ENABLED, the configuration I am using
does not define __CET__.  So the CPU I am using does support SHSTK, but the bit
ended up not being cleared by glibc.

  reply	other threads:[~2021-06-23 21:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:54 Adhemerval Zanella
2021-06-23 20:41 ` H.J. Lu
2021-06-23 21:15   ` Adhemerval Zanella [this message]
2021-06-23 21:36     ` [PATCH] x86: Copy IBT and SHSTK usable only if CET is enabled H.J. Lu
2021-06-24  0:30       ` Adhemerval Zanella
2021-06-24  0:40         ` H.J. Lu
2021-06-24 12:17           ` Adhemerval Zanella
2021-06-24 12:27             ` H.J. Lu
2021-06-24 12:55               ` Adhemerval Zanella
2021-06-24  7:56         ` Florian Weimer
2021-06-24 12:07           ` Adhemerval Zanella

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=7b2557a7-9b86-7121-a366-5fee330f8364@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).