All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 30/48] Kconfig: Add CONFIG_HASH to enable hashing API
Date: Wed, 17 May 2017 09:13:17 -0400	[thread overview]
Message-ID: <20170517131317.GO5701@bill-the-cat> (raw)
In-Reply-To: <20170517092544.19357-31-sjg@chromium.org>

On Wed, May 17, 2017 at 03:25:26AM -0600, Simon Glass wrote:

> At present CONFIG_CMD_HASH enables the 'hash' command which also brings
> in the hashing API. Some boards may wish to enable the API without the
> command. Add a separate CONFIG to permit this.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  cmd/Kconfig     |  2 ++
>  common/Kconfig  | 12 ++++++++++++
>  common/Makefile |  2 +-
>  common/hash.c   |  4 ++--
>  4 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index b05e69a8b7..1e3cd02703 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -350,6 +350,7 @@ config CMD_MEMORY
>  
>  config CMD_CRC32
>  	bool "crc32"
> +	select HASH
>  	default y
>  	help
>  	  Compute CRC32.
> @@ -998,6 +999,7 @@ config CMD_BLOB
>  
>  config CMD_HASH
>  	bool "Support 'hash' command"
> +	select HASH
>  	help
>  	  This provides a way to hash data in memory using various supported
>  	  algorithms (such as SHA1, MD5, CRC32). The computed digest can be
> diff --git a/common/Kconfig b/common/Kconfig
> index 1879aefaf8..23bcf99a2c 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -493,4 +493,16 @@ config BOARD_EARLY_INIT_F
>  
>  endmenu
>  
> +menu "Security support"
> +
> +config HASH
> +	bool "Support hashing API (SHA1, SHA256, etc.)"
> +	help
> +	  This provides a way to hash data in memory using various supported
> +	  algorithms (such as SHA1, MD5, CRC32). The API is defined in hash.h
> +	  and the algorithms it supports are defined in common/hash.c. See
> +	  also CMD_HASH for command-line access.

No need to resend the whole series.  But I think we should make this a
hidden (but with the help!) option.  It's framework, so if you say y
here and then don't use it anywhere (in say a command or another
framework) it will just get discarded at link time.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/2163d944/attachment.sig>

  reply	other threads:[~2017-05-17 13:13 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17  9:24 [U-Boot] [PATCH v3 00/48] Kconfig: Convert commands (D to L) to Kconfig Simon Glass
2017-05-17  9:24 ` [U-Boot] [PATCH v3 01/48] configs: Re-sync Simon Glass
2017-05-17  9:24 ` [U-Boot] [PATCH v3 02/48] Kconfig: Drop CONFIG_CMD_DS4510_INFO Simon Glass
2017-05-22 17:58   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:24 ` [U-Boot] [PATCH v3 03/48] Kconfig: Drop CONFIG_CMD_DS4510_MEM Simon Glass
2017-05-22 17:58   ` [U-Boot] [U-Boot,v3,03/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 04/48] Kconfig: Drop CONFIG_CMD_DS4510_RST Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot,v3,04/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 05/48] Kconfig: Drop CONFIG_CMD_DS4510 Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot,v3,05/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 06/48] Convert CONFIG_DS4510 to Kconfig Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot,v3,06/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 07/48] Kconfig: Drop CONFIG_SYS_I2C_DTT_ADDR Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 08/48] Drop three-wire serial (TWS) support Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 09/48] Drop digital thermometer and thermostat (DTT) drivers Simon Glass
2017-05-22 17:59   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 10/48] Kconfig: Drop CONFIG_SYS_I2C_DS1621_ADDR Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 11/48] Kconfig: Drop CONFIG_SYS_I2C_DS4510_ADDR Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 12/48] Convert CONFIG_CMD_ECCTEST to Kconfig Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 13/48] Convert CONFIG_CMD_EECONFIG " Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 14/48] Convert CONFIG_CMD_EEPROM et al " Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 15/48] Convert CONFIG_CMD_ENTERRCM " Simon Glass
2017-05-22 18:00   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 16/48] Kconfig: Drop CONFIG_CMD_ENV Simon Glass
2017-05-22 18:01   ` [U-Boot] [U-Boot,v3,16/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 17/48] Convert CONFIG_CMD_ENV_CALLBACK to Kconfig Simon Glass
2017-05-22 18:01   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 18/48] Convert CONFIG_CMD_ENV_FLAGS " Simon Glass
2017-05-22 18:01   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 19/48] Convert CONFIG_CMD_ERRATA " Simon Glass
2017-05-22 18:01   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-22 18:01   ` Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 20/48] Convert CONFIG_CMD_ESBC_VALIDATE " Simon Glass
2017-05-22 18:01   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 21/48] Convert CONFIG_CMD_ETHSW " Simon Glass
2017-05-22 18:02   ` [U-Boot] [U-Boot,v3,21/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 22/48] Convert CONFIG_CMD_FDC " Simon Glass
2017-05-22 18:02   ` [U-Boot] [U-Boot,v3,22/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 23/48] Kconfig: Drop CONFIG_CMD_FDT_MAX_DUMP Simon Glass
2017-05-22 18:02   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 24/48] Convert CONFIG_CMD_FPGAD to Kconfig Simon Glass
2017-05-22 18:02   ` [U-Boot] [U-Boot,v3,24/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 25/48] Convert CONFIG_CMD_FPGA_LOADBP et al " Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 26/48] Convert CONFIG_CMD_FUSE " Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot,v3,26/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 27/48] Convert CONFIG_CMD_GETTIME " Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 28/48] Convert CONFIG_CMD_GSC " Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot,v3,28/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 29/48] Convert CONFIG_CMD_HASH " Simon Glass
2017-05-17 13:11   ` Tom Rini
2017-05-22 18:03   ` [U-Boot] [U-Boot,v3,29/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 30/48] Kconfig: Add CONFIG_HASH to enable hashing API Simon Glass
2017-05-17 13:13   ` Tom Rini [this message]
2017-05-17 15:07     ` Simon Glass
2017-05-17  9:25 ` [U-Boot] [PATCH v3 31/48] Convert CONFIG_CMD_HD44760 to Kconfig Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 32/48] Convert CONFIG_CMD_HDMIDETECT " Simon Glass
2017-05-22 18:03   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 33/48] Convert CONFIG_CMD_IDE " Simon Glass
2017-05-22 18:04   ` [U-Boot] [U-Boot,v3,33/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 34/48] Kconfig: Add a CONFIG_IDE option Simon Glass
2017-05-22 18:04   ` [U-Boot] [U-Boot,v3,34/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 35/48] Convert CONFIG_CMD_IMMAP to Kconfig Simon Glass
2017-05-22 18:04   ` [U-Boot] [U-Boot,v3,35/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 36/48] Kconfig: Drop CONFIG_CMD_IMXOTP Simon Glass
2017-05-22 18:04   ` [U-Boot] [U-Boot,v3,36/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 37/48] Kconfig: Drop CONFIG_CMD_IMX_FUSE Simon Glass
2017-05-22 18:05   ` [U-Boot] [U-Boot,v3,37/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 38/48] Convert CONFIG_CMD_IO to Kconfig Simon Glass
2017-05-22 18:05   ` [U-Boot] [U-Boot,v3,38/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 39/48] Convert CONFIG_CMD_IOLOOP " Simon Glass
2017-05-22 18:05   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 40/48] Convert CONFIG_CMD_IOTRACE " Simon Glass
2017-05-22 18:05   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 41/48] Convert CONFIG_CMD_JFFS2 " Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot,v3,41/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 42/48] fs: Kconfig: Add a separate option for FS_JFFS2 Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 43/48] Convert CONFIG_CMD_IRQ to Kconfig Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot,v3,43/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 44/48] Convert CONFIG_CMD_KGDB " Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot,v3,44/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 45/48] Kconfig: Drop CONFIG_CMD_LOADY Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot,v3,45/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 46/48] Convert CONFIG_LZMA to Kconfig Simon Glass
2017-05-22 18:06   ` [U-Boot] [U-Boot,v3,46/48] " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 47/48] Convert CONFIG_CMD_LZMADEC " Simon Glass
2017-05-22 18:07   ` [U-Boot] [U-Boot, v3, " Tom Rini
2017-05-17  9:25 ` [U-Boot] [PATCH v3 48/48] sandbox: Enable CMD_GETTIME Simon Glass
2017-05-22 18:07   ` [U-Boot] [U-Boot,v3,48/48] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170517131317.GO5701@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.