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:	Mon, 28 Sep 2015 14:03:05 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Steve Capper <steve.capper@...aro.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Jerome Marchand <jmarchan@...hat.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 03/16] page-flags: introduce page flags policies wrt
 compound pages

On Mon, Sep 28, 2015 at 01:02:19PM +0300, Konstantin Khlebnikov wrote:
> On 25.09.2015 22:13, Kirill A. Shutemov wrote:
> >On Fri, Sep 25, 2015 at 03:29:17PM +0300, Konstantin Khlebnikov wrote:
> >>On 24.09.2015 17:50, Kirill A. Shutemov wrote:
> >>>This patch adds a third argument to macros which create function
> >>>definitions for page flags.  This argument defines how page-flags helpers
> >>>behave on compound functions.
> >>>
> >>>For now we define four policies:
> >>>
> >>>- PF_ANY: the helper function operates on the page it gets, regardless
> >>>   if it's non-compound, head or tail.
> >>>
> >>>- PF_HEAD: the helper function operates on the head page of the compound
> >>>   page if it gets tail page.
> >>>
> >>>- PF_NO_TAIL: only head and non-compond pages are acceptable for this
> >>>   helper function.
> >>>
> >>>- PF_NO_COMPOUND: only non-compound pages are acceptable for this helper
> >>>   function.
> >>>
> >>>For now we use policy PF_ANY for all helpers, which matches current
> >>>behaviour.
> >>>
> >>>We do not enforce the policy for TESTPAGEFLAG, because we have flags
> >>>checked for random pages all over the kernel.  Noticeable exception to
> >>>this is PageTransHuge() which triggers VM_BUG_ON() for tail page.
> >>>
> >>>Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> >>>---
> >>>  include/linux/page-flags.h | 154 ++++++++++++++++++++++++++-------------------
> >>>  1 file changed, 90 insertions(+), 64 deletions(-)
> >>>
> >>>diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> >>>index 713d3f2c2468..1b3babe5ff69 100644
> >>>--- a/include/linux/page-flags.h
> >>>+++ b/include/linux/page-flags.h
> >>>@@ -154,49 +154,68 @@ static inline int PageCompound(struct page *page)
> >>>  	return test_bit(PG_head, &page->flags) || PageTail(page);
> >>>  }
> >>>
> >>>+/* Page flags policies wrt compound pages */
> >>>+#define PF_ANY(page, enforce)	page
> >>>+#define PF_HEAD(page, enforce)	compound_head(page)
> >>>+#define PF_NO_TAIL(page, enforce) ({					\
> >>>+		if (enforce)						\
> >>>+			VM_BUG_ON_PAGE(PageTail(page), page);		\
> >>>+		else							\
> >>>+			page = compound_head(page);			\
> >>>+		page;})
> >>>+#define PF_NO_COMPOUND(page, enforce) ({					\
> >>>+		if (enforce)						\
> >>>+			VM_BUG_ON_PAGE(PageCompound(page), page);	\
> >>
> >>Linux next-20150925 crashes here (at least in lkvm)
> >>if CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
> >
> >Hm. I don't see the crash in qemu. Could you share your config?
> 
> see in attachment

Still don't see it. Have you tried patch from my previous mail?

-- 
 Kirill A. Shutemov
--
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