stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mm: fix RODATA_TEST failure "rodata_test: test data was not read only"" has been added to the 4.13-stable tree
@ 2017-10-09 12:49 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-09 12:49 UTC (permalink / raw)
  To: christophe.leroy, David.Laight, akpm, gregkh, jinb.park7,
	keescook, segher, torvalds
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

to the 4.13-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:
     mm-fix-rodata_test-failure-rodata_test-test-data-was-not-read-only.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From a872eb2131e91ce7c89a8888974a5e22a272b12f Mon Sep 17 00:00:00 2001
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Tue, 3 Oct 2017 16:15:16 -0700
Subject: mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

From: Christophe Leroy <christophe.leroy@c-s.fr>

commit a872eb2131e91ce7c89a8888974a5e22a272b12f upstream.

On powerpc, RODATA_TEST fails with message the following messages:

  Freeing unused kernel memory: 528K
  rodata_test: test data was not read only

This is because GCC allocates it to .data section:

  c0695034 g     O .data	00000004 rodata_test_data

Since commit 056b9d8a7692 ("mm: remove rodata_test_data export, add
pr_fmt"), rodata_test_data is used only inside rodata_test.c By
declaring it static, it gets properly allocated into .rodata section
instead of .data:

  c04df710 l     O .rodata	00000004 rodata_test_data

Fixes: 056b9d8a7692 ("mm: remove rodata_test_data export, add pr_fmt")
Link: http://lkml.kernel.org/r/20170921093729.1080368AC1@po15668-vm-win7.idsi0.si.c-s.fr
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Kees Cook <keescook@chromium.org>
Cc: Jinbum Park <jinb.park7@gmail.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/rodata_test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/rodata_test.c
+++ b/mm/rodata_test.c
@@ -14,7 +14,7 @@
 #include <linux/uaccess.h>
 #include <asm/sections.h>
 
-const int rodata_test_data = 0xC3;
+static const int rodata_test_data = 0xC3;
 
 void rodata_test(void)
 {


Patches currently in stable-queue which might be from christophe.leroy@c-s.fr are

queue-4.13/mm-fix-rodata_test-failure-rodata_test-test-data-was-not-read-only.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-09 12:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 12:49 Patch "mm: fix RODATA_TEST failure "rodata_test: test data was not read only"" has been added to the 4.13-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).