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: <20171019011056.GB17308@bombadil.infradead.org>
Date:   Wed, 18 Oct 2017 18:10:56 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     Srividya Desireddy <srividya.dr@...sung.com>,
        "sjenning@...hat.com" <sjenning@...hat.com>,
        "ddstreet@...e.org" <ddstreet@...e.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "penberg@...nel.org" <penberg@...nel.org>,
        Dinakar Reddy Pathireddy <dinakar.p@...sung.com>,
        SHARAN ALLUR <sharan.allur@...sung.com>,
        RAJIB BASU <rajib.basu@...sung.com>,
        JUHUN KIM <juhunkim@...sung.com>,
        "srividya.desireddy@...il.com" <srividya.desireddy@...il.com>
Subject: Re: [PATCH] zswap: Same-filled pages handling

On Wed, Oct 18, 2017 at 01:43:10PM -0700, Andi Kleen wrote:
> > +static int zswap_is_page_same_filled(void *ptr, unsigned long *value)
> > +{
> > +	unsigned int pos;
> > +	unsigned long *page;
> > +
> > +	page = (unsigned long *)ptr;
> > +	for (pos = 1; pos < PAGE_SIZE / sizeof(*page); pos++) {
> > +		if (page[pos] != page[0])
> > +			return 0;
> > +	}
> 
> So on 32bit it checks for 32bit repeating values and on 64bit
> for 64bit repeating values. Does that make sense?

Yes.  Every 64-bit repeating pattern is also a 32-bit repeating pattern.
Supporting a 64-bit pattern on a 32-bit kernel is painful, but it makes
no sense to *not* support a 64-bit pattern on a 64-bit kernel.  This is
the same approach used in zram, fwiw.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ