Skip to content

Commit

Permalink
drivers/char: Remove LRNG v44 patchset
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
xanmod committed May 30, 2022
1 parent 9ffe6c5 commit cafd914
Show file tree
Hide file tree
Showing 33 changed files with 10 additions and 7,306 deletions.
7 changes: 0 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11113,13 +11113,6 @@ F: Documentation/litmus-tests/
F: Documentation/memory-barriers.txt
F: tools/memory-model/

LINUX RANDOM NUMBER GENERATOR (LRNG) DRIVER
M: Stephan Mueller <smueller@chronox.de>
S: Maintained
W: https://www.chronox.de/lrng.html
F: drivers/char/lrng/
F: include/linux/lrng.h

LIS3LV02D ACCELEROMETER DRIVER
M: Eric Piel <eric.piel@tremplin-utc.net>
S: Maintained
Expand Down
16 changes: 6 additions & 10 deletions crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
* the SHA256 / AES 256 over other ciphers. Thus, the favored
* DRBGs are the latest entries in this array.
*/
const struct drbg_core drbg_cores[] = {
static const struct drbg_core drbg_cores[] = {
#ifdef CONFIG_CRYPTO_DRBG_CTR
{
.flags = DRBG_CTR | DRBG_STRENGTH128,
Expand Down Expand Up @@ -192,7 +192,6 @@ const struct drbg_core drbg_cores[] = {
},
#endif /* CONFIG_CRYPTO_DRBG_HMAC */
};
EXPORT_SYMBOL(drbg_cores);

static int drbg_uninstantiate(struct drbg_state *drbg);

Expand All @@ -208,7 +207,7 @@ static int drbg_uninstantiate(struct drbg_state *drbg);
* Return: normalized strength in *bytes* value or 32 as default
* to counter programming errors
*/
unsigned short drbg_sec_strength(drbg_flag_t flags)
static inline unsigned short drbg_sec_strength(drbg_flag_t flags)
{
switch (flags & DRBG_STRENGTH_MASK) {
case DRBG_STRENGTH128:
Expand All @@ -221,7 +220,6 @@ unsigned short drbg_sec_strength(drbg_flag_t flags)
return 32;
}
}
EXPORT_SYMBOL(drbg_sec_strength);

/*
* FIPS 140-2 continuous self test for the noise source
Expand Down Expand Up @@ -1254,7 +1252,7 @@ static int drbg_seed(struct drbg_state *drbg, struct drbg_string *pers,
}

/* Free all substructures in a DRBG state without the DRBG state structure */
void drbg_dealloc_state(struct drbg_state *drbg)
static inline void drbg_dealloc_state(struct drbg_state *drbg)
{
if (!drbg)
return;
Expand All @@ -1275,13 +1273,12 @@ void drbg_dealloc_state(struct drbg_state *drbg)
drbg->fips_primed = false;
}
}
EXPORT_SYMBOL(drbg_dealloc_state);

/*
* Allocate all sub-structures for a DRBG state.
* The DRBG state structure must already be allocated.
*/
int drbg_alloc_state(struct drbg_state *drbg)
static inline int drbg_alloc_state(struct drbg_state *drbg)
{
int ret = -ENOMEM;
unsigned int sb_size = 0;
Expand Down Expand Up @@ -1362,7 +1359,6 @@ int drbg_alloc_state(struct drbg_state *drbg)
drbg_dealloc_state(drbg);
return ret;
}
EXPORT_SYMBOL(drbg_alloc_state);

/*************************************************************************
* DRBG interface functions
Expand Down Expand Up @@ -1899,7 +1895,8 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
*
* return: flags
*/
void drbg_convert_tfm_core(const char *cra_driver_name, int *coreref, bool *pr)
static inline void drbg_convert_tfm_core(const char *cra_driver_name,
int *coreref, bool *pr)
{
int i = 0;
size_t start = 0;
Expand All @@ -1926,7 +1923,6 @@ void drbg_convert_tfm_core(const char *cra_driver_name, int *coreref, bool *pr)
}
}
}
EXPORT_SYMBOL(drbg_convert_tfm_core);

static int drbg_kcapi_init(struct crypto_tfm *tfm)
{
Expand Down
3 changes: 2 additions & 1 deletion crypto/jitterentropy-kcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#include <linux/slab.h>
#include <linux/time.h>
#include <crypto/internal/rng.h>
#include <crypto/internal/jitterentropy.h>

#include "jitterentropy.h"

/***************************************************************************
* Helper function
Expand Down
2 changes: 1 addition & 1 deletion crypto/jitterentropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct rand_data {
#define JENT_ENTROPY_SAFETY_FACTOR 64

#include <linux/fips.h>
#include <crypto/internal/jitterentropy.h>
#include "jitterentropy.h"

/***************************************************************************
* Adaptive Proportion Test
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,4 @@ config RANDOM_TRUST_BOOTLOADER
pool. Otherwise, say N here so it will be regarded as device input that
only mixes the entropy pool.

source "drivers/char/lrng/Kconfig"

endmenu
9 changes: 1 addition & 8 deletions drivers/char/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# Makefile for the kernel character device drivers.
#

obj-y += mem.o

ifeq ($(CONFIG_LRNG),y)
obj-y += lrng/
else
obj-y += random.o
endif

obj-y += mem.o random.o
obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o
obj-y += misc.o
obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
Expand Down

0 comments on commit cafd914

Please sign in to comment.