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:	Tue, 10 Feb 2015 11:32:30 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Gregory Fong <gregory.0xf0@...il.com>
Cc:	Laura Abbott <lauraa@...eaurora.org>,
	Florian Fainelli <f.fainelli@...il.com>,
	Kees Cook <keescook@...omium.org>,
	Nicolas Pitre <nico@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	open list <linux-kernel@...r.kernel.org>,
	Yalin Wang <Yalin.Wang@...ymobile.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>, vishnu.ps@...sung.com,
	Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH] ARM: print cma-reserved pages from show_mem

On Mon, Feb 09, 2015 at 11:55:54AM -0800, Gregory Fong wrote:
> On Fri, Feb 6, 2015 at 1:41 PM, Laura Abbott <lauraa@...eaurora.org> wrote:
> > So it looks like the lib/show_mem.c does something different
> > #ifdef CONFIG_CMA
> >         printk("%lu pages reserved\n", (reserved - totalcma_pages));
> >         printk("%lu pages cma reserved\n", totalcma_pages);
> > #else
> >         printk("%lu pages reserved\n", reserved);
> > #endif
> >
> >
> > No need to change the name, instead I'd say fix up arm to match what
> > the generic showmem is doing.
> 
> The trouble is that lib/show_mem.c and ARM's show_mem use the
> 'reserved' variable to hold different info, which was not a problem I
> was aiming to tackle here, and am not sure I understand what's going
> on well enough to do so.  But let's give it a shot:
> 
> In lib/show_mem.c, reserved is calculated by iterating over all online
> nodes, then increasing reserved by (zone->present_pages -
> zone->managed_pages).  This count includes CMA pages and so when
> reserved pages is printed it should be 'reserved' - totalcma_pages, as
> it currently is.

So, some digging is needed into why the generic version is different.
You have to remember that many of the algorithms for this kind of thing
were based on the x86 implementation, so differences like this are
probably down to ARM being annoyingly overlooked or ignored when generic
changes happen.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ