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:	Sun, 27 Oct 2013 15:18:17 +0100
From:	Simon Baatz <gmbnomis@...il.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Ming Lei <tom.leiming@...il.com>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Will Deacon <will.deacon@....com>,
	Catalin Marinas <catalin.marinas@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Tejun Heo <tj@...nel.org>,
	"James E.J. Bottomley" <JBottomley@...allels.com>,
	Jens Axboe <axboe@...nel.dk>
Subject: Re: ARM/kirkwood: v3.12-rc6: kernel BUG at mm/util.c:390!

Hi Russell,

On Sun, Oct 27, 2013 at 01:53:44PM +0000, Russell King - ARM Linux wrote:
> On Sun, Oct 27, 2013 at 09:16:53PM +0800, Ming Lei wrote:
> > On Sun, Oct 27, 2013 at 8:50 PM, Aaro Koskinen <aaro.koskinen@....fi> wrote:
> > >
> So...
> 
> flush_kernel_dcache_page() is expected to take a struct page pointer.
> This struct page pointer is part of the kernel's array of struct pages
> which identifies every single physical page under the control of the
> kernel.
> 
> Arguably, it should not crash if passed a page which has been allocated
> to the slab cache; as this is not a page cache page,
> flush_kernel_dcache_page() should merely ignore the call to it and
> simply return on these.  So this makes total sense:

In this respect, flush_kernel_dcache_page() is following
flush_dcache_page(). For example in crypto/scatterwalk.c:

static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
                                 unsigned int more)
{
        if (out) {
                struct page *page;

                page = sg_page(walk->sg) + ((walk->offset - 1) >>
PAGE_SHIFT);
                if (!PageSlab(page))
                        flush_dcache_page(page);
        }
... 


or in drivers/ata/libata-sff.c:

...
        if (!do_write && !PageSlab(page))
                flush_dcache_page(page);
...


(Probably, both cases should have used
flush_kernel_dcache_page() in the first place). If we say that this
check belongs in flush_kernel_dcache_page() we should also put it
into flush_dcache_page(), no?

- Simon
--
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