Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp713951pxf; Thu, 1 Apr 2021 11:34:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2yYrooDeqfNSW/Xabj7z/zzLLD9r7J9ixvm9p0Vugtl/kx7AH9F5aEQrUI3Z0nA+zM+1+ X-Received: by 2002:a6b:fa09:: with SMTP id p9mr7721685ioh.14.1617302059688; Thu, 01 Apr 2021 11:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617302059; cv=none; d=google.com; s=arc-20160816; b=ALoayfudrntjNb2uEO7Sbp+wZCJUCi26n4N2oMR6PtEaHVmmYyDP1rWSpiMzWrL3rY hiXr7FssUbxCxSYiK0hKDzP4mJWMWcCsmF7FbsNuwizKIx6dpioxX/+FJJsQYGHQ0S5M a2l+/VixTM+xz++0iAp4NmIoU/AUAQAvhz6E5+98mP1MnllhwykHIVhsdmHiLbE6Q1Nq W6gH8g5aFg0OZH33u3L5t8MeQ4Er2u2nrBvWxsZ5kwujKE/sfFyYzPKOPXz6VyVGykcM aCXC/Ms1iGFxE3xRwpyE7tDcm+minrct6R3dqTeXM1RgQvM6ZHr7VWI9CblL6sBFiMMR rKRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject :references:cc:to:from:dkim-signature; bh=JAhe/kVm5RlUfIXG3d28OFe9fHKwCAi5mQmsyoLxPQk=; b=WYdh6dWyElFXEI+Xhuelene4BixdnencliM9NQ4soWnE3XmL3shL7LYtWk+63ya2cF h0/KBzz4uTc3fx0WXr7ydirR8I1vEU9qiyx9SwYuCNdaGRZ0tFdMW1ZJ0uj8bxwtdNxx QgmBzmTVv98TPnW7TI+xRI5qTGWt50i5+AcPj+o8sEouC0N0cI+xBdd+IdGK9/IikLAG yLCGQQ/2qhvqnyXGYXHsBasFpd53MYAAXLRSaCvx4+chiD4skLgyLjmQxEJUZR2MLWB6 En7b0xkZ42/M5LQGsEmfoyLFy73ymlqQV7d137IpAKfPqGrL2oMRnLh6+AlYx68I/2X+ 1oWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=prNxZCHu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si5135622jaq.124.2021.04.01.11.34.06; Thu, 01 Apr 2021 11:34:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=prNxZCHu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237082AbhDAScw (ORCPT + 99 others); Thu, 1 Apr 2021 14:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234637AbhDASKo (ORCPT ); Thu, 1 Apr 2021 14:10:44 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC4AC0045E5; Thu, 1 Apr 2021 07:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Date:Message-ID:Cc:To:From; bh=JAhe/kVm5RlUfIXG3d28OFe9fHKwCAi5mQmsyoLxPQk=; b=prNxZCHuW5yBFgVGyBtP7FZl4l /i+wo8cszkl1eQcXFS8t1iFq4e/yeYB0FlNrahfI0TurKnHnUchJL7hg9wfdtbG6FuepdJeXMM7D6 P+wGzfeHC+x02J86iR2X3CZBW20tKeXm9iqnz03yHppaXw9M4b0B40DEBpKzih3T9t0/vhHUSyriJ J1Z3ldi794ZY0fVOq7Ng8XOHjDMt5HMO9stJ+lOVy45okLBR8wKNvfwYUThF79KJXONxnY+Vo3043 8TZseI1m+LKS/aTRjoe2rb7XSBwNWoSlRGDY0ihz4ZmezR6TCc/zhytUWr5xllkNYYpfM4cLJY7lc qgFr6ikJu8UVp5biNZFOBrKk0AOIqjfFmaCNNJfaxyxWdBxl2u17aC4R+SNJZy0Fa+cj6XflOa9TD VcBuXp1MBLleFc5ECSAjGyDf9GYRo1vX2K1GOMY9/JhWv5LcwRQRiotrnkItYwD1mo+5T1a1Az12v nVd/7Zyy58F1QHU3RckVGznJ; 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 1lRyUy-0007Kf-A6; Thu, 01 Apr 2021 14:40:40 +0000 From: Stefan Metzmacher 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> <04b006fd-f3fa-bd92-9ab6-4e2341315cc2@samba.org> Subject: Re: [PATCH 0/2] Don't show PF_IO_WORKER in /proc//task/ Message-ID: Date: Thu, 1 Apr 2021 16:40:31 +0200 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: <04b006fd-f3fa-bd92-9ab6-4e2341315cc2@samba.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, >> 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... I noticed that 'iotop' actually appends ' [iou-wrk-1234]' to the cmdline value, so that leaves us with 'ps -eLf' and 'top' (with 'c'). pstree -a -t -p is also fine: │ └─io_uring-cp,1315 /root/kernel/linux-image-5.12.0-rc2+-dbg_5.12.0-rc2+-5_amd64.deb file │ ├─{iou-mgr-1315},1316 │ ├─{iou-wrk-1315},1317 │ ├─{iou-wrk-1315},1318 │ ├─{iou-wrk-1315},1319 │ ├─{iou-wrk-1315},1320 In the spirit of "avoid special PF_IO_WORKER checks" I guess it's ok to leave of as is... metze