2011-04-21 02:37:42

by Steven Rostedt

[permalink] [raw]
Subject: [RFC][PATCH 04/11] ftrace/recordmcount: Modify only executable sections

From: Steven Rostedt <[email protected]>

PROGBITS is not enough to determine if the section should be modified
or not. Only process sections that are marked as executable.

Cc: John Reiser <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
scripts/recordmcount.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index ac7b330..7f8d5c4 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -360,6 +360,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */
succeed_file();
}
if (w(txthdr->sh_type) != SHT_PROGBITS ||
+ !(w(txthdr->sh_flags) & SHF_EXECINSTR) ||
!is_mcounted_section_name(txtname))
return NULL;
return txtname;
--
1.7.2.3


2011-05-18 18:32:47

by Steven Rostedt

[permalink] [raw]
Subject: [tip:perf/core] ftrace/recordmcount: Modify only executable sections

Commit-ID: 8abd5724a7f1631ab2276954156c629d4d17149a
Gitweb: http://git.kernel.org/tip/8abd5724a7f1631ab2276954156c629d4d17149a
Author: Steven Rostedt <[email protected]>
AuthorDate: Wed, 13 Apr 2011 13:31:08 -0400
Committer: Steven Rostedt <[email protected]>
CommitDate: Mon, 16 May 2011 14:42:56 -0400

ftrace/recordmcount: Modify only executable sections

PROGBITS is not enough to determine if the section should be modified
or not. Only process sections that are marked as executable.

Cc: John Reiser <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
---
scripts/recordmcount.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index ac7b330..7f8d5c4 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -360,6 +360,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */
succeed_file();
}
if (w(txthdr->sh_type) != SHT_PROGBITS ||
+ !(w(txthdr->sh_flags) & SHF_EXECINSTR) ||
!is_mcounted_section_name(txtname))
return NULL;
return txtname;

2011-06-16 14:05:44

by Steven Rostedt

[permalink] [raw]
Subject: [tip:perf/core] ftrace/recordmcount: Modify only executable sections

Commit-ID: df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563
Gitweb: http://git.kernel.org/tip/df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563
Author: Steven Rostedt <[email protected]>
AuthorDate: Wed, 13 Apr 2011 13:31:08 -0400
Committer: Steven Rostedt <[email protected]>
CommitDate: Tue, 17 May 2011 10:41:39 -0400

ftrace/recordmcount: Modify only executable sections

PROGBITS is not enough to determine if the section should be modified
or not. Only process sections that are marked as executable.

Cc: John Reiser <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
---
scripts/recordmcount.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index ac7b330..7f8d5c4 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -360,6 +360,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */
succeed_file();
}
if (w(txthdr->sh_type) != SHT_PROGBITS ||
+ !(w(txthdr->sh_flags) & SHF_EXECINSTR) ||
!is_mcounted_section_name(txtname))
return NULL;
return txtname;