https://bugs.kde.org/show_bug.cgi?id=528631

Mark Wielaard <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Mark Wielaard <[email protected]> ---
(In reply to Martin Cermak from comment #3)
> Created attachment 198402 [details]
> proposed patch

I think I understand how this works. We reserve a bit (word) in the guest state
(per thread) to see if cpuid works, or produces a segv.
Then for the cpuid helper we check this bit to see if we should generate a sigv
or execute our cpuid helper code.
And the testcase checks whether or not we get the segv or not when executing
cpuid. Which seems to work. Very nice.

But do we have an example program that actually intercepts cpuid this way and
changes the result in the segv handler
and then "correctly" jumps back? There is
https://github.com/ddcc/libcpuidoverride and
https://github.com/twosigma/libvirtcpuid but both look non-trivial to use with
valgrind.

If this works that is great.

But I as the arch_prctl man page says if ARCH_SET_CPUID was requested, but the
underlying hardware does not support CPUID faulting fails with ENODEV. The
arch_prctl01 LTP testcase does accept ENODEV, but only if /proc/cpuid doesn't
contain cpuid_fault (so we would then also need to intercept /proc/cpuid reads
(which we might have to do anyway since we do actually change the cpuid
flags...)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to