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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 3C2A1C433E0 for ; Sat, 20 Mar 2021 00:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB7C161982 for ; Sat, 20 Mar 2021 00:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbhCTABi (ORCPT ); Fri, 19 Mar 2021 20:01:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbhCTABS (ORCPT ); Fri, 19 Mar 2021 20:01:18 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12765C061760 for ; Fri, 19 Mar 2021 17:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-Id:Date:Cc:To:From; bh=I8/e2LSz/iZT2C/Twx5FSD5vKUDjCWsGcRorMTUpzvU=; b=EQdLGA3rg8IgMHYmh/F/GDzwYe WT1NpX1U0obJV6PeBknBIiWMeSEowYAxVFPPun3AZfUwfUlqUcrVUDAJyRGmIRfQyUnyFp3JmBGzN aVgp/fSbhwuMwcNIYqdx4byabmMdkmAKxCmbCaCyfeuJmKFqs2cSgWvHUnlrKSFA9cy22NFAdjZSm heihUp1QI19qz9fxqQJzlZsGhf5akW8+WTBBYcEossmmkrwjZxp+68Bprt7JDi34MT27briJAXgNz BDvrgd4PJlqxOFwQFRkq6QDWdRZLvIS5JHMsfGREShnNqW2gzE4NMxqODD6gGvr5GLZouVewmq6Pb T353z++0PlElPTJpd4vB/9i1P7AgkeIa0OhvChne/aATRXQF9c5q1em7aZIc33cHuyOp7EggDc9Mw QCKkRCJ2yjgvNe6LKElC2VsziuPiEuoYv9dA+6wvAorASr08WOww8ZPkezt48sqFYmF/djrstQJqs aHjNbyakw7rEvki/2BuiG0sa; 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 1lNP3M-0007XC-5W; Sat, 20 Mar 2021 00:01:16 +0000 From: Stefan Metzmacher To: io-uring@vger.kernel.org Cc: Stefan Metzmacher Subject: [PATCH v2 5/5] fs/proc: hide PF_IO_WORKER in get_task_cmdline() Date: Sat, 20 Mar 2021 01:00:31 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org We should not return the userspace cmdline for io_worker threads. Signed-off-by: Stefan Metzmacher --- fs/proc/base.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/proc/base.c b/fs/proc/base.c index 3851bfcdba56..6e04278de582 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -344,6 +344,9 @@ static ssize_t get_task_cmdline(struct task_struct *tsk, char __user *buf, struct mm_struct *mm; ssize_t ret; + if (tsk->flags & PF_IO_WORKER) + return 0; + mm = get_task_mm(tsk); if (!mm) return 0; -- 2.25.1