backports: add crypto/ccm backport
PATCH 1/1 backports: add crypto/ccm backport
From: Johannes Berg <[email protected]>
This seems to commonly be missing in the random kernels people use, so just provide a backport.
Signed-off-by Johannes Berg <[email protected]>
--- backport/compat/Kconfig | 9 ++++ backport/compat/Makefile | 1 + backport/compat/backports.h | 10 ++++ backport/compat/main.c | 8 +-- patches/backport-adjustments/crypto-ccm.patch | 76 +++++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 patches/backport-adjustments/crypto-ccm.patch
backport/compat/Kconfig +9 -0
@@ -175,3 +175,12 @@ config BACKPORT_USERSEL_BUILD_ALL It's only really useful for compat testing, so you probably shouldn't enable it. + +config BACKPORT_CRYPTO_CCM + bool + +config BACKPORT_BUILD_CRYPTO_CCM + bool + default n if CRYPTO_CCM + default y if BACKPORT_CRYPTO_CCM + #c-file crypto/ccm.c
backport/compat/Makefile +1 -0
@@ -32,6 +32,7 @@ compat-$(CPTCFG_BACKPORT_KERNEL_3_13) += backport-3.13.o compat-$(CPTCFG_BACKPORT_KERNEL_3_14) += backport-3.14.o compat-$(CPTCFG_BACKPORT_KERNEL_3_15) += backport-3.15.o +compat-$(CPTCFG_BACKPORT_BUILD_CRYPTO_CCM) += crypto-ccm.o compat-$(CPTCFG_BACKPORT_BUILD_KFIFO) += kfifo.o compat-$(CPTCFG_BACKPORT_BUILD_GENERIC_ATOMIC64) += compat_atomic.o compat-$(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
backport/compat/backports.h +10 -0
@@ -11,4 +11,14 @@ static inline int __init dma_buf_init(void) { return 0; } static inline void __exit dma_buf_deinit(void) { }#endif +#ifdef CPTCFG_BACKPORT_BUILD_CRYPTO_CCM +int crypto_ccm_module_init (void ); +void crypto_ccm_module_exit (void ); +#else +static inline int crypto_ccm_module_init (void ) +{return 0 ; } +static inline void crypto_ccm_module_exit (void ) +{} +#endif +#endif /* LINUX_BACKPORTS_PRIVATE_H */
backport/compat/main.c +5 -3
@@ -54,6 +54,10 @@ EXPORT_SYMBOL_GPL(backport_dependency_symbol);static int __init backport_init (void ) { +int ret =crypto_ccm_module_init (); +if (ret) +return ret; +backport_system_workqueue_create ();backport_init_mmc_pm_flags ();dma_buf_init ();
@@ -76,8 +80,6 @@ subsys_initcall(backport_init); static void __exit backport_exit(void) {backport_system_workqueue_destroy (); - -return ; +crypto_ccm_module_exit (); }module_exit (backport_exit); -
patches/backport-adjustments/crypto-ccm.patch new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
1.8.5.3