Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4046)

Issue 166001: Allow Linux dumper to work on PTRACE-hardened kernels (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 8 months ago by Ted Mielczarek
Modified:
13 years, 8 months ago
CC:
google-breakpad-dev_googlegroups.com
Visibility:
Public.

Description

This patch is from Chris Coulson <chris.coulson@canonical.com>. While working on
enabling crash reporting for Ubuntu's Firefox builds, he found that Ubuntu's
PTRACE-hardened kernel was preventing Linux dumping from functioning, since it
relies on clone()ing a child process and then dumping the parent from there.
This patch uses prctl to indicate that the child is permitted to dump the
parent.

See
https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#PTRACE%20Protection
for details about the kernel modifications.

Patch Set 1 #

Total comments: 5

Patch Set 2 : Updated patch #

Total comments: 4

Patch Set 3 : Updated patch #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/client/linux/handler/exception_handler.cc View 1 2 4 chunks +60 lines, -0 lines 0 comments Download
M src/client/linux/handler/exception_handler.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 7
Ted Mielczarek
13 years, 8 months ago #1
mochalatte
http://breakpad.appspot.com/166001/diff/1/2 File src/client/linux/handler/exception_handler.cc (right): http://breakpad.appspot.com/166001/diff/1/2#newcode356 Line 356: static const char str = 'a'; please name ...
13 years, 8 months ago #2
evan
+markus FYI
13 years, 8 months ago #3
Chris Coulson
Thanks for the review. On 2010/08/24 20:38:13, mochalatte wrote: > http://breakpad.appspot.com/166001/diff/1/2 > File src/client/linux/handler/exception_handler.cc (right): ...
13 years, 8 months ago #4
mochalatte
http://breakpad.appspot.com/166001/diff/1/3 File src/client/linux/handler/exception_handler.h (right): http://breakpad.appspot.com/166001/diff/1/3#newcode228 Line 228: }; missed this file - please add comment ...
13 years, 8 months ago #5
Chris Coulson
On 2010/08/25 15:25:46, mochalatte wrote: > http://breakpad.appspot.com/166001/diff/1/3 > File src/client/linux/handler/exception_handler.h (right): > > http://breakpad.appspot.com/166001/diff/1/3#newcode228 > ...
13 years, 8 months ago #6
mochalatte
13 years, 8 months ago #7
just some nits...otherwise LGTM..thanks for the patch!

sorry to keep harassing you on some details..this stuff just ends up being such
a pain to debug when it fails, so having extra logging & reusing our existing
macros helps a great deal.

http://breakpad.appspot.com/166001/diff/5001/6001
File src/client/linux/handler/exception_handler.cc (right):

http://breakpad.appspot.com/166001/diff/5001/6001#newcode375
Line 375: static const char no_pipe_msg[] = "ExceptionHandler::GenerateDump
sys_pipe failed:";
80 col limit

http://breakpad.appspot.com/166001/diff/5001/6001#newcode415
Line 415: do {
sorry i should have mentioned this in my last review, but we have a macro to do
system call restarts:

http://www.google.com/codesearch/p?hl=en#I3UcDWKuRYs/trunk/src/common/linux/e...

http://breakpad.appspot.com/166001/diff/5001/6001#newcode417
Line 417: } while (r == -1 && errno == EINTR);
can you add logging indicating if errno != EINTR ? that way in situations where
a dump was failed to be generated we can at least see that it was because this
write failed for some random reason

http://breakpad.appspot.com/166001/diff/5001/6001#newcode427
Line 427: } while (r == -1 && errno == EINTR);
same log comment
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted