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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jan 2021 08:59:46 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Minchan Kim <minchan@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Johannes Weiner <hannes@...xchg.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Dan Williams <dan.j.williams@...el.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] swap: Check nrexceptional of swap cache before being
 freed

On Wed 20-01-21 15:54:04, Huang, Ying wrote:
> Michal Hocko <mhocko@...e.com> writes:
> 
> > On Wed 20-01-21 15:27:11, Huang Ying wrote:
> >> To catch the error in updating the swap cache shadow entries or their count.
> >
> > What is the error?
> 
> There's no error in the current code.  But we will change the related
> code in the future.  So this checking will help us to prevent error in
> the future.  I will change the patch description to make it more clear.
> 
> > Can it happens in the real life? Why do we need this
> > patch? Is crashing the kernel the right way to handle the situation?
> 
> Emm... The mistake to update swap shadow entries will hurt performance,
> but will not trigger functionality bug.  So it may be better to use
> VM_WARN_ON_ONCE().

Yes a warning is much more appropriate approach. The question is whether
a test like this is really necessary. But I will leave that to others to
decide. It was really the bug on that hit my eyes.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ