From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34452 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754357AbdJIMtK (ORCPT ); Mon, 9 Oct 2017 08:49:10 -0400 Subject: Patch "mm: fix RODATA_TEST failure "rodata_test: test data was not read only"" has been added to the 4.13-stable tree To: christophe.leroy@c-s.fr, David.Laight@ACULAB.COM, akpm@linux-foundation.org, gregkh@linuxfoundation.org, jinb.park7@gmail.com, keescook@chromium.org, segher@kernel.crashing.org, torvalds@linux-foundation.org Cc: , From: Date: Mon, 09 Oct 2017 14:49:10 +0200 Message-ID: <1507553350176168@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From a872eb2131e91ce7c89a8888974a5e22a272b12f Mon Sep 17 00:00:00 2001 From: Christophe Leroy 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 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 Cc: Kees Cook Cc: Jinbum Park Cc: Segher Boessenkool Cc: David Laight Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- 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 #include -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