GitHub PushEvent at 2014-07-12 19:50:10
Repository: kernel_lge_geeb
Actor: slimgerrit
Payload: {"shas":[["89d7579a9f131b17c5372735a37c6a2d0e0401d5","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","futex: Add another early deadlock detection check\n\ncommit 866293ee54227584ffcb4a42f69c1f365974ba7f upstream.\n\nDave Jones trinity syscall fuzzer exposed an issue in the deadlock\ndetection code of rtmutex:\n  http://lkml.kernel.org/r/20140429151655.GA14277@redhat.com\n\nThat underlying issue has been fixed with a patch to the rtmutex code,\nbut the futex code must not call into rtmutex in that case because\n    - it can detect that issue early\n    - it avoids a different and more complex fixup for backing out\n\nIf the user space variable got manipulated to 0x80000000 which means\nno lock holder, but the waiters bit set and an active pi_state in the\nkernel is found we can figure out the recursive locking issue by\nlooking at the pi_state owner. If that is the current task, then we\ncan safely return -EDEADLK.\n\nThe check should have been added in commit 59fa62451 (futex: Handle\nfutex_pi OWNER_DIED take over correctly) already, but I did not see\nthe above issue caused by user space manipulation back then.\n\nChange-Id: I7c36da1d212f4c5115731432c5d0ed9898fbbb11\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Dave Jones <davej@redhat.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Darren Hart <darren@dvhart.com>\nCc: Davidlohr Bueso <davidlohr@hp.com>\nCc: Steven Rostedt <rostedt@goodmis.org>\nCc: Clark Williams <williams@redhat.com>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Lai Jiangshan <laijs@cn.fujitsu.com>\nCc: Roland McGrath <roland@hack.frob.com>\nCc: Carlos ODonell <carlos@redhat.com>\nCc: Jakub Jelinek <jakub@redhat.com>\nCc: Michael Kerrisk <mtk.manpages@gmail.com>\nCc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>\nLink: http://lkml.kernel.org/r/20140512201701.097349971@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","Thomas Gleixner",true],["21783c4f63511b862c4d5d5abb05ee38d1e54008","00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","futex: Prevent attaching to kernel threads\n\ncommit f0d71b3dcb8332f7971b5f2363632573e6d9486a upstream.\n\nWe happily allow userspace to declare a random kernel thread to be the\nowner of a user space PI futex.\n\nFound while analysing the fallout of Dave Jones syscall fuzzer.\n\nWe also should validate the thread group for private futexes and find\nsome fast way to validate whether the \"alleged\" owner has RW access on\nthe file which backs the SHM, but that's a separate issue.\n\nChange-Id: I562e7f88c70d0436a5e948e3da333b75fb643116\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Dave Jones <davej@redhat.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Darren Hart <darren@dvhart.com>\nCc: Davidlohr Bueso <davidlohr@hp.com>\nCc: Steven Rostedt <rostedt@goodmis.org>\nCc: Clark Williams <williams@redhat.com>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Lai Jiangshan <laijs@cn.fujitsu.com>\nCc: Roland McGrath <roland@hack.frob.com>\nCc: Carlos ODonell <carlos@redhat.com>\nCc: Jakub Jelinek <jakub@redhat.com>\nCc: Michael Kerrisk <mtk.manpages@gmail.com>\nCc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>\nLink: http://lkml.kernel.org/r/20140512201701.194824402@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","Thomas Gleixner",true],["b8174f05e314c86fe56b78b81fc748e71f50960d","43232e92d70cc7aa53504ad0397085ee47bad87f@goodmis.org","ftrace/module: Hardcode ftrace_module_init() call into load_module()\n\ncommit a949ae560a511fe4e3adf48fa44fefded93e5c2b upstream.\n\nA race exists between module loading and enabling of function tracer.\n\n\tCPU 1\t\t\t\tCPU 2\n\t-----\t\t\t\t-----\n  load_module()\n   module->state = MODULE_STATE_COMING\n\n\t\t\t\tregister_ftrace_function()\n\t\t\t\t mutex_lock(&ftrace_lock);\n\t\t\t\t ftrace_startup()\n\t\t\t\t  update_ftrace_function();\n\t\t\t\t   ftrace_arch_code_modify_prepare()\n\t\t\t\t    set_all_module_text_rw();\n\t\t\t\t   <enables-ftrace>\n\t\t\t\t    ftrace_arch_code_modify_post_process()\n\t\t\t\t     set_all_module_text_ro();\n\n\t\t\t\t[ here all module text is set to RO,\n\t\t\t\t  including the module that is\n\t\t\t\t  loading!! ]\n\n   blocking_notifier_call_chain(MODULE_STATE_COMING);\n    ftrace_init_module()\n\n     [ tries to modify code, but it's RO, and fails!\n       ftrace_bug() is called]\n\nWhen this race happens, ftrace_bug() will produces a nasty warning and\nall of the function tracing features will be disabled until reboot.\n\nThe simple solution is to treate module load the same way the core\nkernel is treated at boot. To hardcode the ftrace function modification\nof converting calls to mcount into nops. This is done in init/main.c\nthere's no reason it could not be done in load_module(). This gives\na better control of the changes and doesn't tie the state of the\nmodule to its notifiers as much. Ftrace is special, it needs to be\ntreated as such.\n\nThe reason this would work, is that the ftrace_module_init() would be\ncalled while the module is in MODULE_STATE_UNFORMED, which is ignored\nby the set_all_module_text_ro() call.\n\nLink: http://lkml.kernel.org/r/1395637826-3312-1-git-send-email-indou.takao@jp.fujitsu.com\n\nChange-Id: Idf537f0c23f0f8cbfc9be5f334bcb3e74f0a148c\nReported-by: Takao Indoh <indou.takao@jp.fujitsu.com>\nAcked-by: Rusty Russell <rusty@rustcorp.com.au>\nSigned-off-by: Steven Rostedt <rostedt@goodmis.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","Steven Rostedt (Red Hat)",true],["b70d8dcab13ff7f2de2e291e37553d172334c727","19974166ec0341cb94129a1a2de0d28592ea093e@gmail.com","Merge \"futex: Add another early deadlock detection check\" into kk4.4","Andrew Cardinal",true],["bcf9e08ad6c864d72a0ef6ac1dbd1c06edb8e260","19974166ec0341cb94129a1a2de0d28592ea093e@gmail.com","Merge \"futex: Prevent attaching to kernel threads\" into kk4.4","Andrew Cardinal",true],["d92d96e64a05c5c13825eea6f6a139e78baf0689","19974166ec0341cb94129a1a2de0d28592ea093e@gmail.com","Merge \"ftrace/module: Hardcode ftrace_module_init() call into load_module()\" into kk4.4","Andrew Cardinal",true]],"size":6,"ref":"refs/heads/kk4.4","head":"d92d96e64a05c5c13825eea6f6a139e78baf0689"}