ima changes to shmem breaks !CONFIG_SHMEM
Subsystems (2)
commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building for Blackfin systems:
CC mm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1
that's because the ima.h include was added behind the CONFIG_SHMEM markings rather than everywhere, just like the function is used. -mike
Quoted 9 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.
Does this seem like the correct fix?
---
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>
Quoted 8 lines · James Morris
Quoted 7 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1
Quoted 4 lines
Quoted 2 lines
that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.Does this seem like the correct fix?
it converts the build error to a build warning:
CC mm/shmem.o
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
-mike
Quoted 13 lines · Mike Frysinger
Quoted 11 lines · James Morris
Quoted 9 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.Does this seem like the correct fix?
Quoted 7 lines
it converts the build error to a build warning:
CCmm/shmem.o
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
Add to the other patch:
include/linux/ima.h +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/fs.h> +struct linux_binprm ;#ifndef _LINUX_IMA_H#define _LINUX_IMA_H
and it builds for me.
Signature · 1 line
~Randy
Quoted 37 lines · Randy Dunlap
Quoted 13 lines · Mike Frysinger
Quoted 11 lines · James Morris
Quoted 9 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.Does this seem like the correct fix?
Quoted 7 lines
it converts the build error to a build warning:
CCmm/shmem.o
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 wantAdd to the other patch:
include/linux/ima.h +1
-0@@ -8,6 +8,7 @@*/ #include <linux/fs.h> +struct linux_binprm ;#ifndef _LINUX_IMA_H#define _LINUX_IMA_H
Quoted 1 line
and it builds for me.
yes, it builds w/out warnings now for me too. any reason those are outside of _LINUX_IMA_H ? looks like they should both be inside of that.
-mike
Quoted 36 lines · Mike Frysinger
Quoted 35 lines · Randy Dunlap
Quoted 11 lines · Mike Frysinger
Quoted 10 lines · James Morris
Quoted 9 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.Quoted 8 lines
Quoted 1 line
Does this seem like the correct fix?
it converts the build error to a build warning:
CCmm/shmem.o
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 wantAdd to the other patch:
include/linux/ima.h +1
-0@@ -8,6 +8,7 @@*/ #include <linux/fs.h> +struct linux_binprm ;#ifndef _LINUX_IMA_H#define _LINUX_IMA_H
Quoted 5 lines
Quoted 1 line
and it builds for me.
yes, it builds w/out warnings now for me too. any reason those are outside of
_LINUX_IMA_H? looks like they should both be inside of that.
Agreed, that change is also good.
Thanks.
Signature · 1 line
~Randy
Quoted 43 lines · Randy Dunlap
Quoted 36 lines · Mike Frysinger
Quoted 35 lines · Randy Dunlap
Quoted 11 lines · Mike Frysinger
Quoted 10 lines · James Morris
Quoted 9 lines · Mike Frysinger
commit
1df9f0a73178718969ae47d813b8e7aab2cf073cbroke default building for Blackfin systems:
CCmm/shmem.omm/shmem.c: In function 'shmem_zero_setup':mm/shmem.c:2670: error: implicit declaration of function 'ima_shm_check' make[1]: *** [mm/shmem.o] Error 1that's because the
ima.hinclude was added behind theCONFIG_SHMEMmarkings rather than everywhere, just like the function is used.Quoted 8 lines
Quoted 1 line
Does this seem like the correct fix?
it converts the build error to a build warning:
CCmm/shmem.o
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 wantAdd to the other patch:
include/linux/ima.h +1
-0@@ -8,6 +8,7 @@*/ #include <linux/fs.h> +struct linux_binprm ;#ifndef _LINUX_IMA_H#define _LINUX_IMA_HQuoted 5 lines
Quoted 1 line
and it builds for me.
yes, it builds w/out warnings now for me too. any reason those are outside of
_LINUX_IMA_H? looks like they should both be inside of that.
Quoted 4 lines
Agreed, that change is also good.
Thanks.
I posted the patch, forgetting to copy both Mike and you. Could you please verify the patch resolves the problem.
Thanks!
Mimi