From: John Johansen <john.johansen@canonical.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
Pawel Moll <pawel.moll@arm.com>, James Morris <jmorris@namei.org>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH 8/15] apparmor: fix module parameter handling
Date: Thu, 15 Dec 2011 05:21:46 -0800 [thread overview]
Message-ID: <4EE9F46A.9090603@canonical.com> (raw)
In-Reply-To: <87pqfqsf4r.fsf@rustcorp.com.au>
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@canonical.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: linux-security-module@vger.kernel.org
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: John Johansen <john.johansen@canonical.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
next prev parent reply other threads:[~2011-12-15 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 3:11 Rusty Russell
2011-12-15 13:21 ` John Johansen [this message]
2011-12-16 1:47 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE9F46A.9090603@canonical.com \
--to=john.johansen@canonical.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome