Re: [RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-23 Thread Jason Cooper
On Tue, Mar 18, 2014 at 02:28:20PM +, Greg KH wrote:
 On Tue, Mar 18, 2014 at 08:58:49AM -0400, Jason Cooper wrote:
  On Mon, Mar 17, 2014 at 02:52:52PM -0700, Greg KH wrote:
   On Tue, Mar 11, 2014 at 09:32:35PM +, Jason Cooper wrote:
These are the minimum changes required to get the code to build
statically in the kernel.  It's necessary to do this first so that we
can empirically determine that future cleanup patches aren't changing
the generated object code.

Signed-off-by: Jason Cooper ja...@lakedaemon.net
   
   This doesn't apply to my latest tree :(
  
  Ah, ok.  I'll rebase this series on the staging tree.

Done, submitted.

--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -65,3 +65,4 @@ obj-$(CONFIG_XILLYBUS)+= xillybus/
 obj-$(CONFIG_DGNC) += dgnc/
 obj-$(CONFIG_DGAP) += dgap/
 obj-$(CONFIG_MTD_SPINAND_MT29F)+= mt29f_spinand/
+obj-$(CONFIG_CRYPTO_SKEIN) += skein/
   
   Care to align these up with the way this file is formatted?
  
  Of course, not sure what happened there (well, other than the obvious
  :-P)

dabbit.  I thought I remembered everything.  I'll do a V3 of this patch.

   And I have no objection to taking the drivers/staging/ patches, the
   script looks useful, but I can't take it through the staging tree,
   sorry.
  
  Ok, I'll pull that out as a separate branch.

s/branch/patch/.  Done.

thx,

Jason.
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-18 Thread Jason Cooper
On Mon, Mar 17, 2014 at 02:52:52PM -0700, Greg KH wrote:
 On Tue, Mar 11, 2014 at 09:32:35PM +, Jason Cooper wrote:
  These are the minimum changes required to get the code to build
  statically in the kernel.  It's necessary to do this first so that we
  can empirically determine that future cleanup patches aren't changing
  the generated object code.
  
  Signed-off-by: Jason Cooper ja...@lakedaemon.net
 
 This doesn't apply to my latest tree :(

Ah, ok.  I'll rebase this series on the staging tree.

  --- a/drivers/staging/Makefile
  +++ b/drivers/staging/Makefile
  @@ -65,3 +65,4 @@ obj-$(CONFIG_XILLYBUS)+= xillybus/
   obj-$(CONFIG_DGNC) += dgnc/
   obj-$(CONFIG_DGAP) += dgap/
   obj-$(CONFIG_MTD_SPINAND_MT29F)+= mt29f_spinand/
  +obj-$(CONFIG_CRYPTO_SKEIN) += skein/
 
 Care to align these up with the way this file is formatted?

Of course, not sure what happened there (well, other than the obvious
:-P)

 And I have no objection to taking the drivers/staging/ patches, the
 script looks useful, but I can't take it through the staging tree,
 sorry.

Ok, I'll pull that out as a separate branch.  Do you mind taking a
series that depends on a topic branch from another tree?  We do it a lot
in arm-soc, but I'm not sure how popular that is elsewhere.

It's purely an audit/testing dependency, but it would be nice to have it
available in the history if someone wants to audit the changes.

I have one change I'd like to do to the objdiff script.  I'd like it to
assume 'HEAD^ HEAD' when the user executes './scripts/objdiff diff'.

I'll respin both and submit a v1.

Thanks for the review.

thx,

Jason.
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-18 Thread Greg KH
On Tue, Mar 18, 2014 at 08:58:49AM -0400, Jason Cooper wrote:
 On Mon, Mar 17, 2014 at 02:52:52PM -0700, Greg KH wrote:
  On Tue, Mar 11, 2014 at 09:32:35PM +, Jason Cooper wrote:
   These are the minimum changes required to get the code to build
   statically in the kernel.  It's necessary to do this first so that we
   can empirically determine that future cleanup patches aren't changing
   the generated object code.
   
   Signed-off-by: Jason Cooper ja...@lakedaemon.net
  
  This doesn't apply to my latest tree :(
 
 Ah, ok.  I'll rebase this series on the staging tree.
 
   --- a/drivers/staging/Makefile
   +++ b/drivers/staging/Makefile
   @@ -65,3 +65,4 @@ obj-$(CONFIG_XILLYBUS)  += xillybus/
obj-$(CONFIG_DGNC)   += dgnc/
obj-$(CONFIG_DGAP)   += dgap/
obj-$(CONFIG_MTD_SPINAND_MT29F)  += mt29f_spinand/
   +obj-$(CONFIG_CRYPTO_SKEIN) += skein/
  
  Care to align these up with the way this file is formatted?
 
 Of course, not sure what happened there (well, other than the obvious
 :-P)
 
  And I have no objection to taking the drivers/staging/ patches, the
  script looks useful, but I can't take it through the staging tree,
  sorry.
 
 Ok, I'll pull that out as a separate branch.  Do you mind taking a
 series that depends on a topic branch from another tree?  We do it a lot
 in arm-soc, but I'm not sure how popular that is elsewhere.

It's not a dependancy at all, and I don't take git pull requests for the
staging tree, just email patches, sorry.

So just resend these patches thanks.

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-17 Thread Greg KH
On Tue, Mar 11, 2014 at 09:32:35PM +, Jason Cooper wrote:
 These are the minimum changes required to get the code to build
 statically in the kernel.  It's necessary to do this first so that we
 can empirically determine that future cleanup patches aren't changing
 the generated object code.
 
 Signed-off-by: Jason Cooper ja...@lakedaemon.net

This doesn't apply to my latest tree :(

 --- a/drivers/staging/Makefile
 +++ b/drivers/staging/Makefile
 @@ -65,3 +65,4 @@ obj-$(CONFIG_XILLYBUS)  += xillybus/
  obj-$(CONFIG_DGNC)   += dgnc/
  obj-$(CONFIG_DGAP)   += dgap/
  obj-$(CONFIG_MTD_SPINAND_MT29F)  += mt29f_spinand/
 +obj-$(CONFIG_CRYPTO_SKEIN) += skein/

Care to align these up with the way this file is formatted?

And I have no objection to taking the drivers/staging/ patches, the
script looks useful, but I can't take it through the staging tree,
sorry.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-11 Thread Jason Cooper
These are the minimum changes required to get the code to build
statically in the kernel.  It's necessary to do this first so that we
can empirically determine that future cleanup patches aren't changing
the generated object code.

Signed-off-by: Jason Cooper ja...@lakedaemon.net
---
 drivers/staging/Kconfig  |  2 +
 drivers/staging/Makefile |  1 +
 drivers/staging/skein/CMakeLists.txt | 27 -
 drivers/staging/skein/Kconfig| 32 
 drivers/staging/skein/Makefile   | 13 +++
 drivers/staging/skein/include/brg_types.h| 57 
 drivers/staging/skein/include/skein.h| 10 -
 drivers/staging/skein/include/skeinApi.h |  2 +-
 drivers/staging/skein/include/skein_port.h   | 16 +---
 drivers/staging/skein/include/threefishApi.h |  2 +-
 drivers/staging/skein/skein.c|  2 +-
 drivers/staging/skein/skeinApi.c |  4 +-
 drivers/staging/skein/skeinBlockNo3F.c   |  2 +-
 drivers/staging/skein/skein_block.c  |  2 +-
 drivers/staging/skein/threefish1024Block.c   |  3 +-
 drivers/staging/skein/threefish256Block.c|  3 +-
 drivers/staging/skein/threefish512Block.c|  3 +-
 drivers/staging/skein/threefishApi.c |  3 +-
 18 files changed, 59 insertions(+), 125 deletions(-)
 delete mode 100755 drivers/staging/skein/CMakeLists.txt
 create mode 100644 drivers/staging/skein/Kconfig
 create mode 100644 drivers/staging/skein/Makefile

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 99375f0a9440..fbcbe833dc89 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -146,4 +146,6 @@ source drivers/staging/dgnc/Kconfig
 
 source drivers/staging/dgap/Kconfig
 
+source drivers/staging/skein/Kconfig
+
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index ddc3c4a5d39d..2dee51d1a483 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -65,3 +65,4 @@ obj-$(CONFIG_XILLYBUS)+= xillybus/
 obj-$(CONFIG_DGNC) += dgnc/
 obj-$(CONFIG_DGAP) += dgap/
 obj-$(CONFIG_MTD_SPINAND_MT29F)+= mt29f_spinand/
+obj-$(CONFIG_CRYPTO_SKEIN) += skein/
diff --git a/drivers/staging/skein/CMakeLists.txt 
b/drivers/staging/skein/CMakeLists.txt
deleted file mode 100755
index 604aaa394cb1..
--- a/drivers/staging/skein/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-cmake_minimum_required (VERSION 2.6)
-
-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-# set(skeinBlock_src skein_block.c)
-set(skeinBlock_src skeinBlockNo3F.c)
-
-set(skein_src 
-${skeinBlock_src}
-skein.c
-skeinApi.c
-)
-
-set(threefish_src
-threefishApi.c
-threefish256Block.c
-threefish512Block.c
-threefish1024Block.c
-)
-set(s3f_src ${skein_src} ${threefish_src})
-
-add_library(skein3fish SHARED ${s3f_src})
-set_target_properties(skein3fish PROPERTIES VERSION ${VERSION} SOVERSION 
${SOVERSION})
-target_link_libraries(skein3fish ${LIBS})
-
-install(TARGETS skein3fish DESTINATION ${LIBDIRNAME})
-
diff --git a/drivers/staging/skein/Kconfig b/drivers/staging/skein/Kconfig
new file mode 100644
index ..8f5a72a90ced
--- /dev/null
+++ b/drivers/staging/skein/Kconfig
@@ -0,0 +1,32 @@
+config CRYPTO_SKEIN
+   bool Skein digest algorithm
+   depends on (X86 || UML_X86)  64BIT
+   select CRYPTO_THREEFISH
+   select CRYPTO_HASH
+   help
+ Skein secure hash algorithm is one of 5 finalists from the NIST SHA3
+ competition.
+
+ Skein is optimized for modern, 64bit processors and is highly
+ customizable.  See:
+
+ http://www.skein-hash.info/sites/default/files/skein1.3.pdf
+
+ for more information.  This module depends on the threefish block
+ cipher module.
+
+config CRYPTO_THREEFISH
+   bool Threefish tweakable block cipher
+   depends on (X86 || UML_X86)  64BIT
+   select CRYPTO_ALGAPI
+   help
+ Threefish cipher algorithm is the tweakable block cipher underneath
+ the Skein family of secure hash algorithms.  Skein is one of 5
+ finalists from the NIST SHA3 competition.
+
+ Skein is optimized for modern, 64bit processors and is highly
+ customizable.  See:
+
+ http://www.skein-hash.info/sites/default/files/skein1.3.pdf
+
+ for more information.
diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile
new file mode 100644
index ..2bb386e1e58c
--- /dev/null
+++ b/drivers/staging/skein/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile for the skein secure hash algorithm
+#
+subdir-ccflags-y := -I$(src)/include/
+
+obj-$(CONFIG_CRYPTO_SKEIN) +=   skein.o \
+   skeinApi.o \
+   skein_block.o
+
+obj-$(CONFIG_CRYPTO_THREEFISH) += threefish1024Block.o \
+