Re: [PATCH 06/19] Add ioctl() argument and attribute handling utils

2010-08-21 Thread Stefan Richter
Miloslav Trmac wrote: - Stefan Richter stef...@s5r6.in-berlin.de wrote: Miloslav Trmač wrote: --- /dev/null +++ b/crypto/userspace/utils.c [...] +#ifdef CONFIG_COMPAT +/* max() is too clever for compile-time constants */ +#define CONST_MAX(A, B) ((A) (B) ? (A) : (B)) + +#define

[PATCH 06/19] Add ioctl() argument and attribute handling utils

2010-08-20 Thread Miloslav Trmač
Main entry points: NCR_GET_INPUT_ARGS: Read a fixed struct and any attached attributes from userspace NCR_GET_INPUT_ARGS_NO_OUTPUT: Same as above, and inform the users the kernel will attach no additional attributes. NCR_OUT_INIT/ncr_out_free: Allocate and free a

Re: [PATCH 06/19] Add ioctl() argument and attribute handling utils

2010-08-20 Thread Stefan Richter
Miloslav Trmač wrote: --- /dev/null +++ b/crypto/userspace/utils.c [...] +#ifdef CONFIG_COMPAT +/* max() is too clever for compile-time constants */ +#define CONST_MAX(A, B) ((A) (B) ? (A) : (B)) + +#define MAX_SESSION_INPUT_DATA_SIZE \ +

Re: [PATCH 06/19] Add ioctl() argument and attribute handling utils

2010-08-20 Thread Miloslav Trmac
- Stefan Richter stef...@s5r6.in-berlin.de wrote: Miloslav Trmač wrote: --- /dev/null +++ b/crypto/userspace/utils.c [...] +#ifdef CONFIG_COMPAT +/* max() is too clever for compile-time constants */ +#define CONST_MAX(A, B) ((A) (B) ? (A) : (B)) + +#define