[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EE9F46A.9090603@canonical.com>
Date: Thu, 15 Dec 2011 05:21:46 -0800
From: John Johansen <john.johansen@...onical.com>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
Pawel Moll <pawel.moll@....com>,
James Morris <jmorris@...ei.org>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 8/15] apparmor: fix module parameter handling
On 12/14/2011 07:11 PM, Rusty Russell wrote:
> The 'aabool' wrappers actually pass off to the 'bool' parse functions,
> so you should use the same check function. Similarly for aauint and
> uint.
>
yep, thanks Rusty
> (Note that 'bool' module parameters also allow 'int', which is why you
> got away with this, but that's changing very soon.)
>
> Cc: John Johansen <john.johansen@...onical.com>
> Cc: James Morris <jmorris@...ei.org>
> Cc: linux-security-module@...r.kernel.org
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
Acked-by: John Johansen <john.johansen@...onical.com>
> ---
> security/apparmor/lsm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -671,7 +671,7 @@ static struct security_operations apparm
>
> static int param_set_aabool(const char *val, const struct kernel_param *kp);
> static int param_get_aabool(char *buffer, const struct kernel_param *kp);
> -#define param_check_aabool(name, p) __param_check(name, p, int)
> +#define param_check_aabool param_check_bool
> static struct kernel_param_ops param_ops_aabool = {
> .set = param_set_aabool,
> .get = param_get_aabool
> @@ -679,7 +679,7 @@ static struct kernel_param_ops param_ops
>
> static int param_set_aauint(const char *val, const struct kernel_param *kp);
> static int param_get_aauint(char *buffer, const struct kernel_param *kp);
> -#define param_check_aauint(name, p) __param_check(name, p, int)
> +#define param_check_aauint param_check_uint
> static struct kernel_param_ops param_ops_aauint = {
> .set = param_set_aauint,
> .get = param_get_aauint
> @@ -687,7 +687,7 @@ static struct kernel_param_ops param_ops
>
> static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
> static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
> -#define param_check_aalockpolicy(name, p) __param_check(name, p, int)
> +#define param_check_aalockpolicy param_check_bool
> static struct kernel_param_ops param_ops_aalockpolicy = {
> .set = param_set_aalockpolicy,
> .get = param_get_aalockpolicy
--
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