<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/recordmcount.c, branch v4.4.20</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.20</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.20'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-08-20T16:09:23Z</updated>
<entry>
<title>ftrace/recordmcount: Work around for addition of metag magic but not relocations</title>
<updated>2016-08-20T16:09:23Z</updated>
<author>
<name>Laura Abbott</name>
<email>labbott@redhat.com</email>
</author>
<published>2016-07-08T19:18:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=84f8a24ade96a8c1499823b160a0591199cf9d12'/>
<id>urn:sha1:84f8a24ade96a8c1499823b160a0591199cf9d12</id>
<content type='text'>
commit b2e1c26f0b62531636509fbcb6dab65617ed8331 upstream.

glibc recently did a sync up (94e73c95d9b5 "elf.h: Sync with the gabi
webpage") that added a #define for EM_METAG but did not add relocations

This triggers build errors:

scripts/recordmcount.c: In function 'do_file':
scripts/recordmcount.c:466:28: error: 'R_METAG_ADDR32' undeclared (first use in this function)
  case EM_METAG:  reltype = R_METAG_ADDR32;
                            ^~~~~~~~~~~~~~
scripts/recordmcount.c:466:28: note: each undeclared identifier is reported only once for each function it appears in
scripts/recordmcount.c:468:20: error: 'R_METAG_NONE' undeclared (first use in this function)
     rel_type_nop = R_METAG_NONE;
                    ^~~~~~~~~~~~

Work around this change with some more #ifdefery for the relocations.

Fedora Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1354034

Link: http://lkml.kernel.org/r/1468005530-14757-1-git-send-email-labbott@redhat.com

Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Fixes: 00512bdd4573 ("metag: ftrace support")
Reported-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ftrace/scripts: Fix incorrect use of sprintf in recordmcount</title>
<updated>2016-01-04T16:13:16Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2015-12-30T23:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=713a3e4de707fab49d5aa4bceb77db1058572a7b'/>
<id>urn:sha1:713a3e4de707fab49d5aa4bceb77db1058572a7b</id>
<content type='text'>
Fix build warning:

scripts/recordmcount.c:589:4: warning: format not a string
literal and no format arguments [-Wformat-security]
    sprintf("%s: failed\n", file);

Fixes: a50bd43935586 ("ftrace/scripts: Have recordmcount copy the object file")
Link: http://lkml.kernel.org/r/1451516801-16951-1-git-send-email-colin.king@canonical.com

Cc: Li Bin &lt;huawei.libin@huawei.com&gt;
Cc: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/scripts: Have recordmcount copy the object file</title>
<updated>2015-12-16T20:46:07Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-12-15T21:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a50bd43935586420fb75f4558369eb08566fac5e'/>
<id>urn:sha1:a50bd43935586420fb75f4558369eb08566fac5e</id>
<content type='text'>
Russell King found that he had weird side effects when compiling the kernel
with hard linked ccache. The reason was that recordmcount modified the
kernel in place via mmap, and when a file gets modified twice by
recordmcount, it will complain about it. To fix this issue, Russell wrote a
patch that checked if the file was hard linked more than once and would
unlink it if it was.

Linus Torvalds was not happy with the fact that recordmcount does this in
place modification. Instead of doing the unlink only if the file has two or
more hard links, it does the unlink all the time. In otherwords, it always
does a copy if it changed something. That is, it does the write out if a
change was made.

Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>scripts: recordmcount: break hardlinks</title>
<updated>2015-12-16T14:28:23Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2015-12-11T12:09:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd39a26538e37f6c6131e829a4a510787e43c783'/>
<id>urn:sha1:dd39a26538e37f6c6131e829a4a510787e43c783</id>
<content type='text'>
recordmcount edits the file in-place, which can cause problems when
using ccache in hardlink mode.  Arrange for recordmcount to break a
hardlinked object.

Link: http://lkml.kernel.org/r/E1a7MVT-0000et-62@rmk-PC.arm.linux.org.uk

Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>recordmcount: arm64: Replace the ignored mcount call into nop</title>
<updated>2015-11-03T15:50:29Z</updated>
<author>
<name>Li Bin</name>
<email>huawei.libin@huawei.com</email>
</author>
<published>2015-10-30T08:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ee8a74f2a5da913637f75a19a0da0e7a08c0f86'/>
<id>urn:sha1:2ee8a74f2a5da913637f75a19a0da0e7a08c0f86</id>
<content type='text'>
By now, the recordmcount only records the function that in
following sections:
.text/.ref.text/.sched.text/.spinlock.text/.irqentry.text/
.kprobes.text/.text.unlikely

For the function that not in these sections, the call mcount
will be in place and not be replaced when kernel boot up. And
it will bring performance overhead, such as do_mem_abort (in
.exception.text section). This patch make the call mcount to
nop for this case in recordmcount.

Link: http://lkml.kernel.org/r/1446019445-14421-1-git-send-email-huawei.libin@huawei.com
Link: http://lkml.kernel.org/r/1446193864-24593-4-git-send-email-huawei.libin@huawei.com

Cc: &lt;lkp@intel.com&gt;
Cc: &lt;catalin.marinas@arm.com&gt;
Cc: &lt;takahiro.akashi@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.18+
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Li Bin &lt;huawei.libin@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>recordmcount: x86: Assign a meaningful value to rel_type_nop</title>
<updated>2015-11-02T18:34:32Z</updated>
<author>
<name>Li Bin</name>
<email>huawei.libin@huawei.com</email>
</author>
<published>2015-10-28T08:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46a2b61ecb286dddb4efa73b119fec54e1576efe'/>
<id>urn:sha1:46a2b61ecb286dddb4efa73b119fec54e1576efe</id>
<content type='text'>
Although, the default value of rel_type_nop is zero, and the value
of R_386_NONE/R_X86_64_NONE is zero too, but it should be assigned
a meaningful value explicitly, otherwise it looks confused.

Assign R_386_NONE to rel_type_nop for 386, assign R_X86_64_NONE
to rel_type_nop for x86_64.

Link: http://lkml.kernel.org/r/1446020606-16352-1-git-send-email-huawei.libin@huawei.com

Signed-off-by: Li Bin &lt;huawei.libin@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>s390/ftrace,kprobes: allow to patch first instruction</title>
<updated>2014-10-27T12:27:27Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2014-10-15T10:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c933146a5e41e42ea3eb4f34fa02e201da3f068e'/>
<id>urn:sha1:c933146a5e41e42ea3eb4f34fa02e201da3f068e</id>
<content type='text'>
If the function tracer is enabled, allow to set kprobes on the first
instruction of a function (which is the function trace caller):

If no kprobe is set handling of enabling and disabling function tracing
of a function simply patches the first instruction. Either it is a nop
(right now it's an unconditional branch, which skips the mcount block),
or it's a branch to the ftrace_caller() function.

If a kprobe is being placed on a function tracer calling instruction
we encode if we actually have a nop or branch in the remaining bytes
after the breakpoint instruction (illegal opcode).
This is possible, since the size of the instruction used for the nop
and branch is six bytes, while the size of the breakpoint is only
two bytes.
Therefore the first two bytes contain the illegal opcode and the last
four bytes contain either "0" for nop or "1" for branch. The kprobes
code will then execute/simulate the correct instruction.

Instruction patching for kprobes and function tracer is always done
with stop_machine(). Therefore we don't have any races where an
instruction is patched concurrently on a different cpu.
Besides that also the program check handler which executes the function
trace caller instruction won't be executed concurrently to any
stop_machine() execution.

This allows to keep full fault based kprobes handling which generates
correct pt_regs contents automatically.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/ftrace: remove 31 bit ftrace support</title>
<updated>2014-10-09T07:14:18Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2014-10-07T13:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=53255c9a4dade6ff2162121430d13aaadb38a69c'/>
<id>urn:sha1:53255c9a4dade6ff2162121430d13aaadb38a69c</id>
<content type='text'>
31 bit and 64 bit diverge more and more and it is rather painful
to keep both parts running.
To make things simpler just remove the 31 bit support which nobody
uses anyway.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2014-06-13T04:29:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-13T04:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1fdb2d3389c5a1e7c559a37a4967c1d2580e75c'/>
<id>urn:sha1:c1fdb2d3389c5a1e7c559a37a4967c1d2580e75c</id>
<content type='text'>
Pull kbuild misc updates from Michal Marek:
 "This is the non-critical part of kbuild for v3.16-rc1:
   - make deb-pkg can do s390x and arm64
   - new patterns in scripts/tags.sh
   - scripts/tags.sh skips userspace tools' sources (which sometimes
     have copies of kernel structures) and symlinks
   - improvements to the objdiff tool
   - two new coccinelle patches
   - other minor fixes"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts: objdiff: support directories for the augument of record command
  scripts: objdiff: fix a comment
  scripts: objdiff: change the extension of disassembly from .o to .dis
  scripts: objdiff: improve path flexibility for record command
  scripts: objdiff: remove unnecessary code
  scripts: objdiff: direct error messages to stderr
  scripts: objdiff: get the path to .tmp_objdiff more simply
  deb-pkg: Add automatic support for s390x architecture
  coccicheck: Add unneeded return variable test
  kbuild: Fix a typo in documentation
  kbuild: trivial - use tabs for code indent where possible
  kbuild: trivial - remove trailing empty lines
  coccinelle: Check for missing NULL terminators in of_device_id tables
  scripts/tags.sh: ignore symlink'ed source files
  scripts/tags.sh: add regular expression replacement pattern for memcg
  builddeb: add arm64 in the supported architectures
  builddeb: use $OBJCOPY variable instead of objcopy
  scripts/tags.sh: ignore code of user space tools
  scripts/tags.sh: add pattern for DEFINE_HASHTABLE
  .gitignore: ignore Module.symvers in all directories
</content>
</entry>
<entry>
<title>kbuild: trivial - remove trailing empty lines</title>
<updated>2014-06-09T22:04:06Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-05-29T05:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7eb6e340526adf14ed7cf7dfde8b9c6fc0741cfc'/>
<id>urn:sha1:7eb6e340526adf14ed7cf7dfde8b9c6fc0741cfc</id>
<content type='text'>
Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
</entry>
</feed>
