GitHub PushEvent at 2014-11-11 02:30:09
Repository: hammerhead-5.0
Actor: engstk
Payload: {"shas":[["358d611d341680e00d44b26bd2e34c45fbf07e74","b913f13ef92ac157955c954ccaaff7be065faba4@arm.com","tracing/syscalls: Fix perf syscall tracing when syscall_nr == -1\n\nsyscall_get_nr can return -1 in the case that the task is not executing\na system call.\n\nThis patch fixes perf_syscall_{enter,exit} to check that the syscall\nnumber is valid before using it as an index into a bitmap.\n\nLink: http://lkml.kernel.org/r/1345137254-7377-1-git-send-email-will.deacon@arm.com\n\nChange-Id: Iedc719957e184c6572b3ad94e241ae2a97a0b533\nCc: Jason Baron <jbaron@redhat.com>\nCc: Wade Farnsworth <wade_farnsworth@mentor.com>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nSigned-off-by: Will Deacon <will.deacon@arm.com>\nSigned-off-by: Steven Rostedt <rostedt@goodmis.org>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Will Deacon",true],["0c66366820903900ccc1076aae3690d738d0c457","6bd3f43fd5b2b5689bccc97f6d09e3eb28307598@rab.in","tracing/syscalls: Ignore numbers outside NR_syscalls' range\n\nARM has some private syscalls (for example, set_tls(2)) which lie\noutside the range of NR_syscalls.  If any of these are called while\nsyscall tracing is being performed, out-of-bounds array access will\noccur in the ftrace and perf sys_{enter,exit} handlers.\n\n # trace-cmd record -e raw_syscalls:* true && trace-cmd report\n ...\n true-653   [000]   384.675777: sys_enter:            NR 192 (0, 1000, 3, 4000022, ffffffff, 0)\n true-653   [000]   384.675812: sys_exit:             NR 192 = 1995915264\n true-653   [000]   384.675971: sys_enter:            NR 983045 (76f74480, 76f74000, 76f74b28, 76f74480, 76f76f74, 1)\n true-653   [000]   384.675988: sys_exit:             NR 983045 = 0\n ...\n\n # trace-cmd record -e syscalls:* true\n [   17.289329] Unable to handle kernel paging request at virtual address aaaaaace\n [   17.289590] pgd = 9e71c000\n [   17.289696] [aaaaaace] *pgd=00000000\n [   17.289985] Internal error: Oops: 5 [#1] PREEMPT SMP ARM\n [   17.290169] Modules linked in:\n [   17.290391] CPU: 0 PID: 704 Comm: true Not tainted 3.18.0-rc2+ #21\n [   17.290585] task: 9f4dab00 ti: 9e710000 task.ti: 9e710000\n [   17.290747] PC is at ftrace_syscall_enter+0x48/0x1f8\n [   17.290866] LR is at syscall_trace_enter+0x124/0x184\n\nFix this by ignoring out-of-NR_syscalls-bounds syscall numbers.\n\nCommit cd0980fc8add \"tracing: Check invalid syscall nr while tracing syscalls\"\nadded the check for less than zero, but it should have also checked\nfor greater than NR_syscalls.\n\nLink: http://lkml.kernel.org/p/1414620418-29472-1-git-send-email-rabin@rab.in\n\nFixes: cd0980fc8add \"tracing: Check invalid syscall nr while tracing syscalls\"\nCc: stable@vger.kernel.org # 2.6.33+\nSigned-off-by: Rabin Vincent <rabin@rab.in>\nSigned-off-by: Steven Rostedt <rostedt@goodmis.org>\nSigned-off-by: engstk <eng.stk@sapo.pt>\n\nConflicts:\n\tkernel/trace/trace_syscalls.c\n\nChange-Id: I512142f8f1e1b2a8dc063209666dbce9737377e7\nSigned-off-by: engstk <eng.stk@sapo.pt>","Rabin Vincent",true],["f47131591797042601112143bd8e690f909fe796","30ac7e9d34cbeb0437860186ca5724301c19a274@android.com","cgroup: refactor allow_attach function into common code\n\nmove cpu_cgroup_allow_attach to a common subsys_cgroup_allow_attach.\nThis allows any process with CAP_SYS_NICE to move tasks across cgroups if\nthey use this function as their allow_attach handler.\n\nBug: 18260435\nChange-Id: I6bb4933d07e889d0dc39e33b4e71320c34a2c90f\nSigned-off-by: Rom Lemarchand <romlem@android.com>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Rom Lemarchand",true],["3052c4ff06c2f7a67ab0d1f22fa39a34b3a83ae0","fac732170a1579defe9e057a895426984dcd2793@google.com","jiffies: Fix timeval conversion to jiffies\n\ntimeval_to_jiffies tried to round a timeval up to an integral number\nof jiffies, but the logic for doing so was incorrect: intervals\ncorresponding to exactly N jiffies would become N+1. This manifested\nitself particularly repeatedly stopping/starting an itimer:\n\nsetitimer(ITIMER_PROF, &val, NULL);\nsetitimer(ITIMER_PROF, NULL, &val);\n\nwould add a full tick to val, _even if it was exactly representable in\nterms of jiffies_ (say, the result of a previous rounding.)  Doing\nthis repeatedly would cause unbounded growth in val.  So fix the math.\n\nHere's what was wrong with the conversion: we essentially computed\n(eliding seconds)\n\njiffies = usec  * (NSEC_PER_USEC/TICK_NSEC)\n\nby using scaling arithmetic, which took the best approximation of\nNSEC_PER_USEC/TICK_NSEC with denominator of 2^USEC_JIFFIE_SC =\nx/(2^USEC_JIFFIE_SC), and computed:\n\njiffies = (usec * x) >> USEC_JIFFIE_SC\n\nand rounded this calculation up in the intermediate form (since we\ncan't necessarily exactly represent TICK_NSEC in usec.) But the\nscaling arithmetic is a (very slight) *over*approximation of the true\nvalue; that is, instead of dividing by (1 usec/ 1 jiffie), we\neffectively divided by (1 usec/1 jiffie)-epsilon (rounding\ndown). This would normally be fine, but we want to round timeouts up,\nand we did so by adding 2^USEC_JIFFIE_SC - 1 before the shift; this\nwould be fine if our division was exact, but dividing this by the\nslightly smaller factor was equivalent to adding just _over_ 1 to the\nfinal result (instead of just _under_ 1, as desired.)\n\nIn particular, with HZ=1000, we consistently computed that 10000 usec\nwas 11 jiffies; the same was true for any exact multiple of\nTICK_NSEC.\n\nWe could possibly still round in the intermediate form, adding\nsomething less than 2^USEC_JIFFIE_SC - 1, but easier still is to\nconvert usec->nsec, round in nanoseconds, and then convert using\ntime*spec*_to_jiffies.  This adds one constant multiplication, and is\nnot observably slower in microbenchmarks on recent x86 hardware.\n\nTested: the following program:\n\nint main() {\n  struct itimerval zero = {{0, 0}, {0, 0}};\n  /* Initially set to 10 ms. */\n  struct itimerval initial = zero;\n  initial.it_interval.tv_usec = 10000;\n  setitimer(ITIMER_PROF, &initial, NULL);\n  /* Save and restore several times. */\n  for (size_t i = 0; i < 10; ++i) {\n    struct itimerval prev;\n    setitimer(ITIMER_PROF, &zero, &prev);\n    /* on old kernels, this goes up by TICK_USEC every iteration */\n    printf(\"previous value: %ld %ld %ld %ld\\n\",\n           prev.it_interval.tv_sec, prev.it_interval.tv_usec,\n           prev.it_value.tv_sec, prev.it_value.tv_usec);\n    setitimer(ITIMER_PROF, &prev, NULL);\n  }\n    return 0;\n}\n\nCc: stable@vger.kernel.org\nCc: Thomas Gleixner <tglx@linutronix.de>\nCc: Ingo Molnar <mingo@redhat.com>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Cochran <richardcochran@gmail.com>\nCc: Prarit Bhargava <prarit@redhat.com>\nReviewed-by: Paul Turner <pjt@google.com>\nReported-by: Aaron Jacobs <jacobsa@google.com>\nSigned-off-by: Andrew Hunter <ahh@google.com>\n[jstultz: Tweaked to apply to 3.17-rc]\nSigned-off-by: John Stultz <john.stultz@linaro.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\n\nSigned-off-by: engstk <eng.stk@sapo.pt>","Andrew Hunter",true],["649b3d4d2de3e251dcada875ab89d60077f7b74d","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","workqueue: reimplement work_on_cpu() using system_wq\n\nThe existing work_on_cpu() implementation is hugely inefficient.  It\ncreates a new kthread, execute that single function and then let the\nkthread die on each invocation.\n\nNow that system_wq can handle concurrent executions, there's no\nadvantage of doing this.  Reimplement work_on_cpu() using system_wq\nwhich makes it simpler and way more efficient.\n\nstable: While this isn't a fix in itself, it's needed to fix a\n        workqueue related bug in cpufreq/powernow-k8.  AFAICS, this\n        shouldn't break other existing users.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nAcked-by: Jiri Kosina <jkosina@suse.cz>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Bjorn Helgaas <bhelgaas@google.com>\nCc: Len Brown <lenb@kernel.org>\nCc: Rafael J. Wysocki <rjw@sisk.pl>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Tejun Heo",true],["34b752140cb7d7f5aa6e9a1c49e31573b5917ab1","546b05909706652891a87f7bfe385ae147f61f91@kernel.org","workqueue: add missing smp_wmb() in process_one_work()\n\nWORK_STRUCT_PENDING is used to claim ownership of a work item and\nprocess_one_work() releases it before starting execution.  When\nsomeone else grabs PENDING, all pre-release updates to the work item\nshould be visible and all updates made by the new owner should happen\nafterwards.\n\nGrabbing PENDING uses test_and_set_bit() and thus has a full barrier;\nhowever, clearing doesn't have a matching wmb.  Given the preceding\nspin_unlock and use of clear_bit, I don't believe this can be a\nproblem on an actual machine and there hasn't been any related report\nbut it still is theretically possible for clear_pending to permeate\nupwards and happen before work->entry update.\n\nAdd an explicit smp_wmb() before work_clear_pending().\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nCc: Oleg Nesterov <oleg@redhat.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Tejun Heo",true],["64b3283e51d347418827c96cce9c1cfbc9fac124","36c70fbf4b52b53dfac53874339f0dd2ccc58e23@suse.de","workqueue: exit rescuer_thread() as TASK_RUNNING\n\nA rescue thread exiting TASK_INTERRUPTIBLE can lead to a task scheduling\noff, never to be seen again.  In the case where this occurred, an exiting\nthread hit reiserfs homebrew conditional resched while holding a mutex,\nbringing the box to its knees.\n\nPID: 18105  TASK: ffff8807fd412180  CPU: 5   COMMAND: \"kdmflush\"\n #0 [ffff8808157e7670] schedule at ffffffff8143f489\n #1 [ffff8808157e77b8] reiserfs_get_block at ffffffffa038ab2d [reiserfs]\n #2 [ffff8808157e79a8] __block_write_begin at ffffffff8117fb14\n #3 [ffff8808157e7a98] reiserfs_write_begin at ffffffffa0388695 [reiserfs]\n #4 [ffff8808157e7ad8] generic_perform_write at ffffffff810ee9e2\n #5 [ffff8808157e7b58] generic_file_buffered_write at ffffffff810eeb41\n #6 [ffff8808157e7ba8] __generic_file_aio_write at ffffffff810f1a3a\n #7 [ffff8808157e7c58] generic_file_aio_write at ffffffff810f1c88\n #8 [ffff8808157e7cc8] do_sync_write at ffffffff8114f850\n #9 [ffff8808157e7dd8] do_acct_process at ffffffff810a268f\n    [exception RIP: kernel_thread_helper]\n    RIP: ffffffff8144a5c0  RSP: ffff8808157e7f58  RFLAGS: 00000202\n    RAX: 0000000000000000  RBX: 0000000000000000  RCX: 0000000000000000\n    RDX: 0000000000000000  RSI: ffffffff8107af60  RDI: ffff8803ee491d18\n    RBP: 0000000000000000   R8: 0000000000000000   R9: 0000000000000000\n    R10: 0000000000000000  R11: 0000000000000000  R12: 0000000000000000\n    R13: 0000000000000000  R14: 0000000000000000  R15: 0000000000000000\n    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018\n\nSigned-off-by: Mike Galbraith <mgalbraith@suse.de>\nSigned-off-by: Tejun Heo <tj@kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Mike Galbraith",true],["767bd08183b6db80ad35a538bd3b2bf31c9c80f5","d91a346a9a76eb1627d34d097d6cb4c8e5067100@gmail.com","workqueue: trivial fix for return statement in work_busy()\n\nReturn type of work_busy() is unsigned int.\nThere is return statement returning boolean value, 'false' in work_busy().\nIt is not problem, because 'false' may be treated '0'.\nHowever, fixing it would make code robust.\n\nSigned-off-by: Joonsoo Kim <js1304@gmail.com>\nSigned-off-by: Tejun Heo <tj@kernel.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\nSigned-off-by: engstk <eng.stk@sapo.pt>","Joonsoo Kim",true]],"size":8,"ref":"refs/heads/code_blue-l","head":"767bd08183b6db80ad35a538bd3b2bf31c9c80f5"}