[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C6E79B2.1040309@s5r6.in-berlin.de>
Date: Fri, 20 Aug 2010 14:48:50 +0200
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Miloslav Trmač <mitr@...hat.com>
CC: Herbert Xu <herbert@...dor.hengli.com.au>,
linux-crypto@...r.kernel.org,
Nikos Mavrogiannopoulos <n.mavrogiannopoulos@...il.com>,
Neil Horman <nhorman@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/19] User-space API definition
Miloslav Trmač wrote:
> --- /dev/null
> +++ b/include/linux/ncr.h
[...]
> +struct ncr_session_input_data {
> + const void __user *data;
> + __kernel_size_t data_size;
> +};
> +
> +struct ncr_session_output_buffer {
> + void __user *buffer;
> + __kernel_size_t buffer_size;
> + __kernel_size_t __user *result_size_ptr;
> +};
Why not using fixed-size fit-all members?
struct ncr_session_input_data {
__u64 data; /* user pointer, cast to/from u64 */
__u32 data_size; /* or __u64? */
};
struct ncr_session_output_buffer {
__u64 buffer;
__u64 result_size_ptr; /* can't this be a direct output member? */
__u32 buffer_size; /* or __u64? */
};
And then get rid of all the COMAPT code paths.
--
Stefan Richter
-=====-==-=- =--- =-=--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists