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]
Message-ID: <20180725030237.GA105976@rodete-desktop-imager.corp.google.com>
Date:   Wed, 25 Jul 2018 12:02:37 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Tino Lehnig <tino.lehnig@...tabo.de>, ngupta@...are.org,
        linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Zram writeback feature unstable with heavy swap utilization -
 BUG: Bad page state in process...

On Tue, Jul 24, 2018 at 07:55:25PM -0700, Matthew Wilcox wrote:
> On Wed, Jul 25, 2018 at 11:51:06AM +0900, Minchan Kim wrote:
> > On Tue, Jul 24, 2018 at 07:35:32PM -0700, Matthew Wilcox wrote:
> > > There is NOTHING in a union with _refcount.
> > 
> > Confusing. Matthew, what am I missing?
> > 
> > Before:
> > 
> > counters consumes 8 bytes
> > units and _refcount consumes each 4 bytes so memory space is not overlapped.
> 
> Correct.  _mapcount is at offset 24, as is units.  _refcount is at offset 28.
> 
> >         union {
> >                 unsigned long counters;
> >                 struct {
> >                         union {
> >                                 atomic_t _mapcount;
> >                                 int units;                      /* SLOB */
> >                         };
> >                         atomic_t _refcount;
> >                 };
> >         };
> > 
> > 
> > After:
> > 
> > Now, units is overlapped with _refcount and _mapcount.
> 
> No.  units is at offset 24, as is _mapcount.  But _refcount is still at
> offset 28.

Ah, got it what you mean. Sorry for the noise, Matthew.

> 
> >         union {
> >                 unsigned long counters;
> >                 int units;                      /* SLOB */
> >                 struct {                        /* Page cache */
> >                         atomic_t _mapcount;
> >                         atomic_t _refcount;
> >                 };
> >         };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ