lkml.org 
[lkml]   [2016]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [x86] 5ac0c41bf3: WARNING: CPU: 0 PID: 0 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe
On Wed, Jun 15, 2016 at 11:23 AM, Borislav Petkov <bp@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

\
 
 \ /
  Last update: 2016-06-15 21:21    [W:0.529 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site