Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1593585
| From | Nicholas Mc Guire <der.herr@hofr.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] objtool: drop redundant flags generation |
| Date | 2017-03-06 19:50 +0100 |
| Message-ID | <ti5RM-3Nc-23@gated-at.bofh.it> (permalink) |
| References | <ti4Cm-2Wx-15@gated-at.bofh.it> <ti4Cm-2Wx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Mar 06, 2017 at 11:25:37AM -0600, Josh Poimboeuf wrote: > On Mon, Mar 06, 2017 at 06:00:25PM +0100, Nicholas Mc Guire wrote: > > The generator was emitting quite a few duplicate flags which was making > > doublebitand.cocci nervous. This awk hack resolves the duplicate issue. > > > > Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> > > --- > > > > The coccinelle complaints emitted was about 230 findings total: > > ./arch/x86/lib/inat-tables.c:214:10-20: duplicated argument to & or | > > ./arch/x86/lib/inat-tables.c:214:23-33: duplicated argument to & or | > > ./arch/x86/lib/inat-tables.c:218:10-20: duplicated argument to & or | > > ./arch/x86/lib/inat-tables.c:218:23-33: duplicated argument to & or | > > .... > > ./tools/objtool/arch/x86/insn/inat-tables.c:214:10-20: duplicated argument to & or | > > ./tools/objtool/arch/x86/insn/inat-tables.c:214:23-33: duplicated argument to & or | > > ./tools/objtool/arch/x86/insn/inat-tables.c:218:10-20: duplicated argument to & or | > > ./tools/objtool/arch/x86/insn/inat-tables.c:218:23-33: duplicated argument to & or | > > ... > > spatch --sp-file scripts/coccinelle/tests/doublebitand.cocci inat-tables.c -D report > > will give you the full list - all are caused by duplicates in the generated > > output by the add_flags function in the two instances of gen-insn-attr-x86.awk. > > > > Q: The two copies of gen-insn-attr-x86.awk are identical and its not actually clear > > why this duplication is needed ? Further the maintainers list emitted for the > > two files differ. > > > > Patch was checked by manual review of the diff between the initial file and the > > regenerated file after the below patch was applied. > > Second verification was by make tools/objtool and comparing the generated binaries > > in tools/objtool/arch/x86/decode.o with diff. > > > > Patch is against 4.11-rc1 (localversion-next is next-20170306) > > > > arch/x86/tools/gen-insn-attr-x86.awk | 12 ++++++++++-- > > tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk | 12 ++++++++++-- > > There's actually a third copy of the decoder in: > > tools/perf/util/intel-pt-decoder/ > > Yes, the duplication is a pain, but it's part of an effort to keep > 'tools/*' source independent from kernel code. > > Maybe we can at least combine the objtool and perf versions someday. > Bad - missed that one - did not build perf - the generator seems to be the same though only differing by a single blank line - so pulling those together should be a non-issue atleast with respect to the generator as the x86-opcode-map.txt are all the same ? ...or what fun am I missing ? thx! hofrat
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] objtool: drop redundant flags generation Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-06 18:30 +0100
Re: [PATCH] objtool: drop redundant flags generation Nicholas Mc Guire <der.herr@hofr.at> - 2017-03-06 19:50 +0100
Re: [PATCH] objtool: drop redundant flags generation Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-06 22:50 +0100
Re: [PATCH] objtool: drop redundant flags generation Nicholas Mc Guire <der.herr@hofr.at> - 2017-03-07 09:30 +0100
Re: [PATCH] objtool: drop redundant flags generation Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-07 15:00 +0100
Re: [PATCH] objtool: drop redundant flags generation Nicholas Mc Guire <der.herr@hofr.at> - 2017-03-07 15:50 +0100
csiph-web