public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
@ 2012-11-06  8:17 Jarkko Sakkinen
  2012-11-06 21:59 ` Casey Schaufler
  0 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2012-11-06  8:17 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: James Morris, linux-kernel, linux-security-module,
	Jarkko Sakkinen

SMACK_MAGIC moved to a proper place for easy user space access
(i.e. libsmack).

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
---
 include/uapi/linux/magic.h |    1 +
 security/smack/smack.h     |    5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index e15192c..12735ad 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -11,6 +11,7 @@
 #define DEBUGFS_MAGIC          0x64626720
 #define SECURITYFS_MAGIC	0x73636673
 #define SELINUX_MAGIC		0xf97cff8c
+#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
 #define RAMFS_MAGIC		0x858458f6	/* some random number */
 #define TMPFS_MAGIC		0x01021994
 #define HUGETLBFS_MAGIC 	0x958458f6	/* some random number */
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 99b3612..8ad3095 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -149,11 +149,6 @@ struct smack_known {
 #define SMACK_CIPSO_SOCKET	1
 
 /*
- * smackfs magic number
- */
-#define SMACK_MAGIC	0x43415d53 /* "SMAC" */
-
-/*
  * CIPSO defaults.
  */
 #define SMACK_CIPSO_DOI_DEFAULT		3	/* Historical */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-06  8:17 Jarkko Sakkinen
@ 2012-11-06 21:59 ` Casey Schaufler
  2012-11-06 22:23   ` Eric Paris
  2012-11-08 10:43   ` Jarkko Sakkinen
  0 siblings, 2 replies; 11+ messages in thread
From: Casey Schaufler @ 2012-11-06 21:59 UTC (permalink / raw)
  To: Jarkko Sakkinen; +Cc: James Morris, linux-kernel, linux-security-module

On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
> SMACK_MAGIC moved to a proper place for easy user space access
> (i.e. libsmack).
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
> ---
>  include/uapi/linux/magic.h |    1 +
>  security/smack/smack.h     |    5 -----
>  2 files changed, 1 insertion(+), 5 deletions(-)

Will security/smack/smack_lsm.c and security/smack/smackfs.c
compile after this change?

>
> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> index e15192c..12735ad 100644
> --- a/include/uapi/linux/magic.h
> +++ b/include/uapi/linux/magic.h
> @@ -11,6 +11,7 @@
>  #define DEBUGFS_MAGIC          0x64626720
>  #define SECURITYFS_MAGIC	0x73636673
>  #define SELINUX_MAGIC		0xf97cff8c
> +#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
>  #define RAMFS_MAGIC		0x858458f6	/* some random number */
>  #define TMPFS_MAGIC		0x01021994
>  #define HUGETLBFS_MAGIC 	0x958458f6	/* some random number */
> diff --git a/security/smack/smack.h b/security/smack/smack.h
> index 99b3612..8ad3095 100644
> --- a/security/smack/smack.h
> +++ b/security/smack/smack.h
> @@ -149,11 +149,6 @@ struct smack_known {
>  #define SMACK_CIPSO_SOCKET	1
>  
>  /*
> - * smackfs magic number
> - */
> -#define SMACK_MAGIC	0x43415d53 /* "SMAC" */
> -
> -/*
>   * CIPSO defaults.
>   */
>  #define SMACK_CIPSO_DOI_DEFAULT		3	/* Historical */


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-06 21:59 ` Casey Schaufler
@ 2012-11-06 22:23   ` Eric Paris
  2012-11-08 10:43   ` Jarkko Sakkinen
  1 sibling, 0 replies; 11+ messages in thread
From: Eric Paris @ 2012-11-06 22:23 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: Jarkko Sakkinen, James Morris, Linux Kernel Mailing List,
	LSM List

It looks like smack_lsm.c includes linux/magic.h, but smackfs.c
doesn't...   Seems like they should have included linux/magic.h in the
same header they removed the definition from....

On Tue, Nov 6, 2012 at 4:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
>> SMACK_MAGIC moved to a proper place for easy user space access
>> (i.e. libsmack).
>>
>> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
>> ---
>>  include/uapi/linux/magic.h |    1 +
>>  security/smack/smack.h     |    5 -----
>>  2 files changed, 1 insertion(+), 5 deletions(-)
>
> Will security/smack/smack_lsm.c and security/smack/smackfs.c
> compile after this change?
>
>>
>> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
>> index e15192c..12735ad 100644
>> --- a/include/uapi/linux/magic.h
>> +++ b/include/uapi/linux/magic.h
>> @@ -11,6 +11,7 @@
>>  #define DEBUGFS_MAGIC          0x64626720
>>  #define SECURITYFS_MAGIC     0x73636673
>>  #define SELINUX_MAGIC                0xf97cff8c
>> +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
>>  #define RAMFS_MAGIC          0x858458f6      /* some random number */
>>  #define TMPFS_MAGIC          0x01021994
>>  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
>> diff --git a/security/smack/smack.h b/security/smack/smack.h
>> index 99b3612..8ad3095 100644
>> --- a/security/smack/smack.h
>> +++ b/security/smack/smack.h
>> @@ -149,11 +149,6 @@ struct smack_known {
>>  #define SMACK_CIPSO_SOCKET   1
>>
>>  /*
>> - * smackfs magic number
>> - */
>> -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
>> -
>> -/*
>>   * CIPSO defaults.
>>   */
>>  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-06 21:59 ` Casey Schaufler
  2012-11-06 22:23   ` Eric Paris
@ 2012-11-08 10:43   ` Jarkko Sakkinen
  2012-11-08 15:04     ` Eric Paris
  1 sibling, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2012-11-08 10:43 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: James Morris, linux-kernel, linux-security-module

On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
> > SMACK_MAGIC moved to a proper place for easy user space access
> > (i.e. libsmack).
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
> > ---
> >  include/uapi/linux/magic.h |    1 +
> >  security/smack/smack.h     |    5 -----
> >  2 files changed, 1 insertion(+), 5 deletions(-)
>
> Will security/smack/smack_lsm.c and security/smack/smackfs.c
> compile after this change?

Sorry I haven't replied earlier. Anyway, I made a sanity check.

I retried build from clean. Works. I also checked that vmlinux contains
SMACK symbols. It does.

>
> >
> > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> > index e15192c..12735ad 100644
> > --- a/include/uapi/linux/magic.h
> > +++ b/include/uapi/linux/magic.h
> > @@ -11,6 +11,7 @@
> >  #define DEBUGFS_MAGIC          0x64626720
> >  #define SECURITYFS_MAGIC     0x73636673
> >  #define SELINUX_MAGIC                0xf97cff8c
> > +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
> >  #define RAMFS_MAGIC          0x858458f6      /* some random number */
> >  #define TMPFS_MAGIC          0x01021994
> >  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
> > diff --git a/security/smack/smack.h b/security/smack/smack.h
> > index 99b3612..8ad3095 100644
> > --- a/security/smack/smack.h
> > +++ b/security/smack/smack.h
> > @@ -149,11 +149,6 @@ struct smack_known {
> >  #define SMACK_CIPSO_SOCKET   1
> >
> >  /*
> > - * smackfs magic number
> > - */
> > -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
> > -
> > -/*
> >   * CIPSO defaults.
> >   */
> >  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 10:43   ` Jarkko Sakkinen
@ 2012-11-08 15:04     ` Eric Paris
  2012-11-08 17:40       ` Casey Schaufler
  2012-11-08 17:42       ` Jarkko Sakkinen
  0 siblings, 2 replies; 11+ messages in thread
From: Eric Paris @ 2012-11-08 15:04 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Casey Schaufler, James Morris, Linux Kernel Mailing List,
	LSM List

Then it only works by accident that magic.h is included by some random
path in smackfs.c.  You really should be including it in smack.h (or
each .c file individually, up to casey)

On Thu, Nov 8, 2012 at 5:43 AM, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
> On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>
>> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
>> > SMACK_MAGIC moved to a proper place for easy user space access
>> > (i.e. libsmack).
>> >
>> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
>> > ---
>> >  include/uapi/linux/magic.h |    1 +
>> >  security/smack/smack.h     |    5 -----
>> >  2 files changed, 1 insertion(+), 5 deletions(-)
>>
>> Will security/smack/smack_lsm.c and security/smack/smackfs.c
>> compile after this change?
>
> Sorry I haven't replied earlier. Anyway, I made a sanity check.
>
> I retried build from clean. Works. I also checked that vmlinux contains
> SMACK symbols. It does.
>
>>
>> >
>> > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
>> > index e15192c..12735ad 100644
>> > --- a/include/uapi/linux/magic.h
>> > +++ b/include/uapi/linux/magic.h
>> > @@ -11,6 +11,7 @@
>> >  #define DEBUGFS_MAGIC          0x64626720
>> >  #define SECURITYFS_MAGIC     0x73636673
>> >  #define SELINUX_MAGIC                0xf97cff8c
>> > +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
>> >  #define RAMFS_MAGIC          0x858458f6      /* some random number */
>> >  #define TMPFS_MAGIC          0x01021994
>> >  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
>> > diff --git a/security/smack/smack.h b/security/smack/smack.h
>> > index 99b3612..8ad3095 100644
>> > --- a/security/smack/smack.h
>> > +++ b/security/smack/smack.h
>> > @@ -149,11 +149,6 @@ struct smack_known {
>> >  #define SMACK_CIPSO_SOCKET   1
>> >
>> >  /*
>> > - * smackfs magic number
>> > - */
>> > -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
>> > -
>> > -/*
>> >   * CIPSO defaults.
>> >   */
>> >  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>>
>
> /Jarkko
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 15:04     ` Eric Paris
@ 2012-11-08 17:40       ` Casey Schaufler
  2012-11-08 17:44         ` Jarkko Sakkinen
  2012-11-08 17:42       ` Jarkko Sakkinen
  1 sibling, 1 reply; 11+ messages in thread
From: Casey Schaufler @ 2012-11-08 17:40 UTC (permalink / raw)
  To: Eric Paris
  Cc: Jarkko Sakkinen, James Morris, Linux Kernel Mailing List,
	LSM List, Casey Schaufler

On 11/8/2012 7:04 AM, Eric Paris wrote:
> Then it only works by accident that magic.h is included by some random
> path in smackfs.c.  You really should be including it in smack.h (or
> each .c file individually, up to casey)

I should think it should go in smack.h

> On Thu, Nov 8, 2012 at 5:43 AM, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
>> On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
>>>> SMACK_MAGIC moved to a proper place for easy user space access
>>>> (i.e. libsmack).
>>>>
>>>> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
>>>> ---
>>>>  include/uapi/linux/magic.h |    1 +
>>>>  security/smack/smack.h     |    5 -----
>>>>  2 files changed, 1 insertion(+), 5 deletions(-)
>>> Will security/smack/smack_lsm.c and security/smack/smackfs.c
>>> compile after this change?
>> Sorry I haven't replied earlier. Anyway, I made a sanity check.
>>
>> I retried build from clean. Works. I also checked that vmlinux contains
>> SMACK symbols. It does.
>>
>>>> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
>>>> index e15192c..12735ad 100644
>>>> --- a/include/uapi/linux/magic.h
>>>> +++ b/include/uapi/linux/magic.h
>>>> @@ -11,6 +11,7 @@
>>>>  #define DEBUGFS_MAGIC          0x64626720
>>>>  #define SECURITYFS_MAGIC     0x73636673
>>>>  #define SELINUX_MAGIC                0xf97cff8c
>>>> +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
>>>>  #define RAMFS_MAGIC          0x858458f6      /* some random number */
>>>>  #define TMPFS_MAGIC          0x01021994
>>>>  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
>>>> diff --git a/security/smack/smack.h b/security/smack/smack.h
>>>> index 99b3612..8ad3095 100644
>>>> --- a/security/smack/smack.h
>>>> +++ b/security/smack/smack.h
>>>> @@ -149,11 +149,6 @@ struct smack_known {
>>>>  #define SMACK_CIPSO_SOCKET   1
>>>>
>>>>  /*
>>>> - * smackfs magic number
>>>> - */
>>>> -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
>>>> -
>>>> -/*
>>>>   * CIPSO defaults.
>>>>   */
>>>>  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>> /Jarkko
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 15:04     ` Eric Paris
  2012-11-08 17:40       ` Casey Schaufler
@ 2012-11-08 17:42       ` Jarkko Sakkinen
  1 sibling, 0 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2012-11-08 17:42 UTC (permalink / raw)
  To: Eric Paris
  Cc: Casey Schaufler, James Morris, Linux Kernel Mailing List,
	LSM List

On Thu, Nov 8, 2012 at 5:04 PM, Eric Paris <eparis@parisplace.org> wrote:
> Then it only works by accident that magic.h is included by some random
> path in smackfs.c.  You really should be including it in smack.h (or
> each .c file individually, up to casey)

Fully agree. Just answered to the query :)

>
> On Thu, Nov 8, 2012 at 5:43 AM, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
>> On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>>
>>> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
>>> > SMACK_MAGIC moved to a proper place for easy user space access
>>> > (i.e. libsmack).
>>> >
>>> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
>>> > ---
>>> >  include/uapi/linux/magic.h |    1 +
>>> >  security/smack/smack.h     |    5 -----
>>> >  2 files changed, 1 insertion(+), 5 deletions(-)
>>>
>>> Will security/smack/smack_lsm.c and security/smack/smackfs.c
>>> compile after this change?
>>
>> Sorry I haven't replied earlier. Anyway, I made a sanity check.
>>
>> I retried build from clean. Works. I also checked that vmlinux contains
>> SMACK symbols. It does.
>>
>>>
>>> >
>>> > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
>>> > index e15192c..12735ad 100644
>>> > --- a/include/uapi/linux/magic.h
>>> > +++ b/include/uapi/linux/magic.h
>>> > @@ -11,6 +11,7 @@
>>> >  #define DEBUGFS_MAGIC          0x64626720
>>> >  #define SECURITYFS_MAGIC     0x73636673
>>> >  #define SELINUX_MAGIC                0xf97cff8c
>>> > +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
>>> >  #define RAMFS_MAGIC          0x858458f6      /* some random number */
>>> >  #define TMPFS_MAGIC          0x01021994
>>> >  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
>>> > diff --git a/security/smack/smack.h b/security/smack/smack.h
>>> > index 99b3612..8ad3095 100644
>>> > --- a/security/smack/smack.h
>>> > +++ b/security/smack/smack.h
>>> > @@ -149,11 +149,6 @@ struct smack_known {
>>> >  #define SMACK_CIPSO_SOCKET   1
>>> >
>>> >  /*
>>> > - * smackfs magic number
>>> > - */
>>> > -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
>>> > -
>>> > -/*
>>> >   * CIPSO defaults.
>>> >   */
>>> >  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>>>
>>
>> /Jarkko
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 17:40       ` Casey Schaufler
@ 2012-11-08 17:44         ` Jarkko Sakkinen
  0 siblings, 0 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2012-11-08 17:44 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: Eric Paris, James Morris, Linux Kernel Mailing List, LSM List

On Thu, Nov 8, 2012 at 7:40 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
> On 11/8/2012 7:04 AM, Eric Paris wrote:
>> Then it only works by accident that magic.h is included by some random
>> path in smackfs.c.  You really should be including it in smack.h (or
>> each .c file individually, up to casey)
>
> I should think it should go in smack.h

Yeah, that's probably best place for it. I'll add the include there.

>
>> On Thu, Nov 8, 2012 at 5:43 AM, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
>>> On Tue, Nov 6, 2012 at 11:59 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>>> On 11/6/2012 12:17 AM, Jarkko Sakkinen wrote:
>>>>> SMACK_MAGIC moved to a proper place for easy user space access
>>>>> (i.e. libsmack).
>>>>>
>>>>> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
>>>>> ---
>>>>>  include/uapi/linux/magic.h |    1 +
>>>>>  security/smack/smack.h     |    5 -----
>>>>>  2 files changed, 1 insertion(+), 5 deletions(-)
>>>> Will security/smack/smack_lsm.c and security/smack/smackfs.c
>>>> compile after this change?
>>> Sorry I haven't replied earlier. Anyway, I made a sanity check.
>>>
>>> I retried build from clean. Works. I also checked that vmlinux contains
>>> SMACK symbols. It does.
>>>
>>>>> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
>>>>> index e15192c..12735ad 100644
>>>>> --- a/include/uapi/linux/magic.h
>>>>> +++ b/include/uapi/linux/magic.h
>>>>> @@ -11,6 +11,7 @@
>>>>>  #define DEBUGFS_MAGIC          0x64626720
>>>>>  #define SECURITYFS_MAGIC     0x73636673
>>>>>  #define SELINUX_MAGIC                0xf97cff8c
>>>>> +#define SMACK_MAGIC          0x43415d53      /* "SMAC" */
>>>>>  #define RAMFS_MAGIC          0x858458f6      /* some random number */
>>>>>  #define TMPFS_MAGIC          0x01021994
>>>>>  #define HUGETLBFS_MAGIC      0x958458f6      /* some random number */
>>>>> diff --git a/security/smack/smack.h b/security/smack/smack.h
>>>>> index 99b3612..8ad3095 100644
>>>>> --- a/security/smack/smack.h
>>>>> +++ b/security/smack/smack.h
>>>>> @@ -149,11 +149,6 @@ struct smack_known {
>>>>>  #define SMACK_CIPSO_SOCKET   1
>>>>>
>>>>>  /*
>>>>> - * smackfs magic number
>>>>> - */
>>>>> -#define SMACK_MAGIC  0x43415d53 /* "SMAC" */
>>>>> -
>>>>> -/*
>>>>>   * CIPSO defaults.
>>>>>   */
>>>>>  #define SMACK_CIPSO_DOI_DEFAULT              3       /* Historical */
>>> /Jarkko
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
@ 2012-11-08 18:08 Jarkko Sakkinen
  2012-11-09  1:46 ` Casey Schaufler
  2013-01-09 19:15 ` Casey Schaufler
  0 siblings, 2 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2012-11-08 18:08 UTC (permalink / raw)
  To: casey; +Cc: james.l.morris, linux-kernel, linux-security-module,
	Jarkko Sakkinen

SMACK_MAGIC moved to a proper place for easy user space access
(i.e. libsmack).

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
---
 include/uapi/linux/magic.h |    1 +
 security/smack/smack.h     |    6 +-----
 security/smack/smack_lsm.c |    1 -
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index e15192c..12735ad 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -11,6 +11,7 @@
 #define DEBUGFS_MAGIC          0x64626720
 #define SECURITYFS_MAGIC	0x73636673
 #define SELINUX_MAGIC		0xf97cff8c
+#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
 #define RAMFS_MAGIC		0x858458f6	/* some random number */
 #define TMPFS_MAGIC		0x01021994
 #define HUGETLBFS_MAGIC 	0x958458f6	/* some random number */
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 99b3612..e3e7a4f 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -21,6 +21,7 @@
 #include <linux/list.h>
 #include <linux/rculist.h>
 #include <linux/lsm_audit.h>
+#include <linux/magic.h>
 
 /*
  * Smack labels were limited to 23 characters for a long time.
@@ -149,11 +150,6 @@ struct smack_known {
 #define SMACK_CIPSO_SOCKET	1
 
 /*
- * smackfs magic number
- */
-#define SMACK_MAGIC	0x43415d53 /* "SMAC" */
-
-/*
  * CIPSO defaults.
  */
 #define SMACK_CIPSO_DOI_DEFAULT		3	/* Historical */
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 38be92c..6e8fa99 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -32,7 +32,6 @@
 #include <linux/pipe_fs_i.h>
 #include <net/cipso_ipv4.h>
 #include <linux/audit.h>
-#include <linux/magic.h>
 #include <linux/dcache.h>
 #include <linux/personality.h>
 #include <linux/msg.h>
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 18:08 [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h Jarkko Sakkinen
@ 2012-11-09  1:46 ` Casey Schaufler
  2013-01-09 19:15 ` Casey Schaufler
  1 sibling, 0 replies; 11+ messages in thread
From: Casey Schaufler @ 2012-11-09  1:46 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: james.l.morris, linux-kernel, linux-security-module,
	Casey Schaufler

On 11/8/2012 10:08 AM, Jarkko Sakkinen wrote:
> SMACK_MAGIC moved to a proper place for easy user space access
> (i.e. libsmack).
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>

I will apply once James updates the next branch of his security tree.

> ---
>  include/uapi/linux/magic.h |    1 +
>  security/smack/smack.h     |    6 +-----
>  security/smack/smack_lsm.c |    1 -
>  3 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> index e15192c..12735ad 100644
> --- a/include/uapi/linux/magic.h
> +++ b/include/uapi/linux/magic.h
> @@ -11,6 +11,7 @@
>  #define DEBUGFS_MAGIC          0x64626720
>  #define SECURITYFS_MAGIC	0x73636673
>  #define SELINUX_MAGIC		0xf97cff8c
> +#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
>  #define RAMFS_MAGIC		0x858458f6	/* some random number */
>  #define TMPFS_MAGIC		0x01021994
>  #define HUGETLBFS_MAGIC 	0x958458f6	/* some random number */
> diff --git a/security/smack/smack.h b/security/smack/smack.h
> index 99b3612..e3e7a4f 100644
> --- a/security/smack/smack.h
> +++ b/security/smack/smack.h
> @@ -21,6 +21,7 @@
>  #include <linux/list.h>
>  #include <linux/rculist.h>
>  #include <linux/lsm_audit.h>
> +#include <linux/magic.h>
>  
>  /*
>   * Smack labels were limited to 23 characters for a long time.
> @@ -149,11 +150,6 @@ struct smack_known {
>  #define SMACK_CIPSO_SOCKET	1
>  
>  /*
> - * smackfs magic number
> - */
> -#define SMACK_MAGIC	0x43415d53 /* "SMAC" */
> -
> -/*
>   * CIPSO defaults.
>   */
>  #define SMACK_CIPSO_DOI_DEFAULT		3	/* Historical */
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 38be92c..6e8fa99 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -32,7 +32,6 @@
>  #include <linux/pipe_fs_i.h>
>  #include <net/cipso_ipv4.h>
>  #include <linux/audit.h>
> -#include <linux/magic.h>
>  #include <linux/dcache.h>
>  #include <linux/personality.h>
>  #include <linux/msg.h>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h
  2012-11-08 18:08 [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h Jarkko Sakkinen
  2012-11-09  1:46 ` Casey Schaufler
@ 2013-01-09 19:15 ` Casey Schaufler
  1 sibling, 0 replies; 11+ messages in thread
From: Casey Schaufler @ 2013-01-09 19:15 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: james.l.morris, linux-kernel, linux-security-module,
	Casey Schaufler

On 11/8/2012 10:08 AM, Jarkko Sakkinen wrote:
> SMACK_MAGIC moved to a proper place for easy user space access
> (i.e. libsmack).
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>

Applied to git://git.gitorious.org/smack-next/kernel.git#stage-for-3.9

> ---
>  include/uapi/linux/magic.h |    1 +
>  security/smack/smack.h     |    6 +-----
>  security/smack/smack_lsm.c |    1 -
>  3 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> index e15192c..12735ad 100644
> --- a/include/uapi/linux/magic.h
> +++ b/include/uapi/linux/magic.h
> @@ -11,6 +11,7 @@
>  #define DEBUGFS_MAGIC          0x64626720
>  #define SECURITYFS_MAGIC	0x73636673
>  #define SELINUX_MAGIC		0xf97cff8c
> +#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
>  #define RAMFS_MAGIC		0x858458f6	/* some random number */
>  #define TMPFS_MAGIC		0x01021994
>  #define HUGETLBFS_MAGIC 	0x958458f6	/* some random number */
> diff --git a/security/smack/smack.h b/security/smack/smack.h
> index 99b3612..e3e7a4f 100644
> --- a/security/smack/smack.h
> +++ b/security/smack/smack.h
> @@ -21,6 +21,7 @@
>  #include <linux/list.h>
>  #include <linux/rculist.h>
>  #include <linux/lsm_audit.h>
> +#include <linux/magic.h>
>  
>  /*
>   * Smack labels were limited to 23 characters for a long time.
> @@ -149,11 +150,6 @@ struct smack_known {
>  #define SMACK_CIPSO_SOCKET	1
>  
>  /*
> - * smackfs magic number
> - */
> -#define SMACK_MAGIC	0x43415d53 /* "SMAC" */
> -
> -/*
>   * CIPSO defaults.
>   */
>  #define SMACK_CIPSO_DOI_DEFAULT		3	/* Historical */
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 38be92c..6e8fa99 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -32,7 +32,6 @@
>  #include <linux/pipe_fs_i.h>
>  #include <net/cipso_ipv4.h>
>  #include <linux/audit.h>
> -#include <linux/magic.h>
>  #include <linux/dcache.h>
>  #include <linux/personality.h>
>  #include <linux/msg.h>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-01-09 19:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 18:08 [PATCH] smack: SMACK_MAGIC to include/uapi/linux/magic.h Jarkko Sakkinen
2012-11-09  1:46 ` Casey Schaufler
2013-01-09 19:15 ` Casey Schaufler
  -- strict thread matches above, loose matches on Subject: below --
2012-11-06  8:17 Jarkko Sakkinen
2012-11-06 21:59 ` Casey Schaufler
2012-11-06 22:23   ` Eric Paris
2012-11-08 10:43   ` Jarkko Sakkinen
2012-11-08 15:04     ` Eric Paris
2012-11-08 17:40       ` Casey Schaufler
2012-11-08 17:44         ` Jarkko Sakkinen
2012-11-08 17:42       ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox