Skip to contentSkip to conversation

integrity: shmem zero fix

PATCH In review Mimi Zohar 4 participants 4 messages Feb 9, 2009 – Feb 10, 2009

Subsystems (2)
lore
Share & tools
lore

Mimi Zohar

author
#0 lore raw

PATCH 1/1 integrity: shmem zero fix

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

---

include/linux/ima.h +2 -0
index 6db30a3..7018ee8 100644
@@ -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);
mm/shmem.c +1 -1
index 7519988..8135fac 100644
@@ -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>
Signature · 1 line
1.5.6.6
#1 lore raw
Quoted 3 lines · 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

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

#2 lore raw
Quoted 7 lines · Mike Frysinger
Quoted 3 lines · 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

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;
+

Signature · 1 line
~Randy
maintainer
#3 lore raw
In reply to Mike Frysinger
Quoted 7 lines · On Mon, 9 Feb 2009 19:03:51 -0500 Mike Frysinger <[email protected]> wrote:
Quoted 3 lines · 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

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.