lkml.org 
[lkml]   [2021]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] mm,hwpoison: add kill_accessing_process() to find error virtual address
On Mon, 19 Apr 2021 11:36:58 +0900
Naoya Horiguchi <nao.horiguchi@gmail.com> wrote:

> > > 2. In the function hwpoison_pte_range():
> > > if (pfn <= hwp->pfn && hwp->pfn < pfn + PMD_SIZE) this check seem we should use PMD_SIZE/PAGE_SIZE or some macro like this?
> >
> > Thanks, that's right. HPAGE_PMD_NR seems to fit here.
> > We also need "#ifdef CONFIG_TRANSPARENT_HUGEPAGE" to use it.
>
> I found that the #ifdef is not necessary because the whole
> "if (ptl)" is compiled out. So I don't add #ifdef.
>
> Here's the v2 of 3/3.
>
> Aili, could you test with it?
>
> Thanks,
> Naoya Horiguchi
>

I tested this v2 version, In my test, this patches worked as expected and the previous
issues didn't happen again.

Test-by: Aili Yao <yaoaili@kingsoft.com>

Thanks,
Aili Yao

> -----
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
> Date: Tue, 13 Apr 2021 07:26:25 +0900
> Subject: [PATCH v2 3/3] mm,hwpoison: add kill_accessing_process() to find error
> virtual address
>
> The previous patch solves the infinite MCE loop issue when multiple
> MCE events races. The remaining issue is to make sure that all threads
> processing Action Required MCEs send to the current processes the
> SIGBUS with the proper virtual address and the error size.
>
> This patch suggests to do page table walk to find the error virtual
> address. If we find multiple virtual addresses in walking, we now can't
> determine which one is correct, so we fall back to sending SIGBUS in
> kill_me_maybe() without error info as we do now. This corner case needs
> to be solved in the future.
>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> ---
> change log v1 -> v2:
> - initialize local variables in check_hwpoisoned_entry() and
> hwpoison_pte_range()
> - fix and improve logic to calculate error address offset.
> ---
> arch/x86/kernel/cpu/mce/core.c | 13 ++-
> include/linux/swapops.h | 5 ++
> mm/memory-failure.c | 147 ++++++++++++++++++++++++++++++++-
> 3 files changed, 161 insertions(+), 4 deletions(-)
>


\
 
 \ /
  Last update: 2021-04-19 05:44    [W:0.058 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site