]>
Commit | Line | Data |
---|---|---|
59d5af67 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
321d628a FG |
2 | From: Josh Poimboeuf <jpoimboe@redhat.com> |
3 | Date: Mon, 6 Nov 2017 07:21:50 -0600 | |
59d5af67 | 4 | Subject: [PATCH] objtool: Move synced files to their original relative |
321d628a FG |
5 | locations |
6 | MIME-Version: 1.0 | |
7 | Content-Type: text/plain; charset=UTF-8 | |
8 | Content-Transfer-Encoding: 8bit | |
9 | ||
10 | CVE-2017-5754 | |
11 | ||
12 | This will enable more straightforward comparisons, and it also makes the | |
13 | files 100% identical. | |
14 | ||
15 | Suggested-by: Ingo Molnar <mingo@kernel.org> | |
16 | Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> | |
17 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
18 | Cc: Peter Zijlstra <peterz@infradead.org> | |
19 | Cc: Thomas Gleixner <tglx@linutronix.de> | |
20 | Link: http://lkml.kernel.org/r/407b2aaa317741f48fcf821592c0e96ab3be1890.1509974346.git.jpoimboe@redhat.com | |
21 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | |
22 | (backported from commit b90671a530137f42325b89c0848ca58d865c1710) | |
23 | Signed-off-by: Andy Whitcroft <apw@canonical.com> | |
24 | Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> | |
25 | (cherry picked from commit 3673cdbc4be1671fad71a4968a9f55357d9d356c) | |
26 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
27 | --- | |
28 | .../arch/x86/{insn => lib}/x86-opcode-map.txt | 0 | |
29 | tools/objtool/Makefile | 22 ++++++++++++---------- | |
30 | .../objtool/arch/x86/{insn => include/asm}/inat.h | 2 +- | |
31 | .../arch/x86/{insn => include/asm}/inat_types.h | 0 | |
32 | .../objtool/arch/x86/{insn => include/asm}/insn.h | 2 +- | |
33 | .../objtool/{ => arch/x86/include/asm}/orc_types.h | 0 | |
34 | tools/objtool/orc.h | 2 +- | |
35 | tools/objtool/arch/x86/decode.c | 6 +++--- | |
36 | tools/objtool/arch/x86/{insn => lib}/inat.c | 2 +- | |
37 | tools/objtool/arch/x86/{insn => lib}/insn.c | 4 ++-- | |
38 | tools/objtool/.gitignore | 2 +- | |
39 | tools/objtool/arch/x86/Build | 10 +++++----- | |
40 | .../arch/x86/{insn => tools}/gen-insn-attr-x86.awk | 0 | |
41 | 13 files changed, 27 insertions(+), 25 deletions(-) | |
42 | rename tools/objtool/arch/x86/{insn => lib}/x86-opcode-map.txt (100%) | |
43 | rename tools/objtool/arch/x86/{insn => include/asm}/inat.h (99%) | |
44 | rename tools/objtool/arch/x86/{insn => include/asm}/inat_types.h (100%) | |
45 | rename tools/objtool/arch/x86/{insn => include/asm}/insn.h (99%) | |
46 | rename tools/objtool/{ => arch/x86/include/asm}/orc_types.h (100%) | |
47 | rename tools/objtool/arch/x86/{insn => lib}/inat.c (99%) | |
48 | rename tools/objtool/arch/x86/{insn => lib}/insn.c (99%) | |
49 | rename tools/objtool/arch/x86/{insn => tools}/gen-insn-attr-x86.awk (100%) | |
50 | ||
51 | diff --git a/tools/objtool/arch/x86/insn/x86-opcode-map.txt b/tools/objtool/arch/x86/lib/x86-opcode-map.txt | |
52 | similarity index 100% | |
53 | rename from tools/objtool/arch/x86/insn/x86-opcode-map.txt | |
54 | rename to tools/objtool/arch/x86/lib/x86-opcode-map.txt | |
55 | diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile | |
56 | index 3a6425fefc43..f95f48e445c3 100644 | |
57 | --- a/tools/objtool/Makefile | |
58 | +++ b/tools/objtool/Makefile | |
59 | @@ -24,7 +24,9 @@ OBJTOOL_IN := $(OBJTOOL)-in.o | |
60 | ||
61 | all: $(OBJTOOL) | |
62 | ||
63 | -INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi | |
64 | +INCLUDES := -I$(srctree)/tools/include \ | |
65 | + -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \ | |
66 | + -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include | |
67 | CFLAGS += -Wall -Werror $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -fomit-frame-pointer -O2 -g $(INCLUDES) | |
68 | LDFLAGS += -lelf $(LIBSUBCMD) | |
69 | ||
70 | @@ -44,16 +46,16 @@ $(OBJTOOL_IN): fixdep FORCE | |
71 | $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN) | |
72 | @(diff -I 2>&1 | grep -q 'option requires an argument' && \ | |
73 | test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \ | |
74 | - diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \ | |
75 | - diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \ | |
76 | - diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \ | |
77 | - diff arch/x86/insn/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \ | |
78 | - diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \ | |
79 | - diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \ | |
80 | - diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \ | |
81 | + diff arch/x86/lib/insn.c ../../arch/x86/lib/insn.c >/dev/null && \ | |
82 | + diff arch/x86/lib/inat.c ../../arch/x86/lib/inat.c >/dev/null && \ | |
83 | + diff arch/x86/lib/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \ | |
84 | + diff arch/x86/tools/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \ | |
85 | + diff arch/x86/include/asm/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \ | |
86 | + diff arch/x86/include/asm/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \ | |
87 | + diff arch/x86/include/asm/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \ | |
88 | || echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true | |
89 | @(test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \ | |
90 | - diff ../../arch/x86/include/asm/orc_types.h orc_types.h >/dev/null) \ | |
91 | + diff ../../arch/x86/include/asm/orc_types.h arch/x86/include/asm/orc_types.h >/dev/null) \ | |
92 | || echo "warning: objtool: orc_types.h differs from kernel" >&2 )) || true | |
93 | $(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@ | |
94 | ||
95 | @@ -64,7 +66,7 @@ $(LIBSUBCMD): fixdep FORCE | |
96 | clean: | |
97 | $(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL) | |
98 | $(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete | |
99 | - $(Q)$(RM) $(OUTPUT)arch/x86/insn/inat-tables.c $(OUTPUT)fixdep | |
100 | + $(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-tables.c $(OUTPUT)fixdep | |
101 | ||
102 | FORCE: | |
103 | ||
104 | diff --git a/tools/objtool/arch/x86/insn/inat.h b/tools/objtool/arch/x86/include/asm/inat.h | |
105 | similarity index 99% | |
106 | rename from tools/objtool/arch/x86/insn/inat.h | |
107 | rename to tools/objtool/arch/x86/include/asm/inat.h | |
108 | index 125ecd2a300d..02aff0867211 100644 | |
109 | --- a/tools/objtool/arch/x86/insn/inat.h | |
110 | +++ b/tools/objtool/arch/x86/include/asm/inat.h | |
111 | @@ -20,7 +20,7 @@ | |
112 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
113 | * | |
114 | */ | |
115 | -#include "inat_types.h" | |
116 | +#include <asm/inat_types.h> | |
117 | ||
118 | /* | |
119 | * Internal bits. Don't use bitmasks directly, because these bits are | |
120 | diff --git a/tools/objtool/arch/x86/insn/inat_types.h b/tools/objtool/arch/x86/include/asm/inat_types.h | |
121 | similarity index 100% | |
122 | rename from tools/objtool/arch/x86/insn/inat_types.h | |
123 | rename to tools/objtool/arch/x86/include/asm/inat_types.h | |
124 | diff --git a/tools/objtool/arch/x86/insn/insn.h b/tools/objtool/arch/x86/include/asm/insn.h | |
125 | similarity index 99% | |
126 | rename from tools/objtool/arch/x86/insn/insn.h | |
127 | rename to tools/objtool/arch/x86/include/asm/insn.h | |
128 | index e23578c7b1be..b3e32b010ab1 100644 | |
129 | --- a/tools/objtool/arch/x86/insn/insn.h | |
130 | +++ b/tools/objtool/arch/x86/include/asm/insn.h | |
131 | @@ -21,7 +21,7 @@ | |
132 | */ | |
133 | ||
134 | /* insn_attr_t is defined in inat.h */ | |
135 | -#include "inat.h" | |
136 | +#include <asm/inat.h> | |
137 | ||
138 | struct insn_field { | |
139 | union { | |
140 | diff --git a/tools/objtool/orc_types.h b/tools/objtool/arch/x86/include/asm/orc_types.h | |
141 | similarity index 100% | |
142 | rename from tools/objtool/orc_types.h | |
143 | rename to tools/objtool/arch/x86/include/asm/orc_types.h | |
144 | diff --git a/tools/objtool/orc.h b/tools/objtool/orc.h | |
145 | index a4139e386ef3..b0e92a6d0903 100644 | |
146 | --- a/tools/objtool/orc.h | |
147 | +++ b/tools/objtool/orc.h | |
148 | @@ -18,7 +18,7 @@ | |
149 | #ifndef _ORC_H | |
150 | #define _ORC_H | |
151 | ||
152 | -#include "orc_types.h" | |
153 | +#include <asm/orc_types.h> | |
154 | ||
155 | struct objtool_file; | |
156 | ||
157 | diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c | |
158 | index 4559a21a8de2..92f57996d66c 100644 | |
159 | --- a/tools/objtool/arch/x86/decode.c | |
160 | +++ b/tools/objtool/arch/x86/decode.c | |
161 | @@ -19,9 +19,9 @@ | |
162 | #include <stdlib.h> | |
163 | ||
164 | #define unlikely(cond) (cond) | |
165 | -#include "insn/insn.h" | |
166 | -#include "insn/inat.c" | |
167 | -#include "insn/insn.c" | |
168 | +#include <asm/insn.h> | |
169 | +#include "lib/inat.c" | |
170 | +#include "lib/insn.c" | |
171 | ||
172 | #include "../../elf.h" | |
173 | #include "../../arch.h" | |
174 | diff --git a/tools/objtool/arch/x86/insn/inat.c b/tools/objtool/arch/x86/lib/inat.c | |
175 | similarity index 99% | |
176 | rename from tools/objtool/arch/x86/insn/inat.c | |
177 | rename to tools/objtool/arch/x86/lib/inat.c | |
178 | index e4bf28e6f4c7..c1f01a8e9f65 100644 | |
179 | --- a/tools/objtool/arch/x86/insn/inat.c | |
180 | +++ b/tools/objtool/arch/x86/lib/inat.c | |
181 | @@ -18,7 +18,7 @@ | |
182 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
183 | * | |
184 | */ | |
185 | -#include "insn.h" | |
186 | +#include <asm/insn.h> | |
187 | ||
188 | /* Attribute tables are generated from opcode map */ | |
189 | #include "inat-tables.c" | |
190 | diff --git a/tools/objtool/arch/x86/insn/insn.c b/tools/objtool/arch/x86/lib/insn.c | |
191 | similarity index 99% | |
192 | rename from tools/objtool/arch/x86/insn/insn.c | |
193 | rename to tools/objtool/arch/x86/lib/insn.c | |
194 | index ca983e2bea8b..1088eb8f3a5f 100644 | |
195 | --- a/tools/objtool/arch/x86/insn/insn.c | |
196 | +++ b/tools/objtool/arch/x86/lib/insn.c | |
197 | @@ -23,8 +23,8 @@ | |
198 | #else | |
199 | #include <string.h> | |
200 | #endif | |
201 | -#include "inat.h" | |
202 | -#include "insn.h" | |
203 | +#include <asm/inat.h> | |
204 | +#include <asm/insn.h> | |
205 | ||
206 | /* Verify next sizeof(t) bytes can be on the same instruction */ | |
207 | #define validate_next(t, insn, n) \ | |
208 | diff --git a/tools/objtool/.gitignore b/tools/objtool/.gitignore | |
209 | index d3102c865a95..914cff12899b 100644 | |
210 | --- a/tools/objtool/.gitignore | |
211 | +++ b/tools/objtool/.gitignore | |
212 | @@ -1,3 +1,3 @@ | |
213 | -arch/x86/insn/inat-tables.c | |
214 | +arch/x86/lib/inat-tables.c | |
215 | objtool | |
216 | fixdep | |
217 | diff --git a/tools/objtool/arch/x86/Build b/tools/objtool/arch/x86/Build | |
218 | index debbdb0b5c43..b998412c017d 100644 | |
219 | --- a/tools/objtool/arch/x86/Build | |
220 | +++ b/tools/objtool/arch/x86/Build | |
221 | @@ -1,12 +1,12 @@ | |
222 | objtool-y += decode.o | |
223 | ||
224 | -inat_tables_script = arch/x86/insn/gen-insn-attr-x86.awk | |
225 | -inat_tables_maps = arch/x86/insn/x86-opcode-map.txt | |
226 | +inat_tables_script = arch/x86/tools/gen-insn-attr-x86.awk | |
227 | +inat_tables_maps = arch/x86/lib/x86-opcode-map.txt | |
228 | ||
229 | -$(OUTPUT)arch/x86/insn/inat-tables.c: $(inat_tables_script) $(inat_tables_maps) | |
230 | +$(OUTPUT)arch/x86/lib/inat-tables.c: $(inat_tables_script) $(inat_tables_maps) | |
231 | $(call rule_mkdir) | |
232 | $(Q)$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ | |
233 | ||
234 | -$(OUTPUT)arch/x86/decode.o: $(OUTPUT)arch/x86/insn/inat-tables.c | |
235 | +$(OUTPUT)arch/x86/decode.o: $(OUTPUT)arch/x86/lib/inat-tables.c | |
236 | ||
237 | -CFLAGS_decode.o += -I$(OUTPUT)arch/x86/insn | |
238 | +CFLAGS_decode.o += -I$(OUTPUT)arch/x86/lib | |
239 | diff --git a/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk b/tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk | |
240 | similarity index 100% | |
241 | rename from tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk | |
242 | rename to tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk | |
243 | -- | |
244 | 2.14.2 | |
245 |