Skip to content

Commit

Permalink
drivers/char: Remove LRNG v43 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 Aug 5, 2022
1 parent 16c7dd0 commit 858d4b0
Show file tree
Hide file tree
Showing 33 changed files with 10 additions and 7,266 deletions.
7 changes: 0 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10161,13 +10161,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 @@ -113,7 +113,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 @@ -190,7 +190,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 @@ -206,7 +205,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 @@ -219,7 +218,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 @@ -1216,7 +1214,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 @@ -1237,13 +1235,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 @@ -1324,7 +1321,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 @@ -1894,7 +1890,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 @@ -1921,7 +1918,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 @@ -43,7 +43,8 @@
#include <linux/fips.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 @@ -117,7 +117,7 @@ struct rand_data {
#define JENT_EHEALTH 9 /* Health test failed during initialization */
#define JENT_ERCT 10 /* RCT failed during initialization */

#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 @@ -471,8 +471,6 @@ config ADI
and SSM (Silicon Secured Memory). Intended consumers of this
driver include crash and makedumpfile.

source "drivers/char/lrng/Kconfig"

endmenu

config RANDOM_TRUST_CPU
Expand Down
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 858d4b0

Please sign in to comment.