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
| ||
|
Date: Fri, 24 Apr 2009 09:07:13 +0900 (JST) From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> To: Andrew Morton <akpm@...ux-foundation.org> Cc: kosaki.motohiro@...fujitsu.com, Mel Gorman <mel@....ul.ie>, linux-mm@...ck.org, cl@...ux-foundation.org, npiggin@...e.de, linux-kernel@...r.kernel.org, ming.m.lin@...el.com, yanmin_zhang@...ux.intel.com, peterz@...radead.org, penberg@...helsinki.fi Subject: Re: [PATCH 15/22] Do not disable interrupts in free_page_mlock() > > @@ -556,6 +555,7 @@ static void __free_pages_ok(struct page *page, unsigned int order) > > unsigned long flags; > > int i; > > int bad = 0; > > + int clearMlocked = PageMlocked(page); > > > > for (i = 0 ; i < (1 << order) ; ++i) > > bad += free_pages_check(page + i); > > @@ -571,6 +571,8 @@ static void __free_pages_ok(struct page *page, unsigned int order) > > kernel_map_pages(page, 1 << order, 0); > > > > local_irq_save(flags); > > + if (unlikely(clearMlocked)) > > + free_page_mlock(page); > > I wonder what the compiler does in the case > CONFIG_HAVE_MLOCKED_PAGE_BIT=n. If it is dumb, this patch would cause > additional code generation. if CONFIG_HAVE_MLOCKED_PAGE_BIT=n, PageMlocked() is {return 0;} then gcc can remove following code, I think. if (0) free_page_mlock(page) -- 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