Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernelversion 2.6.20.1)

From: Jan Engelhardt
Date: Tue Mar 20 2007 - 12:38:31 EST



On Mar 20 2007 10:15, Matt Mackall wrote:
>On Tue, Mar 20, 2007 at 04:44:01PM +0200, Tasos Parisinos wrote:
>> >>+ /* Pre-allocate some auxilliary mpis */
>> >>+ rsa_echo("Preallocating %lu bytes for auxilliary operands\n",
>> >>+ RSA_AUX_SIZE * RSA_AUX_COUNT * sizeof(_u32));
>> >
>> >And printk.
>>
>> i made such a printk wrapper not to mess with all the printk instances when
>> i needed to
>> does this hurt, to be left as is?
>
>It's not horrible, but it's not pretty either.

printk(KERN_DEBUG ...) I say.

>> >>+#define RSA_AUX_COUNT CONFIG_RSA_AUXCOUNT
>> >>+#define RSA_AUX_SIZE CONFIG_RSA_AUXSIZE
>> >
>> >Just use the config value.
>> >
>> >>+#define RSA_MAX_U32 0xFFFFFFFF
>> >
>> >I'm sure we've got this somewhere.
>>
>> if you could tell me i will fix it
>
>Hmmm, odd. I can't find one. There are plenty of things that roll
>their own though.

#include <linux/kernel.h>
#define UINT32_T_MAX ((uint32_t)UINT_MAX)

s/RSA_MAX_U32/UINT32_T_MAX/g perhaps?

>And we often skip such prototypes entirely if the .c file can be
>ordered such that no forward declarations are necessary.

Even if <shrug> deallocation functions come before initialisation?


Jan
--
-
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/