aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/proc.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-11-05 00:58:14 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-09 17:15:37 -0500
commit5cb1454b862ab3040b78364d58330262fea1ddba (patch)
tree7e62126fa1f1398bb6a6b7f9e136aece32b0e112 /crypto/proc.c
parent06ace7a9bafeb9047352707eb79e8eaa0dfdf5f2 (diff)
[CRYPTO] Allow multiple implementations of the same algorithm
This is the first step on the road towards asynchronous support in the Crypto API. It adds support for having multiple crypto_alg objects for the same algorithm registered in the system. For example, each device driver would register a crypto_alg object for each algorithm that it supports. While at the same time the user may load software implementations of those same algorithms. Users of the Crypto API may then select a specific implementation by name, or choose any implementation for a given algorithm with the highest priority. The priority field is a 32-bit signed integer. In future it will be possible to modify it from user-space. This also provides a solution to the problem of selecting amongst various AES implementations, that is, aes vs. aes-i586 vs. aes-padlock. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/proc.c')
-rw-r--r--crypto/proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/proc.c b/crypto/proc.c
index 630ba91c08f1..c0a5dd7ce2cc 100644
--- a/crypto/proc.c
+++ b/crypto/proc.c
@@ -4,6 +4,7 @@
4 * Procfs information. 4 * Procfs information.
5 * 5 *
6 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 6 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
7 * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free 10 * under the terms of the GNU General Public License as published by the Free
@@ -18,9 +19,6 @@
18#include <linux/seq_file.h> 19#include <linux/seq_file.h>
19#include "internal.h" 20#include "internal.h"
20 21
21extern struct list_head crypto_alg_list;
22extern struct rw_semaphore crypto_alg_sem;
23
24static void *c_start(struct seq_file *m, loff_t *pos) 22static void *c_start(struct seq_file *m, loff_t *pos)
25{ 23{
26 struct list_head *v; 24 struct list_head *v;
@@ -53,7 +51,9 @@ static int c_show(struct seq_file *m, void *p)
53 struct crypto_alg *alg = (struct crypto_alg *)p; 51 struct crypto_alg *alg = (struct crypto_alg *)p;
54 52
55 seq_printf(m, "name : %s\n", alg->cra_name); 53 seq_printf(m, "name : %s\n", alg->cra_name);
54 seq_printf(m, "driver : %s\n", alg->cra_driver_name);
56 seq_printf(m, "module : %s\n", module_name(alg->cra_module)); 55 seq_printf(m, "module : %s\n", module_name(alg->cra_module));
56 seq_printf(m, "priority : %d\n", alg->cra_priority);
57 57
58 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { 58 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
59 case CRYPTO_ALG_TYPE_CIPHER: 59 case CRYPTO_ALG_TYPE_CIPHER: