Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3244982lfo; Sun, 22 May 2022 23:43:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKenqXr70Hph9Iw/0KsLWS5MRUZb7epYbINPSKAuZMl60aq306RQqFozyeCnwxwWAZXHnT X-Received: by 2002:aa7:83c2:0:b0:505:723f:6ace with SMTP id j2-20020aa783c2000000b00505723f6acemr22016630pfn.86.1653288195358; Sun, 22 May 2022 23:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653288195; cv=none; d=google.com; s=arc-20160816; b=GMFJoTTKyF4VHNQp3WDnaSnaVbA/pNd9mPbeqVmzLrHi86XV4H4PunkRfmFDuOg48r IfvcN6CuDgfT4Ua2JcnE4ID+9d2vHrmMyefGN+cXtvMfyl12vmvh5+PYihDPdiM5YDjb uqOHMDFo2q//aTaX0+l5XbrBblYVlsN1kLZtoezi4NrPN3Dl4xMEKhjjp8N1A9iDBWVU aCxgaesDmTjWakiXAFi6P6u/wUQ04YcbpSIniB3qINL8WvfAC0z6i+AzccD8j6zDKJBk FSs4EXrpHn9fMu7y/haRxmHBHOLZ0LGjtu1LFRUHXmvA1Cpd/3CPBQTCxEfXw/PMdH1t mGpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+HsuQmVX1S4/poujuFgWOoQhM5djyPUzLhLRMnoVmU0=; b=GO7GnVFangmai/TRBH0CHBXSptLBMk965nWLOqv9SKDEtLCrO8egayl+urqm4ooMw9 llwCCP0N9Cy0owBPMme7dZAn+7x6d9f2bM2Kcn62zklWG+dqNblNZDueqPwy5ERbbGUV jhKqpE1H6sP9/mhNA4F2PHIa37lGO8MpGeEg6XikWyDtoUGEkoWQRz9XzA17sTN1gZCS MYzE8Cse6GxVAuw3Lz2rSarummb4r1IcSzninVEKK0ro/LLcuqVvLlvFBggIzZhh90xl PjR1k3McxyJ0hCSJ8QMJTHFaFVuIA+myVMbqE/lkGsZAu1xosa89nEF5IPZMul9mNEyj Rb5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="WSpYMVc/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z36-20020a630a64000000b003f64566e163si9424434pgk.164.2022.05.22.23.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="WSpYMVc/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 390B850022; Sun, 22 May 2022 23:15:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347362AbiETXCD (ORCPT + 99 others); Fri, 20 May 2022 19:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbiETXCB (ORCPT ); Fri, 20 May 2022 19:02:01 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C34190D08 for ; Fri, 20 May 2022 16:01:59 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id p26so12474381eds.5 for ; Fri, 20 May 2022 16:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+HsuQmVX1S4/poujuFgWOoQhM5djyPUzLhLRMnoVmU0=; b=WSpYMVc/Q7WW7i0Fu/ChH1mchkvzMg6Mes0wXDmuC6zGVDOfUJQAViLFA2BaYaFBah k6QsRec5MtSCjtc+dBuR9CtFl6XLttX0gbCESKpVkiMHL96chB+r4ZA2ZOQzAK7CLjfs fTmIMYFaK6diUvnDNDbkpv3yK9R7TWvcybT+k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+HsuQmVX1S4/poujuFgWOoQhM5djyPUzLhLRMnoVmU0=; b=fpccVCxM24Bcc6CniIITkFmq2d3jt1JCLgiv5Zj0IHkmrWOAqaRVQRbanDzEjqkfEd r/lQe7q1v8+AjsU3s9nm7sENpcgMT4zBaDXLU6yFOSrfaPGeTE+D/4VqkbtpE+e6YA8h IfUSykRCy0Xj6Zfqt5rgpb69zDp8U7/EeI+mMfDlAmjCoJ7pApwOCHl5sKJlpTXhneVK 8sxFsCplayvflngn1eYp+0ilo/+Bd+y9bszKtzoPvJmf2VA6cFe9NBKwiQG+DYIbLI7j hGXgi8tqpVHSyynpi+Ui+ZhG88MDc9qIAsGjnb+5wzkXoE1Jn7ntpUh6KUcec2p5a5wa x/Ow== X-Gm-Message-State: AOAM531HErPyCjdDLcK2+8sY2jttGJojKEzjT29PCoUv/8cFC1VYE1UO 5OPtslS1UaaPIiyxwrhKvORQ9YGVG2Q/ne9GbEc= X-Received: by 2002:aa7:ca44:0:b0:42a:cd1e:ac6f with SMTP id j4-20020aa7ca44000000b0042acd1eac6fmr13156739edt.328.1653087717811; Fri, 20 May 2022 16:01:57 -0700 (PDT) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com. [209.85.221.43]) by smtp.gmail.com with ESMTPSA id 15-20020a170906004f00b006f3ef214dd9sm3160133ejg.63.2022.05.20.16.01.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 16:01:57 -0700 (PDT) Received: by mail-wr1-f43.google.com with SMTP id m20so2131376wrb.13 for ; Fri, 20 May 2022 16:01:56 -0700 (PDT) X-Received: by 2002:a5d:5009:0:b0:20d:846:f4da with SMTP id e9-20020a5d5009000000b0020d0846f4damr10145504wrt.301.1653087716219; Fri, 20 May 2022 16:01:56 -0700 (PDT) MIME-Version: 1.0 References: <871qwq5ucx.fsf_-_@email.froward.int.ebiederm.org> <20220518225355.784371-3-ebiederm@xmission.com> <8735h52ief.fsf@email.froward.int.ebiederm.org> In-Reply-To: <8735h52ief.fsf@email.froward.int.ebiederm.org> From: Doug Anderson Date: Fri, 20 May 2022 16:01:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 03/16] kdb: Use real_parent when displaying a list of processes To: "Eric W. Biederman" Cc: LKML , "Rafael J. Wysocki" , Oleg Nesterov , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Mel Gorman , Sebastian Andrzej Siewior , Will Deacon , Tejun Heo , Linux PM , Peter Zijlstra , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Kees Cook , Jann Horn , linux-ia64@vger.kernel.org, Robert OCallahan , Kyle Huey , Richard Henderson , Ivan Kokshaysky , Matt Turner , Jason Wessel , Daniel Thompson , Douglas Miller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, May 19, 2022 at 4:49 PM Eric W. Biederman wrote: > > Doug Anderson writes: > > > Hi, > > > > On Wed, May 18, 2022 at 3:54 PM Eric W. Biederman wrote: > >> > >> kdb has a bug that when using the ps command to display a list of > >> processes, if a process is being debugged the debugger as the parent > >> process. > >> > >> This is silly, and I expect it never comes up in ptractice. As there > >> is very little point in using gdb and kdb simultaneously. Update the > >> code to use real_parent so that it is clear kdb does not want to > >> display a debugger as the parent of a process. > > > > So I would tend to defer to Daniel, but I'm not convinced that the > > behavior you describe for kdb today _is_ actually silly. > > > > If I was in kdb and I was listing processes, I might actually want to > > see that a process's parent was set to gdb. Presumably that would tell > > me extra information that might be relevant to my debug session. > > > > Personally, I'd rather add an extra piece of information into the list > > showing the real parent if it's not the same as the parent. Then > > you're not throwing away information. > > The name of the field is confusing for anyone who isn't intimate with > the implementation details. The function getppid returns > tsk->real_parent->tgid. > > If kdb wants information of what the tracer is that is fine, but I > recommend putting that information in another field. > > Given that the original description says give the information that ps > gives my sense is that kdb is currently wrong. Especially as it does > not give you the actual parentage anywhere. > > I can certainly be convinced, but I do want some clarity. It looks very > attractive to rename task->parent to task->ptracer and leave the field > NULL when there is no tracer. Fair enough. You can consider my objection rescinded. Presumably, though, you're hoping for an Ack for your patch and you plan to take it with the rest of the series. That's going to need to come from Daniel anyway as he is the actual maintainer. I'm just the peanut gallery. ;-) -Doug