integrity: shmem zero fix
Subsystems (2)
PATCH 1/1 integrity: shmem zero fix
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 listinclude/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
---
include/linux/ima.h +3 -2
@@ -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);
mm/shmem.c +1 -1
@@ -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
Quoted 14 lines · Mimi Zohar
Based on comments from Mike Frysinger and Randy Dunlap:
(http://lkml.org/lkml/2009/2/9/262)
- movedima.hinclude beforeCONFIG_SHMEMtest 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' inima.hto fix compiler warning on Blackfin:
In file included frommm/shmem.c:32:include/linux/ima.h:25: warning: 'structlinux_binprm' declared inside parameter listinclude/linux/ima.h:25: warning: its scope is only this definition or declaration, which is probably not what you want
Quoted 3 lines
- moved
fs.hinclude within_LINUX_IMA_HdefinitionSigned-off-by Mimi Zohar <[email protected]>
-mike
Quoted 15 lines · Mike Frysinger
Quoted 14 lines · Mimi Zohar
Based on comments from Mike Frysinger and Randy Dunlap:
(http://lkml.org/lkml/2009/2/9/262)
- movedima.hinclude beforeCONFIG_SHMEMtest 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' inima.hto fix compiler warning on Blackfin:
In file included frommm/shmem.c:32:include/linux/ima.h:25: warning: 'structlinux_binprm' declared inside parameter listinclude/linux/ima.h:25: warning: its scope is only this definition or declaration, which is probably not what you want
Quoted 5 lines
Quoted 3 lines
- moved
fs.hinclude within_LINUX_IMA_HdefinitionSigned-off-by Mimi Zohar <[email protected]>Signed-off-by Mike Frysinger <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Signature · 2 lines
James Morris <[email protected]>