Re: [PATCH v2] staging: skein: Loadable Module Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 22, 2014 at 10:54:26AM -0500, Eric Rost wrote:
> On Wed, 2014-10-22 at 11:10 -0400, Jason Cooper wrote:
> > At some point, Eric Rost wrote:
...
> > > diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile
> > > index a14aadd..1be01fe 100644
> > > --- a/drivers/staging/skein/Makefile
> > > +++ b/drivers/staging/skein/Makefile
> > > @@ -5,5 +5,11 @@ obj-$(CONFIG_CRYPTO_SKEIN) +=   skein.o \
> > >  				skein_api.o \
> > >  				skein_block.o
> > >  
> > > +obj-$(CONFIG_CRYPTO_SKEIN_256) += skein256_generic.o
> > > +
> > > +obj-$(CONFIG_CRYPTO_SKEIN_512) += skein512_generic.o
> > > +
> > > +obj-$(CONFIG_CRYPTO_SKEIN_1024) += skein1024_generic.o
> > > +
> > 
> > This isn't really doing what we want.  You'll have loadable modules, but
> > the actual code will still be built into the kernel.
> > 
> > >  obj-$(CONFIG_CRYPTO_THREEFISH) += threefish_block.o \
> > >  				  threefish_api.o
> > > diff --git a/drivers/staging/skein/skein.c b/drivers/staging/skein/skein.c
> > > index 8cc8358..2138e22 100644
> > > --- a/drivers/staging/skein/skein.c
> > > +++ b/drivers/staging/skein/skein.c
> > > @@ -11,6 +11,7 @@
> > >  #define  SKEIN_PORT_CODE /* instantiate any code in skein_port.h */
> > >  
> > >  #include <linux/string.h>       /* get the memcpy/memset functions */
> > > +#include <linux/export.h>
> > >  #include "skein.h" /* get the Skein API definitions   */
> > >  #include "skein_iv.h"    /* get precomputed IVs */
> > >  #include "skein_block.h"
> > > @@ -73,6 +74,7 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len)
> > >  
> > >  	return SKEIN_SUCCESS;
> > >  }
> > > +EXPORT_SYMBOL(skein_256_init);
> > 
> > Once the above is corrected, these shouldn't be necessary.
> > 
> Will give it a whirl, I was having problems with undefined symbols at
> linking even when I was building it as one module, but it may have been
> something else

Try just changing CRYPTO_SKEIN to a tri-state, and adding your
skein_generic.o to the obj-$(CONFIG_CRYPTO_SKEIN) list.

You'll probably have to collapse CRYPTO_THREEFISH into CRYPTO_SKEIN for
now.  Let's get the crypto API registration proper first, them we can
focus on the loadable module bit.

thx,

Jason.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux