#include <crypto/hash.h>
#include <linux/cpu.h>
#include <linux/kref.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/percpu.h>
#include <linux/workqueue.h>
#include <net/tcp.h>
static size_t __scratch_size;
struct sigpool_scratch { … };
static DEFINE_PER_CPU(struct sigpool_scratch, sigpool_scratch) = …;
struct sigpool_entry { … };
#define CPOOL_SIZE …
static struct sigpool_entry cpool[CPOOL_SIZE];
static unsigned int cpool_populated;
static DEFINE_MUTEX(cpool_mutex);
struct scratches_to_free { … };
static void free_old_scratches(struct rcu_head *head)
{ … }
static int sigpool_reserve_scratch(size_t size)
{ … }
static void sigpool_scratch_free(void)
{ … }
static int __cpool_try_clone(struct crypto_ahash *hash)
{ … }
static int __cpool_alloc_ahash(struct sigpool_entry *e, const char *alg)
{ … }
int tcp_sigpool_alloc_ahash(const char *alg, size_t scratch_size)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __cpool_free_entry(struct sigpool_entry *e)
{ … }
static void cpool_cleanup_work_cb(struct work_struct *work)
{ … }
static DECLARE_WORK(cpool_cleanup_work, cpool_cleanup_work_cb);
static void cpool_schedule_cleanup(struct kref *kref)
{ … }
void tcp_sigpool_release(unsigned int id)
{ … }
EXPORT_SYMBOL_GPL(…);
void tcp_sigpool_get(unsigned int id)
{ … }
EXPORT_SYMBOL_GPL(…);
int tcp_sigpool_start(unsigned int id, struct tcp_sigpool *c) __cond_acquires(RCU_BH)
{ … }
EXPORT_SYMBOL_GPL(…);
void tcp_sigpool_end(struct tcp_sigpool *c) __releases(RCU_BH)
{ … }
EXPORT_SYMBOL_GPL(…);
size_t tcp_sigpool_algo(unsigned int id, char *buf, size_t buf_len)
{ … }
EXPORT_SYMBOL_GPL(…);
int tcp_sigpool_hash_skb_data(struct tcp_sigpool *hp,
const struct sk_buff *skb,
unsigned int header_len)
{ … }
EXPORT_SYMBOL(…);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;