Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499518 > unrolled thread

[PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount

Started bylizf@kernel.org
First post2016-10-12 14:40 +0200
Last post2016-10-13 03:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount lizf@kernel.org - 2016-10-12 14:40 +0200
    Re: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug  for nop_mcount Steven Rostedt <rostedt@goodmis.org> - 2016-10-12 15:20 +0200
      Re: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for  nop_mcount Zefan Li <lizefan@huawei.com> - 2016-10-13 03:10 +0200

#1499518 — [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount

Fromlizf@kernel.org
Date2016-10-12 14:40 +0200
Subject[PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount
Message-ID<srqZb-4nM-9@gated-at.bofh.it>
From: libin <huawei.libin@huawei.com>

3.4.113-rc1 review patch.  If anyone has any objections, please let me know.

------------------


commit c84da8b9ad3761eef43811181c7e896e9834b26b upstream.

In nop_mcount, shdr->sh_offset and welp->r_offset should handle
endianness properly, otherwise it will trigger Segmentation fault
if the recordmcount main and file.o have different endianness.

Link: http://lkml.kernel.org/r/563806C7.7070606@huawei.com

Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
---
 scripts/recordmcount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index 5e29610..799d734 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -375,7 +375,7 @@ static void nop_mcount(Elf_Shdr const *const relhdr,
 
 		if (mcountsym == Elf_r_sym(relp) && !is_fake_mcount(relp)) {
 			if (make_nop)
-				ret = make_nop((void *)ehdr, shdr->sh_offset + relp->r_offset);
+				ret = make_nop((void *)ehdr, _w(shdr->sh_offset) + _w(relp->r_offset));
 			if (warn_on_notrace_sect && !once) {
 				printf("Section %s has mcount callers being ignored\n",
 				       txtname);
-- 
1.9.1

[toc] | [next] | [standalone]


#1499663 — Re: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount

FromSteven Rostedt <rostedt@goodmis.org>
Date2016-10-12 15:20 +0200
SubjectRe: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount
Message-ID<srrBT-4SP-25@gated-at.bofh.it>
In reply to#1499518
Hi Li,

What is your plan for EOL of 3.4? I see on kernel.org that the EOL of
3.4 was suppose to be September 2016 (which has passed). I just gave a
talk yesterday saying it is no longer supported. But I appear to be
mistaken.

https://www.kernel.org/category/releases.html

-- Steve

[toc] | [prev] | [next] | [standalone]


#1499991 — Re: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount

FromZefan Li <lizefan@huawei.com>
Date2016-10-13 03:10 +0200
SubjectRe: [PATCH 3.4 007/125] recordmcount: Fix endianness handling bug for nop_mcount
Message-ID<srCGZ-4gp-9@gated-at.bofh.it>
In reply to#1499663
On 2016/10/12 21:10, Steven Rostedt wrote:
> Hi Li,
> 
> What is your plan for EOL of 3.4? I see on kernel.org that the EOL of
> 3.4 was suppose to be September 2016 (which has passed). I just gave a
> talk yesterday saying it is no longer supported. But I appear to be
> mistaken.
> 

I think I'll make ~2 more releases and stop the maintaining in early next
year.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web