Patch "recordmcount: Fix endianness handling bug for nop_mcount" has been added to the 3.10-stable tree
This is a note to let you know that I've just added the patch titled
recordmcount: Fix endianness handling bug for nop_mcount
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
recordmcount-fix-endianness-handling-bug-for-nop_mcount.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c84da8b9ad3761eef43811181c7e896e9834b26bMon Sep 17 00:00:00 2001
From: libin <[email protected]>
Date: Tue, 3 Nov 2015 08:58:47 +0800
Subject: recordmcount: Fix endianness handling bug for nop_mcount
From: libin <[email protected]>
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.
--- scripts/recordmcount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/recordmcount.h +1 -1
@@ -377,7 +377,7 @@ static void nop_mcount(Elf_Shdr const *cif (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);
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/recordmcount-fix-endianness-handling-bug-for-nop_mcount.patch