Re: [cryptoapi/sysfs] display cipher details in sysfs

From: Andreas Happe
Date: Wed Sep 29 2004 - 04:37:23 EST


just took a glance at preferences for algorithms yesterday. came up with
the attached code (does compile, don't think that it will boot, just
attached to illustrade my thinkings).

I inserted a cra_family list into cra_alg which stores all algorithms
which share the same name but different module names. When selecting an
algorithm the preference is looked after (it should be made a writeable
sysfs attribute - would make runtime user selection of prefered
algorithm very intuitive).

Main problems are removal of algorithms (havn't covered that yet) and
the display of different algorithms with same names in sysfs as cra_name
is the name of the directory (not module_name(alg->cra_module)).

Creating a hierarchie cra_alg <>- cra_implementation would be the most
clean solution. Just add a kset with the different cra_implementations
(which would contain a kobject, preference, module pointer) to any
given algorithm (which would contain all blocksize, blah data).

--Andreas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/