All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] integrity: shmem zero fix
@ 2009-02-11  4:01 Mimi Zohar
  2009-02-11  4:05 ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: Mimi Zohar @ 2009-02-11  4:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, Mike Frysinger, Randy Dunlap, Andrew Morton,
	James Morris, David Safford, Serge Hallyn, Mimi Zohar

Based on comments from Mike Frysinger and Randy Dunlap:
(http://lkml.org/lkml/2009/2/9/262)
- moved ima.h include before CONFIG_SHMEM test to fix compiler error 
  on Blackfin: 
mm/shmem.c: In function 'shmem_zero_setup':
mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check'

- added 'struct linux_binprm' in ima.h to fix compiler warning on Blackfin:
In file included from mm/shmem.c:32:
include/linux/ima.h:25: warning: 'struct linux_binprm' declared inside
parameter list
include/linux/ima.h:25: warning: its scope is only this definition or
declaration, which is probably not what you want

- moved fs.h include within _LINUX_IMA_H definition

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 6db30a3..0e2aa45 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -7,11 +7,12 @@
  * the Free Software Foundation, version 2 of the License.
  */
 
-#include <linux/fs.h>
-
 #ifndef _LINUX_IMA_H
 #define _LINUX_IMA_H
 
+#include <linux/fs.h>
+struct linux_binprm;
+
 #ifdef CONFIG_IMA
 extern int ima_bprm_check(struct linux_binprm *bprm);
 extern int ima_inode_alloc(struct inode *inode);
diff --git a/mm/shmem.c b/mm/shmem.c
index 7519988..8135fac 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -28,6 +28,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/swap.h>
+#include <linux/ima.h>
 
 static struct vfsmount *shm_mnt;
 
@@ -59,7 +60,6 @@ static struct vfsmount *shm_mnt;
 #include <linux/highmem.h>
 #include <linux/seq_file.h>
 #include <linux/magic.h>
-#include <linux/ima.h>
 
 #include <asm/uaccess.h>
 #include <asm/div64.h>
-- 
1.5.6.6


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

* Re: [PATCH] integrity: shmem zero fix
  2009-02-11  4:01 [PATCH] integrity: shmem zero fix Mimi Zohar
@ 2009-02-11  4:05 ` Mike Frysinger
  2009-02-11  4:30   ` James Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2009-02-11  4:05 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, Randy Dunlap, Andrew Morton, James Morris,
	David Safford, Serge Hallyn, Mimi Zohar

On Tue, Feb 10, 2009 at 23:01, Mimi Zohar wrote:
> Based on comments from Mike Frysinger and Randy Dunlap:
> (http://lkml.org/lkml/2009/2/9/262)
> - moved ima.h include before CONFIG_SHMEM test to fix compiler error
>  on Blackfin:
> mm/shmem.c: In function 'shmem_zero_setup':
> mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check'
>
> - added 'struct linux_binprm' in ima.h to fix compiler warning on Blackfin:
> In file included from mm/shmem.c:32:
> include/linux/ima.h:25: warning: 'struct linux_binprm' declared inside
> parameter list
> include/linux/ima.h:25: warning: its scope is only this definition or
> declaration, which is probably not what you want
>
> - moved fs.h include within _LINUX_IMA_H definition
>
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-mike

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

* Re: [PATCH] integrity: shmem zero fix
  2009-02-11  4:05 ` Mike Frysinger
@ 2009-02-11  4:30   ` James Morris
  0 siblings, 0 replies; 8+ messages in thread
From: James Morris @ 2009-02-11  4:30 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Mimi Zohar, linux-kernel, Randy Dunlap, Andrew Morton,
	David Safford, Serge Hallyn, Mimi Zohar

On Tue, 10 Feb 2009, Mike Frysinger wrote:

> On Tue, Feb 10, 2009 at 23:01, Mimi Zohar wrote:
> > Based on comments from Mike Frysinger and Randy Dunlap:
> > (http://lkml.org/lkml/2009/2/9/262)
> > - moved ima.h include before CONFIG_SHMEM test to fix compiler error
> >  on Blackfin:
> > mm/shmem.c: In function 'shmem_zero_setup':
> > mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check'
> >
> > - added 'struct linux_binprm' in ima.h to fix compiler warning on Blackfin:
> > In file included from mm/shmem.c:32:
> > include/linux/ima.h:25: warning: 'struct linux_binprm' declared inside
> > parameter list
> > include/linux/ima.h:25: warning: its scope is only this definition or
> > declaration, which is probably not what you want
> >
> > - moved fs.h include within _LINUX_IMA_H definition
> >
> > Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Applied to 
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

-- 
James Morris
<jmorris@namei.org>

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

* Re: [PATCH] integrity: shmem zero fix
  2009-02-10  0:03 ` Mike Frysinger
  2009-02-10  0:10   ` Randy Dunlap
@ 2009-02-10 22:34   ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2009-02-10 22:34 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: zohar, linux-kernel, jmorris, safford, serue, zohar

On Mon, 9 Feb 2009 19:03:51 -0500
Mike Frysinger <vapier.adi@gmail.com> wrote:

> On Mon, Feb 9, 2009 at 18:02, Mimi Zohar wrote:
> > Based on comments from Mike Frysinger and Randy Dunlap,
> > - moved ima.h include before CONFIG_SHMEM test
> > - added 'struct linux_binprm' in ima.h
> 
> please move the linux/fs.h include in linux/ima.h to match
> linux_binprm location while you're at it

Please write a full changelog too.  That one didn't tell us what
was being fixed.

As it is presumably a compilation fix, please include the compiler
error messages in the changelog, along with a description of what
circumstances cause the error to occur.

Thanks.

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

* [PATCH] integrity: shmem zero fix
@ 2009-02-10  2:04 Mimi Zohar
  0 siblings, 0 replies; 8+ messages in thread
From: Mimi Zohar @ 2009-02-10  2:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, Mike Frysinger, Randy Dunlap, Andrew Morton,
	James Morris, David Safford, Serge Hallyn, Mimi Zohar

Based on comments from Mike Frysinger and Randy Dunlap,
- moved ima.h include before CONFIG_SHMEM test
- added 'struct linux_binprm' in ima.h
- moved fs.h include within _LINUX_IMA_H definition

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 6db30a3..0e2aa45 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -7,11 +7,12 @@
  * the Free Software Foundation, version 2 of the License.
  */
 
-#include <linux/fs.h>
-
 #ifndef _LINUX_IMA_H
 #define _LINUX_IMA_H
 
+#include <linux/fs.h>
+struct linux_binprm;
+
 #ifdef CONFIG_IMA
 extern int ima_bprm_check(struct linux_binprm *bprm);
 extern int ima_inode_alloc(struct inode *inode);
diff --git a/mm/shmem.c b/mm/shmem.c
index 7519988..8135fac 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -28,6 +28,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/swap.h>
+#include <linux/ima.h>
 
 static struct vfsmount *shm_mnt;
 
@@ -59,7 +60,6 @@ static struct vfsmount *shm_mnt;
 #include <linux/highmem.h>
 #include <linux/seq_file.h>
 #include <linux/magic.h>
-#include <linux/ima.h>
 
 #include <asm/uaccess.h>
 #include <asm/div64.h>
-- 
1.5.6.6


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

* Re: [PATCH] integrity: shmem zero fix
  2009-02-10  0:03 ` Mike Frysinger
@ 2009-02-10  0:10   ` Randy Dunlap
  2009-02-10 22:34   ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2009-02-10  0:10 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Mimi Zohar, linux-kernel, Andrew Morton, James Morris,
	David Safford, Serge Hallyn, Mimi Zohar

Mike Frysinger wrote:
> On Mon, Feb 9, 2009 at 18:02, Mimi Zohar wrote:
>> Based on comments from Mike Frysinger and Randy Dunlap,
>> - moved ima.h include before CONFIG_SHMEM test
>> - added 'struct linux_binprm' in ima.h
> 
> please move the linux/fs.h include in linux/ima.h to match
> linux_binprm location while you're at it

Yes, that's the only difference with what I tested:

-#include <linux/fs.h>
-
 #ifndef _LINUX_IMA_H
 #define _LINUX_IMA_H
 
+#include <linux/fs.h>
+struct linux_binprm;
+




-- 
~Randy

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

* Re: [PATCH] integrity: shmem zero fix
  2009-02-09 23:02 Mimi Zohar
@ 2009-02-10  0:03 ` Mike Frysinger
  2009-02-10  0:10   ` Randy Dunlap
  2009-02-10 22:34   ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Frysinger @ 2009-02-10  0:03 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, Andrew Morton, James Morris, David Safford,
	Serge Hallyn, Mimi Zohar

On Mon, Feb 9, 2009 at 18:02, Mimi Zohar wrote:
> Based on comments from Mike Frysinger and Randy Dunlap,
> - moved ima.h include before CONFIG_SHMEM test
> - added 'struct linux_binprm' in ima.h

please move the linux/fs.h include in linux/ima.h to match
linux_binprm location while you're at it
-mike

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

* [PATCH] integrity: shmem zero fix
@ 2009-02-09 23:02 Mimi Zohar
  2009-02-10  0:03 ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: Mimi Zohar @ 2009-02-09 23:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, Andrew Morton, James Morris, David Safford,
	Serge Hallyn, Mimi Zohar

Based on comments from Mike Frysinger and Randy Dunlap,
- moved ima.h include before CONFIG_SHMEM test
- added 'struct linux_binprm' in ima.h

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 6db30a3..7018ee8 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -12,6 +12,8 @@
 #ifndef _LINUX_IMA_H
 #define _LINUX_IMA_H
 
+struct linux_binprm;
+
 #ifdef CONFIG_IMA
 extern int ima_bprm_check(struct linux_binprm *bprm);
 extern int ima_inode_alloc(struct inode *inode);
diff --git a/mm/shmem.c b/mm/shmem.c
index 7519988..8135fac 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -28,6 +28,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/swap.h>
+#include <linux/ima.h>
 
 static struct vfsmount *shm_mnt;
 
@@ -59,7 +60,6 @@ static struct vfsmount *shm_mnt;
 #include <linux/highmem.h>
 #include <linux/seq_file.h>
 #include <linux/magic.h>
-#include <linux/ima.h>
 
 #include <asm/uaccess.h>
 #include <asm/div64.h>
-- 
1.5.6.6


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

end of thread, other threads:[~2009-02-11  4:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11  4:01 [PATCH] integrity: shmem zero fix Mimi Zohar
2009-02-11  4:05 ` Mike Frysinger
2009-02-11  4:30   ` James Morris
  -- strict thread matches above, loose matches on Subject: below --
2009-02-10  2:04 Mimi Zohar
2009-02-09 23:02 Mimi Zohar
2009-02-10  0:03 ` Mike Frysinger
2009-02-10  0:10   ` Randy Dunlap
2009-02-10 22:34   ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.