<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/objtool/arch.h, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-09-10T15:43:13Z</updated>
<entry>
<title>objtool: Decode unwind hint register depending on architecture</title>
<updated>2020-09-10T15:43:13Z</updated>
<author>
<name>Julien Thierry</name>
<email>jthierry@redhat.com</email>
</author>
<published>2020-09-04T15:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edea9e6bcbeaa41718b022a8b99ffddef2330bbc'/>
<id>urn:sha1:edea9e6bcbeaa41718b022a8b99ffddef2330bbc</id>
<content type='text'>
The set of registers that can be included in an unwind hint and their
encoding will depend on the architecture. Have arch specific code to
decode that register.

Signed-off-by: Julien Thierry &lt;jthierry@redhat.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
</content>
</entry>
<entry>
<title>objtool: Define 'struct orc_entry' only when needed</title>
<updated>2020-09-01T22:19:12Z</updated>
<author>
<name>Julien Thierry</name>
<email>jthierry@redhat.com</email>
</author>
<published>2020-08-25T12:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=66734e32463bd1346466f92662feeaccef26e94f'/>
<id>urn:sha1:66734e32463bd1346466f92662feeaccef26e94f</id>
<content type='text'>
Implementation of ORC requires some definitions that are currently
provided by the target architecture headers. Do not depend on these
definitions when the orc subcommand is not implemented.

This avoid requiring arches with no orc implementation to provide dummy
orc definitions.

Signed-off-by: Julien Thierry &lt;jthierry@redhat.com&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'objtool/urgent' into objtool/core</title>
<updated>2020-06-18T15:55:29Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-06-18T15:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d832c0051f4e9cc7d26ef3bc6e9b662bc6a90f3a'/>
<id>urn:sha1:d832c0051f4e9cc7d26ef3bc6e9b662bc6a90f3a</id>
<content type='text'>
 Conflicts:
	tools/objtool/elf.c
	tools/objtool/elf.h
	tools/objtool/orc_gen.c
	tools/objtool/check.c

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
</content>
</entry>
<entry>
<title>objtool: Fix noinstr vs KCOV</title>
<updated>2020-06-18T15:36:33Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-06-12T14:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f1441b44e823a74f3f3780902a113e07c73fbf6'/>
<id>urn:sha1:0f1441b44e823a74f3f3780902a113e07c73fbf6</id>
<content type='text'>
Since many compilers cannot disable KCOV with a function attribute,
help it to NOP out any __sanitizer_cov_*() calls injected in noinstr
code.

This turns:

12:   e8 00 00 00 00          callq  17 &lt;lockdep_hardirqs_on+0x17&gt;
		13: R_X86_64_PLT32      __sanitizer_cov_trace_pc-0x4

into:

12:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)
		13: R_X86_64_NONE      __sanitizer_cov_trace_pc-0x4

Just like recordmcount does.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
</content>
</entry>
<entry>
<title>objtool: Rename rela to reloc</title>
<updated>2020-06-01T14:40:58Z</updated>
<author>
<name>Matt Helsley</name>
<email>mhelsley@vmware.com</email>
</author>
<published>2020-05-29T21:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1974222634010486c1692e843af0ab11304dd2c'/>
<id>urn:sha1:f1974222634010486c1692e843af0ab11304dd2c</id>
<content type='text'>
Before supporting additional relocation types rename the relevant
types and functions from "rela" to "reloc". This work be done with
the following regex:

  sed -e 's/struct rela/struct reloc/g' \
      -e 's/\([_\*]\)rela\(s\{0,1\}\)/\1reloc\2/g' \
      -e 's/tmprela\(s\{0,1\}\)/tmpreloc\1/g' \
      -e 's/relasec/relocsec/g' \
      -e 's/rela_list/reloc_list/g' \
      -e 's/rela_hash/reloc_hash/g' \
      -e 's/add_rela/add_reloc/g' \
      -e 's/rela-&gt;/reloc-&gt;/g' \
      -e '/rela[,\.]/{ s/\([^\.&gt;]\)rela\([\.,]\)/\1reloc\2/g ; }' \
      -e 's/rela =/reloc =/g' \
      -e 's/relas =/relocs =/g' \
      -e 's/relas\[/relocs[/g' \
      -e 's/relaname =/relocname =/g' \
      -e 's/= rela\;/= reloc\;/g' \
      -e 's/= relas\;/= relocs\;/g' \
      -e 's/= relaname\;/= relocname\;/g' \
      -e 's/, rela)/, reloc)/g' \
      -e 's/\([ @]\)rela\([ "]\)/\1reloc\2/g' \
      -e 's/ rela$/ reloc/g' \
      -e 's/, relaname/, relocname/g' \
      -e 's/sec-&gt;rela/sec-&gt;reloc/g' \
      -e 's/(\(!\{0,1\}\)rela/(\1reloc/g' \
      -i \
      arch.h \
      arch/x86/decode.c  \
      check.c \
      check.h \
      elf.c \
      elf.h \
      orc_gen.c \
      special.c

Notable exceptions which complicate the regex include gelf_*
library calls and standard/expected section names which still use
"rela" because they encode the type of relocation expected. Also, keep
"rela" in the struct because it encodes a specific type of relocation
we currently expect.

It will eventually turn into a member of an anonymous union when a
susequent patch adds implicit addend, or "rel", relocation support.

Signed-off-by: Matt Helsley &lt;mhelsley@vmware.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
</content>
</entry>
<entry>
<title>objtool: Enable compilation of objtool for all architectures</title>
<updated>2020-05-20T14:17:28Z</updated>
<author>
<name>Matt Helsley</name>
<email>mhelsley@vmware.com</email>
</author>
<published>2020-05-19T20:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0decf1f8de919782b152daf9c991967a2bac54f0'/>
<id>urn:sha1:0decf1f8de919782b152daf9c991967a2bac54f0</id>
<content type='text'>
Objtool currently only compiles for x86 architectures. This is
fine as it presently does not support tooling for other
architectures. However, we would like to be able to convert other
kernel tools to run as objtool sub commands because they too
process ELF object files. This will allow us to convert tools
such as recordmcount to use objtool's ELF code.

Since much of recordmcount's ELF code is copy-paste code to/from
a variety of other kernel tools (look at modpost for example) this
means that if we can convert recordmcount we can convert more.

We define weak definitions for subcommand entry functions and other weak
definitions for shared functions critical to building existing
subcommands. These return 127 when the command is missing which signify
tools that do not exist on all architectures.  In this case the "check"
and "orc" tools do not exist on all architectures so we only add them
for x86. Future changes adding support for "check", to arm64 for
example, can then modify the SUBCMD_CHECK variable when building for
arm64.

Objtool is not currently wired in to KConfig to be built for other
architectures because it's not needed for those architectures and
there are no commands it supports other than those for x86. As more
command support is enabled on various architectures the necessary
KConfig changes can be made (e.g. adding "STACK_VALIDATION") to
trigger building objtool.

[ jpoimboe: remove aliases, add __weak macro, add error messages ]

Cc: Julien Thierry &lt;jthierry@redhat.com&gt;
Signed-off-by: Matt Helsley &lt;mhelsley@vmware.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
</content>
</entry>
<entry>
<title>objtool: Move the IRET hack into the arch decoder</title>
<updated>2020-04-30T18:14:33Z</updated>
<author>
<name>Miroslav Benes</name>
<email>mbenes@suse.cz</email>
</author>
<published>2020-04-24T14:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b490f45362002fef57996388e395efc974b013f4'/>
<id>urn:sha1:b490f45362002fef57996388e395efc974b013f4</id>
<content type='text'>
Quoting Julien:

  "And the other suggestion is my other email was that you don't even
  need to add INSN_EXCEPTION_RETURN. You can keep IRET as
  INSN_CONTEXT_SWITCH by default and x86 decoder lookups the symbol
  conaining an iret. If it's a function symbol, it can just set the type
  to INSN_OTHER so that it caries on to the next instruction after
  having handled the stack_op."

Suggested-by: Julien Thierry &lt;jthierry@redhat.com&gt;
Signed-off-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lkml.kernel.org/r/20200428191659.913283807@infradead.org
</content>
</entry>
<entry>
<title>objtool: Remove INSN_STACK</title>
<updated>2020-04-30T18:14:33Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-04-24T14:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b09fb65e863733e192d4825a285b4b4998969ce0'/>
<id>urn:sha1:b09fb65e863733e192d4825a285b4b4998969ce0</id>
<content type='text'>
With the unconditional use of handle_insn_ops(), INSN_STACK has lost
its purpose. Remove it.

Suggested-by: Julien Thierry &lt;jthierry@redhat.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lkml.kernel.org/r/20200428191659.854203028@infradead.org
</content>
</entry>
<entry>
<title>objtool: Constify arch_decode_instruction()</title>
<updated>2020-04-23T06:34:18Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2020-04-22T10:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c98be8118221a8d3de572740f29dd02ed9686a5'/>
<id>urn:sha1:0c98be8118221a8d3de572740f29dd02ed9686a5</id>
<content type='text'>
Mostly straightforward constification, except that WARN_FUNC()
needs a writable pointer while we have read-only pointers,
so deflect this to WARN().

Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20200422103205.61900-4-mingo@kernel.org
</content>
</entry>
<entry>
<title>objtool: Rename struct cfi_state</title>
<updated>2020-04-22T08:53:50Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-03-25T14:34:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3608f5954d07a40fb93764dc6d06195fa52eb14'/>
<id>urn:sha1:a3608f5954d07a40fb93764dc6d06195fa52eb14</id>
<content type='text'>
There's going to be a new struct cfi_state, rename this one to make
place.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Reviewed-by: Alexandre Chartre &lt;alexandre.chartre@oracle.com&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lkml.kernel.org/r/20200416115118.986441913@infradead.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
