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]
Message-Id: <20070918150232.128397b4.randy.dunlap@oracle.com>
Date:	Tue, 18 Sep 2007 15:02:32 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Adrian Bunk <bunk@...sta.de>, Andi Kleen <andi@...stfloor.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [patch 2/7] Immediate Values - Kconfig menu in EMBEDDED

On Tue, 18 Sep 2007 17:07:49 -0400 Mathieu Desnoyers wrote:

> Immediate values provide a way to use dynamic code patching to update variables
> sitting within the instruction stream. It saves caches lines normally used by
> static read mostly variables. Enable it by default, but let users disable it
> through the EMBEDDED menu with the "Disable immediate values" submenu entry.
> 
> Note: Since I think that I really should let embedded systems developers using
> RO memory the option to disable the immediate values, I choose to leave this
> menu option there, in the EMBEDDED menu. Also, the "CONFIG_IMMEDIATE" makes
> sense because we want to compile out all the immediate code when we decide not
> to use optimized immediate values at all (it removes otherwise unused code).
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
> CC: Adrian Bunk <bunk@...sta.de>
> CC: Andi Kleen <andi@...stfloor.org>
> CC: Alexey Dobriyan <adobriyan@...il.com>
> CC: Christoph Hellwig <hch@...radead.org>
> ---
>  init/Kconfig |   21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> Index: linux-2.6-lttng/init/Kconfig
> ===================================================================
> --- linux-2.6-lttng.orig/init/Kconfig	2007-09-18 10:09:40.000000000 -0400
> +++ linux-2.6-lttng/init/Kconfig	2007-09-18 13:14:58.000000000 -0400
> @@ -407,6 +407,17 @@ config CC_OPTIMIZE_FOR_SIZE
>  config SYSCTL
>  	bool
>  
> +config IMMEDIATE
> +	default y if !DISABLE_IMMEDIATE

So DISABLE_IMMEDIATE is just an intermediate symbol to make this option
be displayed in the EMBEDDED menu instead of in the General Setup menu ?


> +	depends on X86_32 || PPC || PPC64
> +	bool
> +	help
> +	  Immediate values are used as read-mostly variables that are rarely
> +	  updated. They use code patching to modify the values inscribed in the
> +	  instruction stream. It provides a way to save precious cache lines
> +	  that would otherwise have to be used by these variables. They can be
> +	  disabled through the EMBEDDED menu.
> +
>  menuconfig EMBEDDED
>  	bool "Configure standard kernel features (for small systems)"
>  	help
> @@ -646,6 +657,16 @@ config PROC_KPAGEMAP
>            information on page-level memory usage. Disabling this interface
>            will reduce the size of the kernel by around 600 bytes.
>  
> +config DISABLE_IMMEDIATE
> +	default y if EMBEDDED
> +	bool "Disable immediate values" if EMBEDDED
> +	depends on X86_32 || PPC || PPC64
> +	help
> +	  Disable code patching based immediate values for embedded systems. It
> +	  consumes slightly more memory and requires to modify the instruction
> +	  stream each time a variable is updated. Should really be disabled for
> +	  embedded systems with read-only text.
> +
>  endmenu		# General setup
>  
>  config RT_MUTEXES

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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