This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Common cpuid wrappers, use SYS_cpuid when available
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Piotr Henryk Dabrowski <ultr at ultr dot pl>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 09 Mar 2016 21:22:50 +0100
- Subject: Re: [PATCH] Common cpuid wrappers, use SYS_cpuid when available
- Authentication-results: sourceware.org; auth=none
- References: <20160309022443 dot 3e3530f6 at ultra dot tux-net> <20160309022725 dot 70c1beb4 at ultra dot tux-net>
* Piotr Henryk Dabrowski:
> However I would like to ask you to say if you *would* ACK this *if* the
> SYS_cpuid system call were to be adopted into the kernel.
<cpuid.h> is provided by GCC, it would have to change as well. The
real challenge is the pervasive use of inline assembly, though.
Currently, you cannot invoke system calls from IFUNC selectors. This
means that one major application for IFUNC selectors cannot use the
system call.
I also wonder if the relevant CPUID flags should rather be part of
auxv, or if this functionality should be a vsyscall instead. Both
would avoid circularity issues (you may need to do a CPUID before
doing a system call, and vice versa).