[PATCH -mmotm] kptr_restrict: fix build when PRINTK not enabled

Previous thread: [GIT PULL] ocfs2 fixes for 2.6.37-rc7 by Joel Becker on Thursday, December 23, 2010 - 5:16 pm. (1 message)

Next thread: [tip:x86/numa] x86, numa: Reduce minimum fake node size to 32M by tip-bot for David Rientjes on Thursday, December 23, 2010 - 6:36 pm. (1 message)
From: akpm
Date: Thursday, December 23, 2010 - 5:58 pm

The mm-of-the-moment snapshot 2010-12-23-16-58 has been uploaded to

   http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

   git://zen-kernel.org/kernel/mmotm.git

It contains the following patches against ...
From: Andrew Morton
Date: Friday, December 24, 2010 - 6:04 am

Yes.  It's caused by skew between Linus's tree and linux-next.
--

From: Randy Dunlap
Date: Friday, December 24, 2010 - 10:52 am

From: Randy Dunlap <randy.dunlap@oracle.com>

#include <linux/printk.h> since that is where kptr_restrict is externed.

Put kptr_restrict inside #ifdef CONFIG_PRINTK block to fix build error
when CONFIG_PRINTK is not enabled:

kernel/sysctl.c:712: error: 'kptr_restrict' undeclared here (not in a function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
---
 kernel/sysctl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- mmotm-2010-1223-1658.orig/kernel/sysctl.c
+++ mmotm-2010-1223-1658/kernel/sysctl.c
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/sysctl.h>
 #include <linux/signal.h>
+#include <linux/printk.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
 #include <linux/ctype.h>
@@ -706,7 +707,6 @@ static struct ctl_table kern_table[] = {
 		.extra1		= &zero,
 		.extra2		= &one,
 	},
-#endif
 	{
 		.procname	= "kptr_restrict",
 		.data		= &kptr_restrict,
@@ -716,6 +716,7 @@ static struct ctl_table kern_table[] = {
 		.extra1		= &zero,
 		.extra2		= &two,
 	},
+#endif
 	{
 		.procname	= "ngroups_max",
 		.data		= &ngroups_max,



---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

From: Randy Dunlap
Date: Sunday, December 26, 2010 - 7:13 pm

drivers/memstick/core/mspro_block.c:1090: warning: format '%x' expects type 'unsigned int', but argument 7 has type 'size_t'

change "size %x" to "size %zx"

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

From: Jiri Slaby
Date: Tuesday, January 4, 2011 - 6:40 am

Hi, this kernel regresses with respect to suspend to ram in comparison
with mmotm 2010-12-16-14-56.

This is OK:
echo devices > /sys/power/pm_test
pm-suspend
This hangs at suspend phase:
echo platform > /sys/power/pm_test
pm-suspend

Note that this kernel is based on next-20101221. Should I try newer (and
clean) -next?

regards,
-- 
js
--

From: Jiri Slaby
Date: Tuesday, January 4, 2011 - 9:49 am

Ok, bisected down to:
16dc39c98a6ca56a27f22f7ac6731d8223237a2e is first bad commit
commit 16dc39c98a6ca56a27f22f7ac6731d8223237a2e
Author: Len Brown <len.brown@intel.com>
Date:   Thu Dec 16 23:12:23 2010 -0500

    ACPI: use ioremap_cache()

    Although the temporary boot-time ACPI table mappings
    were set up with CPU caching enabled, the permanent table
    mappings and AML run-time region memory accesses were
    set up with ioremap(), which on x86 is a synonym for
    ioremap_nocache().

    Changing this to ioremap_cache() improves performance as
    seen when accessing the tables via acpidump,
    or /sys/firmware/acpi/tables.  It should also improve
    AML run-time performance.

    No change on ia64.

    Reported-by: Jack Steiner <steiner@sgi.com>
96ccf2357f2ac4a31d19cc41f5728d9f87b6cac0 M      drivers

Revert of that patch fixes the problem.

regards,
-- 
js
--

From: Rafael J. Wysocki
Date: Tuesday, January 4, 2011 - 3:57 pm

Can you send a dmesg output and acpidump output from the failing system, please?

Rafael
--

Previous thread: [GIT PULL] ocfs2 fixes for 2.6.37-rc7 by Joel Becker on Thursday, December 23, 2010 - 5:16 pm. (1 message)

Next thread: [tip:x86/numa] x86, numa: Reduce minimum fake node size to 32M by tip-bot for David Rientjes on Thursday, December 23, 2010 - 6:36 pm. (1 message)