From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751971AbcG2JiL (ORCPT ); Fri, 29 Jul 2016 05:38:11 -0400 Received: from foss.arm.com ([217.140.101.70]:52895 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbcG2JiI (ORCPT ); Fri, 29 Jul 2016 05:38:08 -0400 Date: Fri, 29 Jul 2016 10:37:58 +0100 From: Mark Rutland To: Kees Cook Cc: Linus Torvalds , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] lkdtm: Fix targets for objcopy usage Message-ID: <20160729093757.GA21580@leverpostej> References: <20160729023039.GA15900@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160729023039.GA15900@www.outflux.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Kees Cook 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 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 >