Re: [GIT PULL] x86/topology changes for v5.3

From: Xi Ruoyao
Date: Wed Jul 10 2019 - 09:31:46 EST


On 2019-07-10 15:28 +0200, Jiri Kosina wrote:
> On Wed, 10 Jul 2019, Jiri Kosina wrote:

> > > > > BUG: unable to handle page fault for address: ffffffff9edc1598
> > > > > #PF: supervisor write access in kernel mode
> > > > > #PF: error_code(0x0003) - permissions violation

> > Hm, and it seems to explode on dereferencing the static_key* in %rsi
>
> ^^^ %rdi of
> course
>
> > 21: 48 8b 37 mov (%rdi),%rsi
> > 24: 83 e6 03 and $0x3,%esi
> > 27: 48 09 c6 or %rax,%rsi
> > 2a:* 48 89 37 mov %rsi,(%rdi) <-- trapping
> > instruction
> >
> > which looks odd, as it derefenced it successfully just 3 instructions ago.

It seems the MMU (I guess ?) allows to read it, but disallows to write it:
"supervisor write access in kernel mode".
--
Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University