On Wed, Jun 15, 2016 at 11:23 AM, Borislav Petkov <b...@alien8.de> wrote:
> On Wed, Jun 15, 2016 at 11:12:37AM -0700, Andy Lutomirski wrote:
>> I want to see actual_problem in the log.
>
> So the optimal thing to do for that is to return an error to the calling
> site which says "exception got handled" and then the *calling* site can
> dump_stack().
>
> And the old code did that:
>
> static inline unsigned long long native_read_msr_safe(unsigned int msr,
>                                                       int *err)
> {
>         DECLARE_ARGS(val, low, high);
>
>         asm volatile("2: rdmsr ; xor %[err],%[err]\n"
>                      "1:\n\t"
>                      ".section .fixup,\"ax\"\n\t"
>                      "3:  mov %[fault],%[err] ; jmp 1b\n\t"
>                      ".previous\n\t"
>                      _ASM_EXTABLE(2b, 3b)
>                      : [err] "=r" (*err), EAX_EDX_RET(val, low, high)
>                      : "c" (msr), [fault] "i" (-EIO));
>                                                 ^^^^
>

Then we end up with bloat.  The current thing generates very compact code.

--Andy

Reply via email to