* ima changes to shmem breaks !CONFIG_SHMEM @ 2009-02-09 16:30 Mike Frysinger 2009-02-09 21:23 ` James Morris 0 siblings, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2009-02-09 16:30 UTC (permalink / raw) To: Mimi Zohar; +Cc: LKML, Serge Hallyn, James Morris commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building for Blackfin systems: CC mm/shmem.o mm/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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 16:30 ima changes to shmem breaks !CONFIG_SHMEM Mike Frysinger @ 2009-02-09 21:23 ` James Morris 2009-02-09 21:27 ` Mike Frysinger 0 siblings, 1 reply; 7+ messages in thread From: James Morris @ 2009-02-09 21:23 UTC (permalink / raw) To: Mike Frysinger; +Cc: Mimi Zohar, LKML, Serge Hallyn On Mon, 9 Feb 2009, Mike Frysinger wrote: > commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building > for Blackfin systems: > CC mm/shmem.o > mm/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. Does this seem like the correct fix? --- 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> ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 21:23 ` James Morris @ 2009-02-09 21:27 ` Mike Frysinger 2009-02-09 21:49 ` Randy Dunlap 0 siblings, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2009-02-09 21:27 UTC (permalink / raw) To: James Morris; +Cc: Mimi Zohar, LKML, Serge Hallyn On Mon, Feb 9, 2009 at 16:23, James Morris wrote: > On Mon, 9 Feb 2009, Mike Frysinger wrote: >> commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building >> for Blackfin systems: >> CC mm/shmem.o >> mm/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. > > 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 list include/linux/ima.h:25: warning: its scope is only this definition or declaration, which is probably not what you want -mike ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 21:27 ` Mike Frysinger @ 2009-02-09 21:49 ` Randy Dunlap 2009-02-09 21:51 ` Mike Frysinger 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2009-02-09 21:49 UTC (permalink / raw) To: Mike Frysinger; +Cc: James Morris, Mimi Zohar, LKML, Serge Hallyn Mike Frysinger wrote: > On Mon, Feb 9, 2009 at 16:23, James Morris wrote: >> On Mon, 9 Feb 2009, Mike Frysinger wrote: >>> commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building >>> for Blackfin systems: >>> CC mm/shmem.o >>> mm/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. >> 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 list > include/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: --- linux-next-20090209.orig/include/linux/ima.h +++ linux-next-20090209/include/linux/ima.h @@ -8,6 +8,7 @@ */ #include <linux/fs.h> +struct linux_binprm; #ifndef _LINUX_IMA_H #define _LINUX_IMA_H and it builds for me. -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 21:49 ` Randy Dunlap @ 2009-02-09 21:51 ` Mike Frysinger 2009-02-09 21:56 ` Randy Dunlap 0 siblings, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2009-02-09 21:51 UTC (permalink / raw) To: Randy Dunlap; +Cc: James Morris, Mimi Zohar, LKML, Serge Hallyn On Mon, Feb 9, 2009 at 16:49, Randy Dunlap wrote: > Mike Frysinger wrote: >> On Mon, Feb 9, 2009 at 16:23, James Morris wrote: >>> On Mon, 9 Feb 2009, Mike Frysinger wrote: >>>> commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building >>>> for Blackfin systems: >>>> CC mm/shmem.o >>>> mm/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. >>> 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 list >> include/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: > > --- linux-next-20090209.orig/include/linux/ima.h > +++ linux-next-20090209/include/linux/ima.h > @@ -8,6 +8,7 @@ > */ > > #include <linux/fs.h> > +struct linux_binprm; > > #ifndef _LINUX_IMA_H > #define _LINUX_IMA_H > > > > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 21:51 ` Mike Frysinger @ 2009-02-09 21:56 ` Randy Dunlap 2009-02-09 23:59 ` Mimi Zohar 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2009-02-09 21:56 UTC (permalink / raw) To: Mike Frysinger; +Cc: Randy Dunlap, James Morris, Mimi Zohar, LKML, Serge Hallyn Mike Frysinger wrote: > On Mon, Feb 9, 2009 at 16:49, Randy Dunlap wrote: >> Mike Frysinger wrote: >>> On Mon, Feb 9, 2009 at 16:23, James Morris wrote: >>>> On Mon, 9 Feb 2009, Mike Frysinger wrote: >>>>> commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building >>>>> for Blackfin systems: >>>>> CC mm/shmem.o >>>>> mm/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. >>>> 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 list >>> include/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: >> >> --- linux-next-20090209.orig/include/linux/ima.h >> +++ linux-next-20090209/include/linux/ima.h >> @@ -8,6 +8,7 @@ >> */ >> >> #include <linux/fs.h> >> +struct linux_binprm; >> >> #ifndef _LINUX_IMA_H >> #define _LINUX_IMA_H >> >> >> >> 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. -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ima changes to shmem breaks !CONFIG_SHMEM 2009-02-09 21:56 ` Randy Dunlap @ 2009-02-09 23:59 ` Mimi Zohar 0 siblings, 0 replies; 7+ messages in thread From: Mimi Zohar @ 2009-02-09 23:59 UTC (permalink / raw) To: Randy Dunlap; +Cc: Mike Frysinger, James Morris, LKML, Serge Hallyn On Mon, 2009-02-09 at 13:56 -0800, Randy Dunlap wrote: > Mike Frysinger wrote: > > On Mon, Feb 9, 2009 at 16:49, Randy Dunlap wrote: > >> Mike Frysinger wrote: > >>> On Mon, Feb 9, 2009 at 16:23, James Morris wrote: > >>>> On Mon, 9 Feb 2009, Mike Frysinger wrote: > >>>>> commit 1df9f0a73178718969ae47d813b8e7aab2cf073c broke default building > >>>>> for Blackfin systems: > >>>>> CC mm/shmem.o > >>>>> mm/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. > >>>> 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 list > >>> include/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: > >> > >> --- linux-next-20090209.orig/include/linux/ima.h > >> +++ linux-next-20090209/include/linux/ima.h > >> @@ -8,6 +8,7 @@ > >> */ > >> > >> #include <linux/fs.h> > >> +struct linux_binprm; > >> > >> #ifndef _LINUX_IMA_H > >> #define _LINUX_IMA_H > >> > >> > >> > >> 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. I posted the patch, forgetting to copy both Mike and you. Could you please verify the patch resolves the problem. Thanks! Mimi ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-09 23:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-09 16:30 ima changes to shmem breaks !CONFIG_SHMEM Mike Frysinger 2009-02-09 21:23 ` James Morris 2009-02-09 21:27 ` Mike Frysinger 2009-02-09 21:49 ` Randy Dunlap 2009-02-09 21:51 ` Mike Frysinger 2009-02-09 21:56 ` Randy Dunlap 2009-02-09 23:59 ` Mimi Zohar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox