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-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jun 2012 11:14:35 -0500
From:	Seth Jennings <sjenning@...ux.vnet.ibm.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Seth Jennings <sjenning@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Nitin Gupta <ngupta@...are.org>,
	Minchan Kim <minchan@...nel.org>,
	Robert Jennings <rcj@...ux.vnet.ibm.com>, linux-mm@...ck.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 0/3] zsmalloc: remove x86 dependency

This patchset continues/adapts Minchan Kim's work
to remove the x86 dependency from zsmalloc.

However, instead of whitelisting archs with support for
local_tlb_flush_kernel_range() in the zsmalloc Kconfig,
this patchset allows zsmalloc to work with all archs
through the addition of a generic/portable page
mapping methods (i.e. memcpy) when the required tlb
flushing functionality is not supported by the arch.

The arch advertises support for local_tlb_flush_kernel_range()
by defining __HAVE_LOCAL_FLUSH_TLB_KERNEL_RANGE

The third patch in the set adds local_tlb_flush_kernel_range()
support to x86.  In my single-threaded tests using zcache,
using the pte/tlb mapping method was 40% faster than the generic
method. So while the third patch is optional, it is highly
recommended.

Alex Shi is working on a large x86 patchset that includes
functionality similar to the third patch, however, it seems
that this patchset is getting very little attention and
includes much more than is needed for zsmalloc's purposes.

https://lkml.org/lkml/2012/6/12/116

Future work:
 - Add __HAVE_LOCAL_FLUSH_TLB_KERNEL_RANGE definition to
   archs that already have local_tlb_flush_kernel_range()
 - Add mapping mode flags (RO, WO, RW) to zs_map_object()
   to avoid unnecessary copies in the generic case

Based on Greg's staging-next.

Seth Jennings (3):
  zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC
  zsmalloc: add generic path and remove x86 dependency
  x86: add local_tlb_flush_kernel_range()

 arch/x86/include/asm/tlbflush.h          |   21 +++++
 drivers/staging/zcache/Kconfig           |    5 +-
 drivers/staging/zram/Kconfig             |    5 +-
 drivers/staging/zsmalloc/Kconfig         |    4 -
 drivers/staging/zsmalloc/zsmalloc-main.c |  136 ++++++++++++++++++++++++------
 drivers/staging/zsmalloc/zsmalloc_int.h  |    5 +-
 6 files changed, 138 insertions(+), 38 deletions(-)

-- 
1.7.9.5

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