lkml.org 
[lkml]   [2021]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3] x86/fault: Send a SIGBUS to user process always for hwpoison page access.
Date
> Can you point me at that SIGBUS code in a current kernel?

It is in kill_me_maybe(). mce_vaddr is setup when we disassemble whatever get_user()
or copy from user variant was in use in the kernel when the poison memory was consumed.

if (p->mce_vaddr != (void __user *)-1l) {
force_sig_mceerr(BUS_MCEERR_AR, p->mce_vaddr, PAGE_SHIFT);

Would it be any better if we used the BUS_MCEERR_AO code that goes into siginfo?

That would make it match up better with what happens when poison is found
asynchronously by the patrol scrubber. I.e. the semantics are:

AR: You just touched poison at this address and need to do something about that.
AO: Just letting you know that you have some poison at the address in siginfo.

-Tony
\
 
 \ /
  Last update: 2021-03-08 19:33    [W:0.077 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site