From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29D4FC433DB for ; Fri, 26 Mar 2021 12:00:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5E73619C2 for ; Fri, 26 Mar 2021 12:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbhCZL7i (ORCPT ); Fri, 26 Mar 2021 07:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbhCZL7Y (ORCPT ); Fri, 26 Mar 2021 07:59:24 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF8F4C0613AA; Fri, 26 Mar 2021 04:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Date:Message-ID:From:Cc:To; bh=ODyi+x2q4gI/U6RBuQU+2I+ka8es7su5UqCF06laDvM=; b=p0OGW44s7Cb6zYKrF3zXXy8/z/ upv45NZUhnq/eYaJA7WVEoUHTYp3CIe8HLiwg2JsOtrFguh0+jGF+A5ICjLuJE0AfDC2ef8ebW6aK 4gurKUzXPAugL49LVmzKj6AugL+WimiP8S1CfqIIwzmFJhM3y9wwXaRshqXDTkUahy20y/9Fq6hFK TQeYGIyJbxffqbD0Vy0TZ9tJYYP44fzKPAwgSz2iOBJkOLJ/8YDOpvnxujCMJzMG0Oi1CUtb7SRlw 147He/KObswPRRhzlreUfcX9cdanSrd/SQGHGbd8aT1TxP/YebxlxIFuK/DGIo2KoyRA0s/tSHRnD YUFUSx6L9i9hdjxtZdNIRW7wgSV1RqTF13xG70nm1iheDrgEoKqLE/FVXgi5n2U/SGyjDnJHGpiNi 9M5o1VO+Ovez2XUJNoSKV7wTviQK+/fysBvcen2IVCUOX7jsJOgAOzqV5L+6PS1YmxEYg82AWezIr YKoWitn2+4tffYEDDv6rtC3l; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1lPl7Y-0001uW-5S; Fri, 26 Mar 2021 11:59:20 +0000 To: Jens Axboe , Linus Torvalds , "Eric W. Biederman" Cc: io-uring , Linux Kernel Mailing List , Oleg Nesterov References: <20210325164343.807498-1-axboe@kernel.dk> <5563d244-52c0-dafb-5839-e84990340765@samba.org> <6a2c4fe3-a019-2744-2e17-34b6325967d7@kernel.dk> From: Stefan Metzmacher Subject: Re: [PATCH 0/2] Don't show PF_IO_WORKER in /proc//task/ Message-ID: <04b006fd-f3fa-bd92-9ab6-4e2341315cc2@samba.org> Date: Fri, 26 Mar 2021 12:59:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <6a2c4fe3-a019-2744-2e17-34b6325967d7@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Hi Jens, >> And /proc/$iothread/ should be read only and owned by root with >> "cmdline" and "exe" being empty. > > I know you brought this one up as part of your series, not sure I get > why you want it owned by root and read-only? cmdline and exe, yeah those > could be hidden, but is there really any point? > > Maybe I'm missing something here, if so, do clue me in! I looked through /proc and I think it's mostly similar to the unshare() case, if userspace wants to do stupid things like changing "comm" of iothreads, it gets what was asked for. But the "cmdline" hiding would be very useful. While most tools use "comm", by default. ps -eLf or 'iotop' use "cmdline". Some processes use setproctitle to change "cmdline" in order to identify the process better, without the 15 chars comm restriction, that's why I very often press 'c' in 'top' to see the cmdline, in that case it would be very helpful to see '[iou-wrk-1234]' instead of the seeing the cmdline. So I'd very much prefer if this could be applied: https://lore.kernel.org/io-uring/d4487f959c778d0b1d4c5738b75bcff17d21df5b.1616197787.git.metze@samba.org/T/#u If you want I can add a comment and a more verbose commit message... metze