{"push_id":679726788,"size":4,"distinct_size":4,"ref":"refs/heads/master","head":"1531f9404daf81b75774b9a2c49ee3e75d0449e1","before":"cce80f206c37b7871b28c72b5270e36df11ebaf3","commits":[{"sha":"dd10477771dc8ac98c1595ac5b73ec2e568bbf98","author":{"email":"feca23b3ae4a60fef538f28252c4665e4a95e740@parrot.com","name":"Ivan Djelic"},"message":"ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations\n\nRecent GCC versions (e.g. GCC-4.7.2) perform optimizations based on\nassumptions about the implementation of memset and similar functions.\nThe current ARM optimized memset code does not return the value of\nits first argument, as is usually expected from standard implementations.\n\nFor instance in the following function:\n\nvoid debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)\n{\n\tmemset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));\n\twaiter->magic = waiter;\n\tINIT_LIST_HEAD(&waiter->list);\n}\n\ncompiled as:\n\n800554d0 <debug_mutex_lock_common>:\n800554d0:       e92d4008        push    {r3, lr}\n800554d4:       e1a00001        mov     r0, r1\n800554d8:       e3a02010        mov     r2, #16 ; 0x10\n800554dc:       e3a01011        mov     r1, #17 ; 0x11\n800554e0:       eb04426e        bl      80165ea0 <memset>\n800554e4:       e1a03000        mov     r3, r0\n800554e8:       e583000c        str     r0, [r3, #12]\n800554ec:       e5830000        str     r0, [r3]\n800554f0:       e5830004        str     r0, [r3, #4]\n800554f4:       e8bd8008        pop     {r3, pc}\n\nGCC assumes memset returns the value of pointer 'waiter' in register r0; causing\nregister/memory corruptions.\n\nThis patch fixes the return value of the assembly version of memset.\nIt adds a 'mov' instruction and merges an additional load+store into\nexisting load/store instructions.\nFor ease of review, here is a breakdown of the patch into 4 simple steps:\n\nStep 1\n======\nPerform the following substitutions:\nip -> r8, then\nr0 -> ip,\nand insert 'mov ip, r0' as the first statement of the function.\nAt this point, we have a memset() implementation returning the proper result,\nbut corrupting r8 on some paths (the ones that were using ip).\n\nStep 2\n======\nMake sure r8 is saved and restored when (! CALGN(1)+0) == 1:\n\nsave r8:\n-       str     lr, [sp, #-4]!\n+       stmfd   sp!, {r8, lr}\n\nand restore r8 on both exit paths:\n-       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.\n+       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.\n(...)\n        tst     r2, #16\n        stmneia ip!, {r1, r3, r8, lr}\n-       ldr     lr, [sp], #4\n+       ldmfd   sp!, {r8, lr}\n\nStep 3\n======\nMake sure r8 is saved and restored when (! CALGN(1)+0) == 0:\n\nsave r8:\n-       stmfd   sp!, {r4-r7, lr}\n+       stmfd   sp!, {r4-r8, lr}\n\nand restore r8 on both exit paths:\n        bgt     3b\n-       ldmeqfd sp!, {r4-r7, pc}\n+       ldmeqfd sp!, {r4-r8, pc}\n(...)\n        tst     r2, #16\n        stmneia ip!, {r4-r7}\n-       ldmfd   sp!, {r4-r7, lr}\n+       ldmfd   sp!, {r4-r8, lr}\n\nStep 4\n======\nRewrite register list \"r4-r7, r8\" as \"r4-r8\".\n\nSigned-off-by: Ivan Djelic <ivan.djelic@parrot.com>\nReviewed-by: Nicolas Pitre <nico@linaro.org>\nSigned-off-by: Dirk Behme <dirk.behme@gmail.com>\nSigned-off-by: Russell King <rmk+kernel@arm.linux.org.uk>\nSigned-off-by: PNDGE <markj338@gmail.com>","distinct":true,"url":"https://api.github.com/repos/jtpoo3/Kangaroo-m7/commits/dd10477771dc8ac98c1595ac5b73ec2e568bbf98"},{"sha":"98d8ff4a2246b91d96509ea39a749fdc46fbc4f2","author":{"email":"408789a210b05fb3b46935e815320d62ba00a06e@linaro.org","name":"Nicolas Pitre"},"message":"ARM: 7670/1: fix the memset fix\n\nCommit 455bd4c430b0 (\"ARM: 7668/1: fix memset-related crashes caused by\nrecent GCC (4.7.2) optimizations\") attempted to fix a compliance issue\nwith the memset return value.  However the memset itself became broken\nby that patch for misaligned pointers.\n\nThis fixes the above by branching over the entry code from the\nmisaligned fixup code to avoid reloading the original pointer.\n\nAlso, because the function entry alignment is wrong in the Thumb mode\ncompilation, that fixup code is moved to the end.\n\nWhile at it, the entry instructions are slightly reworked to help dual\nissue pipelines.\n\nSigned-off-by: Nicolas Pitre <nico@linaro.org>\nTested-by: Alexander Holler <holler@ahsoftware.de>\nSigned-off-by: Russell King <rmk+kernel@arm.linux.org.uk>\nSigned-off-by: PNDGE <markj338@gmail.com>","distinct":true,"url":"https://api.github.com/repos/jtpoo3/Kangaroo-m7/commits/98d8ff4a2246b91d96509ea39a749fdc46fbc4f2"},{"sha":"87e92dcecd9bdf3006739bce18d19626eedb1a6a","author":{"email":"3fb360b964bf23e8080fd2972e2df37c8762ce5a@gmail.com","name":"Poondog"},"message":"BUILD: remove the GCC wrapper\n\nSigned-off-by: Poondog <markj338@gmail.com>\nSigned-off-by: PNDGE <markj338@gmail.com>","distinct":true,"url":"https://api.github.com/repos/jtpoo3/Kangaroo-m7/commits/87e92dcecd9bdf3006739bce18d19626eedb1a6a"},{"sha":"1531f9404daf81b75774b9a2c49ee3e75d0449e1","author":{"email":"f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de","name":"Arnd Bergmann"},"message":"ARM: 7743/1: compressed/head.S: work around new binutils warning\n\ncommit da94a829305f1c217cfdf6771cb1faca0917e3b9 upstream.\n\nIn August 2012, Matthew Gretton-Dann checked a change into binutils\nlabelled \"Error on obsolete & warn on deprecated registers\", apparently as\npart of ARMv8 support. Apparently, this was supposed to emit the message\n\"Warning: This coprocessor register access is deprecated in ARMv8\" when\nusing certain mcr/mrc instructions and building for ARMv8. Unfortunately,\nthe message that is actually emitted appears to be '(null)', which is\nless helpful in comparison.\n\nEven more unfortunately, this is biting us on every single kernel\nbuild with a new gas, because arch/arm/boot/compressed/head.S and some\nother files in that directory are built with -march=all since kernel\ncommit 80cec14a8 \"[ARM] Add -march=all to assembly file build in\narch/arm/boot/compressed\" back in v2.6.28.\n\nThis patch reverts Russell's nice solution and instead marks the head.S\nfile to be built for armv7-a, which fortunately lets us build all\ninstructions in that file without warnings even on the broken binutils.\n\nWithout this patch, building anything results in:\n\narch/arm/boot/compressed/head.S: Assembler messages:\narch/arm/boot/compressed/head.S:565: Warning: (null)\narch/arm/boot/compressed/head.S:676: Warning: (null)\narch/arm/boot/compressed/head.S:698: Warning: (null)\narch/arm/boot/compressed/head.S:722: Warning: (null)\narch/arm/boot/compressed/head.S:726: Warning: (null)\narch/arm/boot/compressed/head.S:957: Warning: (null)\narch/arm/boot/compressed/head.S:996: Warning: (null)\narch/arm/boot/compressed/head.S:997: Warning: (null)\narch/arm/boot/compressed/head.S:1027: Warning: (null)\narch/arm/boot/compressed/head.S:1035: Warning: (null)\narch/arm/boot/compressed/head.S:1046: Warning: (null)\narch/arm/boot/compressed/head.S:1060: Warning: (null)\narch/arm/boot/compressed/head.S:1092: Warning: (null)\narch/arm/boot/compressed/head.S:1094: Warning: (null)\narch/arm/boot/compressed/head.S:1095: Warning: (null)\narch/arm/boot/compressed/head.S:1102: Warning: (null)\narch/arm/boot/compressed/head.S:1134: Warning: (null)\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\nCc: stable@vger.kernel.org\nCc: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>\nSigned-off-by: Russell King <rmk+kernel@arm.linux.org.uk>\n[ccross: cherry-picked to 3.4]\nChange-Id: If1c4c1a9f3f721a45d9833f2a36f1b7ce58c5e9a\nSigned-off-by: Colin Cross <ccross@android.com>\nSigned-off-by: PNDGE <markj338@gmail.com>","distinct":true,"url":"https://api.github.com/repos/jtpoo3/Kangaroo-m7/commits/1531f9404daf81b75774b9a2c49ee3e75d0449e1"}]}