This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Improve ptrace-error detection on Linux targets
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 19 Aug 2019 17:33:27 +0300
- Subject: Re: [PATCH] Improve ptrace-error detection on Linux targets
- References: <20190819032918.3536-1-sergiodj@redhat.com>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Sun, 18 Aug 2019 23:29:18 -0400
>
> +@node Linux kernel @code{ptrace} restrictions
@-commands in node names are best avoided (here and elsewhere in your
patch).
> +The @code{ptrace} system call is used by @value{GDBN} to, among other
> +things, attach to a new or existing inferior in order to start
> +debugging it.
This sentence should mention Linux, otherwise it's too general.
> +we will expand on how this malfunction can manifest, and how to modify
^^^^^^^^
"manifest itself"
Also, I see no description of how these problems manifest themselves.
I suggest to show the respective error messages, and also index them,
so that interested readers could find this material quickly.
> +@cindex selinux, deny_ptrace
I suggest to add a @cindex entry for deny_ptrace itself, or maybe
switch the order:
@cindex deny_ptrace, SELinux
> +If you see anything other than @code{0}, @value{GDBN} can be affected
> +by it. You can temporarily disable the feature by doing:
> +
> +@smallexample
> +# sysctl kernel.yama.ptrace_scope=0
> +kernel.yama.ptrace_scope = 0
> +@end smallexample
I'm guessing this should be done as root, right? If so, I think we
should mention that.
Thanks.