From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88461 invoked by alias); 19 Aug 2019 14:33:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88452 invoked by uid 89); 19 Aug 2019 14:33:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:142, H*r:sk:RSA_AES X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 14:33:29 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hziit-0003Tt-IP; Mon, 19 Aug 2019 10:33:27 -0400 Received: from [176.228.60.248] (port=4578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hziis-0005B2-Gq; Mon, 19 Aug 2019 10:33:27 -0400 Date: Mon, 19 Aug 2019 14:33:00 -0000 Message-Id: <835zmtmdhk.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior CC: gdb-patches@sourceware.org In-reply-to: <20190819032918.3536-1-sergiodj@redhat.com> (message from Sergio Durigan Junior on Sun, 18 Aug 2019 23:29:18 -0400) Subject: Re: [PATCH] Improve ptrace-error detection on Linux targets References: <20190819032918.3536-1-sergiodj@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00410.txt.bz2 > From: Sergio Durigan Junior > Cc: Sergio Durigan Junior > 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.