Re: [PATCH v2 02/15] crypto: Add userspace configuration API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 22, 2011 at 02:59:01PM +0800, Herbert Xu wrote:
> On Wed, Aug 17, 2011 at 02:10:13PM +0200, Steffen Klassert wrote:
> >
> > +struct crypto_user_alg {
> > +	char cru_name[CRYPTO_MAX_ALG_NAME];
> > +	char cru_driver_name[CRYPTO_MAX_ALG_NAME];
> > +	__u32 type;
> > +	__u32 mask;
> > +};
> > +
> > +#define CRYPTO_MAX_NAME CRYPTO_MAX_ALG_NAME
> > +
> > +struct crypto_report_base {
> > +	char name[CRYPTO_MAX_ALG_NAME];
> > +	char driver_name[CRYPTO_MAX_ALG_NAME];
> > +	char module_name[CRYPTO_MAX_NAME];
> > +	char selftest[CRYPTO_MAX_NAME];
> > +	int priority;
> > +	int refcnt;
> > +};
> 
> We should use one structure for both creating algorithms and
> querying them.  User-space can leave the query fields blank
> when creating them.

Do you think about merging the two structures above and to
keep the algorithm specific structures separate, or to
merge all of them to one big structure?

I think we would be most flexible if we would merge the two
structures above and keep the algorithm specific structures
separate.

> 
> On another note, all fields specified when creating an algorithm
> should be returned when querying/reporting.  This is so that
> we can recreate the exact configuration after dumping.

Yes, indeed.

> 
> Also, instead of returning selftest as a string, a single bit
> would suffice.  So I'd suggest turning it into flags of type
> __u32.

Ok.

> 
> In fact, let's turn the other two int fields into __u32 too.
> 

Ok.

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux