lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Aug 2021 23:17:02 +0000
From:   HORIGUCHI NAOYA(堀口 直也) 
        <naoya.horiguchi@....com>
To:     Yang Shi <shy828301@...il.com>
CC:     "osalvador@...e.de" <osalvador@...e.de>,
        "tdmackey@...tter.com" <tdmackey@...tter.com>,
        "david@...hat.com" <david@...hat.com>,
        "willy@...radead.org" <willy@...radead.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "corbet@....net" <corbet@....net>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [v2 PATCH 3/3] mm: hwpoison: dump page for unhandlable page

On Mon, Aug 23, 2021 at 10:47:03AM -0700, Yang Shi wrote:
> On Sun, Aug 22, 2021 at 10:05 PM HORIGUCHI NAOYA(堀口 直也)
> <naoya.horiguchi@....com> wrote:
> >
> > On Fri, Aug 20, 2021 at 11:40:24AM -0700, Yang Shi wrote:
> > > On Thu, Aug 19, 2021 at 11:48 PM HORIGUCHI NAOYA(堀口 直也)
> > > <naoya.horiguchi@....com> wrote:
> > > >
> > > > On Wed, Aug 18, 2021 at 10:41:16PM -0700, Yang Shi wrote:
> > > > > Currently just very simple message is shown for unhandlable page, e.g.
> > > > > non-LRU page, like:
> > > > > soft_offline: 0x1469f2: unknown non LRU page type 5ffff0000000000 ()
> > > > >
> > > > > It is not very helpful for further debug, calling dump_page() could show
> > > > > more useful information.
> > > > >
> > > > > Calling dump_page() in get_any_page() in order to not duplicate the call
> > > > > in a couple of different places.  It may be called with pcp disabled and
> > > > > holding memory hotplug lock, it should be not a big deal since hwpoison
> > > > > handler is not called very often.
> > > > >
> > > > > Suggested-by: Matthew Wilcox <willy@...radead.org>
> > > > > Cc: Naoya Horiguchi <naoya.horiguchi@....com>
> > > > > Cc: Oscar Salvador <osalvador@...e.de>
> > > > > Signed-off-by: Yang Shi <shy828301@...il.com>
> > > > > ---
> > > > >  mm/memory-failure.c | 3 +++
> > > > >  1 file changed, 3 insertions(+)
> > > > >
> > > > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> > > > > index 7cfa134b1370..60df8fcd0444 100644
> > > > > --- a/mm/memory-failure.c
> > > > > +++ b/mm/memory-failure.c
> > > > > @@ -1228,6 +1228,9 @@ static int get_any_page(struct page *p, unsigned long flags)
> > > > >               ret = -EIO;
> > > > >       }
> > > > >  out:
> > > > > +     if (ret == -EIO)
> > > > > +             dump_page(p, "hwpoison: unhandlable page");
> > > > > +
> > > >
> > > > I feel that 4 callers of get_hwpoison_page() are in the different context,
> > > > so it might be better to consider them separately to add dump_page() or not.
> > > > soft_offline_page() still prints out "%s: %#lx: unknown page type: %lx (%pGp)"
> > >
> > > No strong opinion to keep or remove it.
> >
> > Reading the explanation below, I think that calling dump_page() in the
> > original place is fine.  So let's remove "else if (ret == 0)" block in
> > soft_offline_page().
> 
> The "else if (ret == 0)" block is used to handle free page IIUC. I'm
> supposed you mean the "else if (ret == -EIO)" block which just calls
> printk.

Sorry, you're right. I miss-copied the line.

- Naoya Horiguchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ