From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203AbbJAP0E (ORCPT ); Thu, 1 Oct 2015 11:26:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53567 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbbJAP0A (ORCPT ); Thu, 1 Oct 2015 11:26:00 -0400 Date: Thu, 1 Oct 2015 10:25:53 -0500 From: Josh Poimboeuf To: Chris J Arges Cc: Jiri Slaby , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Andrew Morton Subject: Re: [PATCH v13.1 04/23] x86/stacktool: Compile-time stack metadata validation Message-ID: <20151001152553.GB4269@treble.redhat.com> References: <5904ee9a899cc4c0b3b9be9b96a3b82a278c9612.1442935712.git.jpoimboe@redhat.com> <56028F27.9040309@suse.cz> <56028FA1.1080801@suse.cz> <20150923124220.GA29940@treble.redhat.com> <20151001145050.GA18580@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151001145050.GA18580@canonical.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 01, 2015 at 09:50:51AM -0500, Chris J Arges wrote: > > > + > > +$(STACKTOOL_IN): FORCE > > + @$(MAKE) $(build)=stacktool > > + > > +$(STACKTOOL): $(STACKTOOL_IN) > > + @(test -d ../../kernel -a -d ../../tools -a -d ../stacktool && (( \ > > + diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \ > > + diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \ > > + diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \ > > + diff arch/x86/insn/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \ > > + diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \ > > + diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \ > > + diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \ > > + || echo "Warning: stacktool: x86 instruction decoder differs from kernel" >&2 )) || true > > + $(QUIET_LINK)$(CC) $(STACKTOOL_IN) $(LDFLAGS) -o $@ > > + > > +clean: > > + $(call QUIET_CLEAN, stacktool) $(RM) $(STACKTOOL) > > + $(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete > > + $(Q)$(RM) $(OUTPUT)arch/x86/insn/inat-tables.c > > + > > +FORCE: > > + > > +.PHONY: clean FORCE > > Josh, > > I'm getting the following error when the above makefile is called: > Warning: stacktool: x86 instruction decoder differs from kernel It's just a warning, not an error, right? Just want to make sure it didn't fail the build. The files are in sync on tip/master. > This was seen with your patches rebased on v4.3-rc2. > > It is failing on this diff: > diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt > > And the output is as follows: > 902,904d890 > < 3: xrstors > < 4: xsavec > < 5: xsaves > 949,950c935,936 > < 6: XSAVEOPT | clwb (66) | mfence (11B) > < 7: clflush | clflushopt (66) | sfence (11B) | pcommit (66),(11B) > --- > > 6: XSAVEOPT | mfence (11B) > > 7: clflush | sfence (11B) > > Why do these files essentially need to be duplicated? Would it be possible to > point Make at the files that are already in ../../arch/x86/*? They're duplicated because the "tools" dir is supposed to be source independent from the rest of the kernel tree. -- Josh