From: Mark Rutland <mark.rutland@arm.com>
To: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lkdtm: Fix targets for objcopy usage
Date: Fri, 29 Jul 2016 10:37:58 +0100 [thread overview]
Message-ID: <20160729093757.GA21580@leverpostej> (raw)
In-Reply-To: <20160729023039.GA15900@www.outflux.net>
Hi,
On Thu, Jul 28, 2016 at 07:30:39PM -0700, Kees Cook wrote:
> 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>
With this applied, LKDTM builds fine for me on arm64, the redundant
rebuilds are gone, and the result appears to work. So FWIW:
Tested-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
> ---
> 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
>
next prev parent reply other threads:[~2016-07-29 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 2:30 [PATCH] lkdtm: Fix targets for objcopy usage Kees Cook
2016-07-29 9:37 ` Mark Rutland [this message]
2016-08-01 21:25 ` Kees Cook
2016-08-02 9:50 ` Mark Rutland
2016-08-02 15:18 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160729093757.GA21580@leverpostej \
--to=mark.rutland@arm.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox