[PATCH] x86: Set FSGSBASE to active if enabled by kernel
H.J. Lu
hjl.tools@gmail.com
Thu Mar 16 00:42:40 GMT 2023
On Mon, Mar 13, 2023 at 6:44 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > Linux kernel uses AT_HWCAP2 to indicate if FSGSBASE instructions are
> > enabled. If the HWCAP2_FSGSBASE bit in AT_HWCAP2 is set, FSGSBASE
> > instructions can be used in user space. Define dl_check_hwcap2 to set
> > the FSGSBASE feature to active on Linux when the HWCAP2_FSGSBASE bit is
> > set.
>
> Could you add a test against /proc/cpuinfo flags? It should be a
> perfect match on current kernels.
>
Will do.
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list