Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452225

[PATCH] lkdtm: Fix targets for objcopy usage

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject [PATCH] lkdtm: Fix targets for objcopy usage
Date 2016-07-29 04:40 +0200
Message-ID <s05Sp-6R6-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The targets for lkdtm's objcopy were missing which caused them to always
be rebuilt. This corrects the problem.

Additionally, commit f8fa70f392fa ("arm64: localise Image objcopy flags")
has landed now, so this removes the work-around for the global OBJCOPY
flag setting.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/misc/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 4387ccb79e64..132f4e3462ba 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -65,9 +65,9 @@ lkdtm-$(CONFIG_LKDTM)		+= lkdtm_perms.o
 lkdtm-$(CONFIG_LKDTM)		+= lkdtm_rodata_objcopy.o
 lkdtm-$(CONFIG_LKDTM)		+= lkdtm_usercopy.o
 
-OBJCOPYFLAGS :=
 OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \
 			--set-section-flags .text=alloc,readonly \
 			--rename-section .text=.rodata
-$(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o
+targets += lkdtm_rodata.o lkdtm_rodata_objcopy.o
+$(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o FORCE
 	$(call if_changed,objcopy)
-- 
2.7.4


-- 
Kees Cook
Brillo & Chrome OS Security

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] lkdtm: Fix targets for objcopy usage Kees Cook <keescook@chromium.org> - 2016-07-29 04:40 +0200
  Re: [PATCH] lkdtm: Fix targets for objcopy usage Mark Rutland <mark.rutland@arm.com> - 2016-07-29 11:40 +0200
    Re: [PATCH] lkdtm: Fix targets for objcopy usage Kees Cook <keescook@chromium.org> - 2016-08-01 23:50 +0200
      Re: [PATCH] lkdtm: Fix targets for objcopy usage Mark Rutland <mark.rutland@arm.com> - 2016-08-02 12:50 +0200
        Re: [PATCH] lkdtm: Fix targets for objcopy usage Kees Cook <keescook@chromium.org> - 2016-08-02 17:30 +0200

csiph-web