Closed
Bug 1176456
Opened 10 years ago
Closed 10 years ago
Incorrect restore of ARM_ip in syscall_trace()
Categories
(Firefox OS Graveyard :: GonkIntegration, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tedd, Assigned: tedd)
Details
Attachments
(9 files)
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
60 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
66 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
66 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
66 bytes,
text/x-github-pull-request
|
seinlin
:
review+
kang
:
review+
jld
:
review+
|
Details | Review |
When a process is traced and resumed with ptrace(PTRACE_SYSCALL,...), the tracee process will crash with a segmentation fault because the instruction pointer is set to zero.
This is due to a bug inside the arm implementation of the syscall_trace function of the kernel. It is not present in the mainstream kernel, it was introduced during a backport (e.g. Linux 3.4 for nexus-5[1])
This bug prevents strace from working correctly and might affect other functionality that uses the syscall_trace function.
The fix is fairly simple, but multiple branches inside the forked[2] repository of the msm repo from codeaurora[3] and msm repo itself is affected. I will create pull requests to fix this issue as soon as I can.
[1] https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/475fc662ece6570851f3f3a3879145a0a7159a54
[2] https://github.com/mozilla-b2g/codeaurora_kernel_msm
[3] git://codeaurora.org/kernel/msm.git
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8625073 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8625074 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8625075 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8625076 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8625077 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8625242 -
Flags: review?(seinlin.maung+bugs)
Comment 7•10 years ago
|
||
Comment on attachment 8625073 [details] [review]
PR codeaurora_kernel_msm - b2g-msm-hammerhead-3.4-lollipop-release branch
Good catch. Thanks!
Attachment #8625073 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8625074 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8625075 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8625076 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8625077 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8625242 -
Flags: review?(seinlin.maung+bugs) → review+
Comment 8•10 years ago
|
||
Some devices use prebuilt kernel, such as Nexux 5 [1], the prebuilt one need to be updated accordingly.
[1] https://github.com/mozilla-b2g/device_lge_hammerhead-kernel/commit/8141110f671de1c399ab11d3f37a967c31930ac8
Assignee | ||
Comment 9•10 years ago
|
||
precompiled hammerhead kernel that includes fix from b2g-msm-hammerhead-3.4-kitkat-mr1 branch
Attachment #8627445 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 10•10 years ago
|
||
precompiled hammerhead kernel that includes fix from b2g-msm-hammerhead-3.4-lollipop-release branch
Assignee | ||
Updated•10 years ago
|
Attachment #8627446 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 11•10 years ago
|
||
precompiled hammerhead kernel that includes fix from b2g-msm-hammerhead-3.4-lollipop-mr1 branch
Attachment #8627447 -
Flags: review?(seinlin.maung+bugs)
Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Kai-Zhen Li [:kli][:seinlin] from comment #8)
> Some devices use prebuilt kernel, such as Nexux 5 [1], the prebuilt one need
> to be updated accordingly.
>
> [1]
> https://github.com/mozilla-b2g/device_lge_hammerhead-kernel/commit/
> 8141110f671de1c399ab11d3f37a967c31930ac8
I created some pull requests with an updated kernel image that was compiled with the fix from the other pull requests.
Assignee | ||
Updated•10 years ago
|
Summary: Incorrect saving of the instruction pointer in the syscall_trace function in arch/arm/kernel/ptrace.c → Incorrect restore of ARM_ip in syscall_trace()
Assignee | ||
Comment 13•10 years ago
|
||
hi diego, how can I upstream this fix to codeaurora?
As far as I can tell it doesn't have a direct impact on regular users, but it would allow developers to use strace on devices that are affected.
Flags: needinfo?(dwilson)
Updated•10 years ago
|
Attachment #8627445 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Attachment #8627446 -
Flags: review?(seinlin.maung+bugs) → review+
Comment 14•10 years ago
|
||
Comment on attachment 8627447 [details] [review]
PR device_lge_hammerhead-kernel - b2g-5.1.0_r1 branch
Thanks for the update.
Attachment #8627447 -
Flags: review?(seinlin.maung+bugs) → review+
Updated•10 years ago
|
Flags: needinfo?(dwilson) → needinfo?(ikumar)
Assignee | ||
Updated•10 years ago
|
Attachment #8625073 -
Flags: review?(jld)
Attachment #8625073 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8625074 -
Flags: review?(jld)
Attachment #8625074 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8625075 -
Flags: review?(jld)
Attachment #8625075 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8625076 -
Flags: review?(jld)
Attachment #8625076 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8625077 -
Flags: review?(jld)
Attachment #8625077 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8625242 -
Flags: review?(jld)
Attachment #8625242 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8627445 -
Flags: review?(jld)
Attachment #8627445 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8627446 -
Flags: review?(jld)
Attachment #8627446 -
Flags: review?(gdestuynder)
Assignee | ||
Updated•10 years ago
|
Attachment #8627447 -
Flags: review?(jld)
Attachment #8627447 -
Flags: review?(gdestuynder)
Assignee | ||
Comment 15•10 years ago
|
||
hey :kang, :jld can you give it a review please so that the patches can be merged?
I don't know if it makes sense for a review on a pre-built kernel, but if someone else should rather rebuild them with the gives changes, just mark them as obsolete.
Attachment #8625073 -
Flags: review?(gdestuynder) → review+
Attachment #8625074 -
Flags: review?(gdestuynder) → review+
Attachment #8625075 -
Flags: review?(gdestuynder) → review+
Attachment #8625076 -
Flags: review?(gdestuynder) → review+
Attachment #8625077 -
Flags: review?(gdestuynder) → review+
Attachment #8625242 -
Flags: review?(gdestuynder) → review+
Comment on attachment 8627445 [details] [review]
PR device_lge_hammerhead-kernel - b2g-4.4.2_r1 branch
Cant reproduce/verify binary easily but otherwise looks good
Attachment #8627445 -
Flags: review?(gdestuynder) → review+
Comment on attachment 8627446 [details] [review]
PR device_lge_hammerhead-kernel - b2g-5.0.0_r6 branch
same comment as previous attachment (binary)
Attachment #8627446 -
Flags: review?(gdestuynder) → review+
Comment on attachment 8627447 [details] [review]
PR device_lge_hammerhead-kernel - b2g-5.1.0_r1 branch
same comment as previous attachment (binary)
Attachment #8627447 -
Flags: review?(gdestuynder) → review+
Updated•10 years ago
|
Attachment #8625073 -
Flags: review?(jld) → review+
Updated•10 years ago
|
Attachment #8625074 -
Flags: review?(jld) → review+
Updated•10 years ago
|
Attachment #8625075 -
Flags: review?(jld) → review+
Updated•10 years ago
|
Attachment #8625076 -
Flags: review?(jld) → review+
Updated•10 years ago
|
Attachment #8625077 -
Flags: review?(jld) → review+
Updated•10 years ago
|
Attachment #8625242 -
Flags: review?(jld) → review+
Comment 19•10 years ago
|
||
Comment on attachment 8627445 [details] [review]
PR device_lge_hammerhead-kernel - b2g-4.4.2_r1 branch
I also haven't tried to inspect the binaries, but the commit looks good otherwise.
Attachment #8627445 -
Flags: review?(jld) → review+
Comment 20•10 years ago
|
||
Comment on attachment 8627446 [details] [review]
PR device_lge_hammerhead-kernel - b2g-5.0.0_r6 branch
(See above.)
Attachment #8627446 -
Flags: review?(jld) → review+
Comment 21•10 years ago
|
||
Comment on attachment 8627447 [details] [review]
PR device_lge_hammerhead-kernel - b2g-5.1.0_r1 branch
(See above.)
Attachment #8627447 -
Flags: review?(jld) → review+
Comment 22•10 years ago
|
||
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/68cd180df4a744540f69470d8084d57d15af3968
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/00797cece6e798c34238e4a09e89ad56262fffed
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/aa3382be96f47c6e15515e220ad90a287635f0f4
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/bfe6f81baf569313570dd03b866b7783d4b0e128
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/47aac20dbffea5874cbbbdc6556558855c38dce4
https://github.com/mozilla-b2g/codeaurora_kernel_msm/commit/a0ba1af24717a2b594656bb83e1fbdd7964662fb
https://github.com/mozilla-b2g/device_lge_hammerhead-kernel/commit/1852cd4b89f941eae7a893800ce1806b96b343fc
https://github.com/mozilla-b2g/device_lge_hammerhead-kernel/commit/9b26e183391876df9b5fcde018a3021e6bee8765
https://github.com/mozilla-b2g/device_lge_hammerhead-kernel/commit/8b3ffcfdd3d3852eca5488628f8bb2a08acbffa7
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•