sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: Add missing "FORCE" target when using if_changed
@ 2021-09-23 21:54 Kees Cook
  2021-09-24  4:38 ` Nicolas Schier
  0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2021-09-23 21:54 UTC (permalink / raw)
  To: David S. Miller
  Cc: Kees Cook, Masahiro Yamada, sparclinux, Nicolas Schier,
	linux-kernel, linux-hardening

Fix observed warning:

    /builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing

Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
I'm not sure if this should go via sparc or via kbuild. :)
---
 arch/sparc/boot/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index 849236d4eca4..45e5c76d449e 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
 
 # Actual linking
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,gzip)
 	@echo '  kernel: $@ is ready'
 
@@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
 	@echo '  kernel: $@ is ready'
 else
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,strip)
 	@echo '  kernel: $@ is ready'
 
@@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
 $(obj)/image.bin: $(obj)/image FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/image.gz: $(obj)/image.bin
+$(obj)/image.gz: $(obj)/image.bin FORCE
 	$(call if_changed,gzip)
 
 UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
@@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
                      -r -b binary $@ -o $@.o
 
 targets += uImage
-$(obj)/uImage: $(obj)/image.gz
+$(obj)/uImage: $(obj)/image.gz FORCE
 	$(call if_changed,uimage)
 	$(call if_changed,uimage.o)
 	@echo '  Image $@ is ready'
-- 
2.30.2


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

* Re: [PATCH] sparc: Add missing "FORCE" target when using if_changed
  2021-09-23 21:54 [PATCH] sparc: Add missing "FORCE" target when using if_changed Kees Cook
@ 2021-09-24  4:38 ` Nicolas Schier
  2021-10-06  4:45   ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Schier @ 2021-09-24  4:38 UTC (permalink / raw)
  To: Kees Cook
  Cc: David S. Miller, Masahiro Yamada, sparclinux, linux-kernel,
	linux-hardening

On Thu, Sep 23, 2021 at 02:54:18PM -0700, Kees Cook wrote:
> Fix observed warning:
> 
>     /builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing
> 
> Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: sparclinux@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Acked-by: Nicolas Schier <n.schier@avm.de>

> ---
> I'm not sure if this should go via sparc or via kbuild. :)
> ---
>  arch/sparc/boot/Makefile | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
> index 849236d4eca4..45e5c76d449e 100644
> --- a/arch/sparc/boot/Makefile
> +++ b/arch/sparc/boot/Makefile
> @@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
>  
>  # Actual linking
>  
> -$(obj)/zImage: $(obj)/image
> +$(obj)/zImage: $(obj)/image FORCE
>  	$(call if_changed,gzip)
>  	@echo '  kernel: $@ is ready'
>  
> @@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
>  	@echo '  kernel: $@ is ready'
>  else
>  
> -$(obj)/zImage: $(obj)/image
> +$(obj)/zImage: $(obj)/image FORCE
>  	$(call if_changed,strip)
>  	@echo '  kernel: $@ is ready'
>  
> @@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
>  $(obj)/image.bin: $(obj)/image FORCE
>  	$(call if_changed,objcopy)
>  
> -$(obj)/image.gz: $(obj)/image.bin
> +$(obj)/image.gz: $(obj)/image.bin FORCE
>  	$(call if_changed,gzip)
>  
>  UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
> @@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
>                       -r -b binary $@ -o $@.o
>  
>  targets += uImage
> -$(obj)/uImage: $(obj)/image.gz
> +$(obj)/uImage: $(obj)/image.gz FORCE
>  	$(call if_changed,uimage)
>  	$(call if_changed,uimage.o)
>  	@echo '  Image $@ is ready'
> -- 
> 2.30.2
> 

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

* Re: [PATCH] sparc: Add missing "FORCE" target when using if_changed
  2021-09-24  4:38 ` Nicolas Schier
@ 2021-10-06  4:45   ` Kees Cook
  2021-10-06 12:53     ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2021-10-06  4:45 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David S. Miller, Nicolas Schier, sparclinux, linux-kernel,
	linux-hardening

On Fri, Sep 24, 2021 at 06:38:56AM +0200, Nicolas Schier wrote:
> On Thu, Sep 23, 2021 at 02:54:18PM -0700, Kees Cook wrote:
> > Fix observed warning:
> > 
> >     /builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing
> > 
> > Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: sparclinux@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> 
> Acked-by: Nicolas Schier <n.schier@avm.de>

Thanks!

Masahiro, are you able to add this to your kbuild tree?

-Kees

> 
> > ---
> > I'm not sure if this should go via sparc or via kbuild. :)
> > ---
> >  arch/sparc/boot/Makefile | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
> > index 849236d4eca4..45e5c76d449e 100644
> > --- a/arch/sparc/boot/Makefile
> > +++ b/arch/sparc/boot/Makefile
> > @@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
> >  
> >  # Actual linking
> >  
> > -$(obj)/zImage: $(obj)/image
> > +$(obj)/zImage: $(obj)/image FORCE
> >  	$(call if_changed,gzip)
> >  	@echo '  kernel: $@ is ready'
> >  
> > @@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
> >  	@echo '  kernel: $@ is ready'
> >  else
> >  
> > -$(obj)/zImage: $(obj)/image
> > +$(obj)/zImage: $(obj)/image FORCE
> >  	$(call if_changed,strip)
> >  	@echo '  kernel: $@ is ready'
> >  
> > @@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
> >  $(obj)/image.bin: $(obj)/image FORCE
> >  	$(call if_changed,objcopy)
> >  
> > -$(obj)/image.gz: $(obj)/image.bin
> > +$(obj)/image.gz: $(obj)/image.bin FORCE
> >  	$(call if_changed,gzip)
> >  
> >  UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
> > @@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
> >                       -r -b binary $@ -o $@.o
> >  
> >  targets += uImage
> > -$(obj)/uImage: $(obj)/image.gz
> > +$(obj)/uImage: $(obj)/image.gz FORCE
> >  	$(call if_changed,uimage)
> >  	$(call if_changed,uimage.o)
> >  	@echo '  Image $@ is ready'
> > -- 
> > 2.30.2
> > 

-- 
Kees Cook

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

* Re: [PATCH] sparc: Add missing "FORCE" target when using if_changed
  2021-10-06  4:45   ` Kees Cook
@ 2021-10-06 12:53     ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-10-06 12:53 UTC (permalink / raw)
  To: Kees Cook
  Cc: David S. Miller, Nicolas Schier, sparclinux,
	Linux Kernel Mailing List, linux-hardening

On Wed, Oct 6, 2021 at 1:45 PM Kees Cook <keescook@chromium.org> wrote:
>
> On Fri, Sep 24, 2021 at 06:38:56AM +0200, Nicolas Schier wrote:
> > On Thu, Sep 23, 2021 at 02:54:18PM -0700, Kees Cook wrote:
> > > Fix observed warning:
> > >
> > >     /builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing
> > >
> > > Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
> > > Cc: "David S. Miller" <davem@davemloft.net>
> > > Cc: Masahiro Yamada <masahiroy@kernel.org>
> > > Cc: sparclinux@vger.kernel.org
> > > Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > Acked-by: Nicolas Schier <n.schier@avm.de>
>
> Thanks!
>
> Masahiro, are you able to add this to your kbuild tree?

Sure, applied to linux-kbuild. Thanks.


> -Kees
>
> >
> > > ---
> > > I'm not sure if this should go via sparc or via kbuild. :)
> > > ---
> > >  arch/sparc/boot/Makefile | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
> > > index 849236d4eca4..45e5c76d449e 100644
> > > --- a/arch/sparc/boot/Makefile
> > > +++ b/arch/sparc/boot/Makefile
> > > @@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
> > >
> > >  # Actual linking
> > >
> > > -$(obj)/zImage: $(obj)/image
> > > +$(obj)/zImage: $(obj)/image FORCE
> > >     $(call if_changed,gzip)
> > >     @echo '  kernel: $@ is ready'
> > >
> > > @@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
> > >     @echo '  kernel: $@ is ready'
> > >  else
> > >
> > > -$(obj)/zImage: $(obj)/image
> > > +$(obj)/zImage: $(obj)/image FORCE
> > >     $(call if_changed,strip)
> > >     @echo '  kernel: $@ is ready'
> > >
> > > @@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
> > >  $(obj)/image.bin: $(obj)/image FORCE
> > >     $(call if_changed,objcopy)
> > >
> > > -$(obj)/image.gz: $(obj)/image.bin
> > > +$(obj)/image.gz: $(obj)/image.bin FORCE
> > >     $(call if_changed,gzip)
> > >
> > >  UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
> > > @@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
> > >                       -r -b binary $@ -o $@.o
> > >
> > >  targets += uImage
> > > -$(obj)/uImage: $(obj)/image.gz
> > > +$(obj)/uImage: $(obj)/image.gz FORCE
> > >     $(call if_changed,uimage)
> > >     $(call if_changed,uimage.o)
> > >     @echo '  Image $@ is ready'
> > > --
> > > 2.30.2
> > >
>
> --
> Kees Cook



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2021-10-06 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 21:54 [PATCH] sparc: Add missing "FORCE" target when using if_changed Kees Cook
2021-09-24  4:38 ` Nicolas Schier
2021-10-06  4:45   ` Kees Cook
2021-10-06 12:53     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).