Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp773339pxf; Thu, 25 Mar 2021 13:46:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7L6ENyQKZHXwhsXGfFYeoIWszGPUfK68MHjsUaBT5RPCmat9LO+CXlLzapx6b++t3Nn4t X-Received: by 2002:a17:906:f9d8:: with SMTP id lj24mr11687540ejb.200.1616705172095; Thu, 25 Mar 2021 13:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616705172; cv=none; d=google.com; s=arc-20160816; b=saS+9g/EhKCDsmgYtunTR/BvcCX14FrKuos0pdGN+Tyk39wyMTtXxqqHW2+C2SS77F r6DW9QCA6+HWfqyxiqts9F/NU37FHBAfobjPLrMYIr6anhgxCyap4nrEITZ0/JageAlI JIsSqxw5stcBEKWoSRG858+a8o7FEplSuvLt3/CSris5V2O7wUlAlTquRXtY9eMo0gU/ DKGyq3ODWSQ7S8hUpYmayzuws2Z6vQ1dKRr0FyhmxAyWt+O+tMXv7SxU9a2Qz1YEk7+Y qUtWuuqqhQzFrmD5EzXamEwWVpMmygo8UjnGNr82et3BksHFjXI8lAcGcMQZ5DcwxhOL kxTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:mime-version:user-agent:message-id :in-reply-to:date:references:cc:to:from; bh=izlne6ZbThLlmd8x/oL9ywJtAXlvIcqeXWVlRePjwTc=; b=IUCYYcRL3ofDtr72+df8UbQG4DoqalmKCq5AFrlgO3zKGmO/fWtVghATE1Zf138aBO V+TAZfN2ZQ6S9AUNsflz8zXtcPLB+RweJksd8bVx6SZ6W3Yx3nxmHz9pvW6EPvMgiTdp RIGoa+mjrjzP0tRkBCxSCDZ1Ml8hn1Tc6mPtMJ21YSgXTbTUV30GO+y1NpwaAOUHvxXe mPt0w1/tonPQ5dgW6594FvuDPqzJu2E+Tn4Qwz3Bhklq725iZxL4YjzZ3mKj1Ak/bIFV rwv2IhBOO9fAGpudtmU/FwYIr0WSSnzP/K14L7i1zq0KSPnVZeQXiCYMisGxIglj6A3l JxJA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si5127090edv.113.2021.03.25.13.45.49; Thu, 25 Mar 2021 13:46:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230316AbhCYUoy (ORCPT + 99 others); Thu, 25 Mar 2021 16:44:54 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:39202 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhCYUog (ORCPT ); Thu, 25 Mar 2021 16:44:36 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lPWqJ-008Loq-8p; Thu, 25 Mar 2021 14:44:35 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=fess.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lPWqI-007kcD-2u; Thu, 25 Mar 2021 14:44:34 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Jens Axboe , io-uring , Linux Kernel Mailing List , Oleg Nesterov , Stefan Metzmacher References: <20210325164343.807498-1-axboe@kernel.dk> Date: Thu, 25 Mar 2021 15:43:34 -0500 In-Reply-To: (Linus Torvalds's message of "Thu, 25 Mar 2021 13:12:42 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lPWqI-007kcD-2u;;;mid=;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/f0dVqJdZlHqDKLajsEoUgpwHpwtu/hxw= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa07.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, T_TooManySym_02,T_TooManySym_03,T_TooManySym_04,XMNoVowels,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_04 7+ unique symbols in subject * 0.0 T_TooManySym_03 6+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 612 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 12 (2.0%), b_tie_ro: 10 (1.7%), parse: 1.32 (0.2%), extract_message_metadata: 16 (2.6%), get_uri_detail_list: 1.88 (0.3%), tests_pri_-1000: 15 (2.5%), tests_pri_-950: 1.27 (0.2%), tests_pri_-900: 1.07 (0.2%), tests_pri_-90: 330 (54.0%), check_bayes: 328 (53.7%), b_tokenize: 8 (1.3%), b_tok_get_all: 7 (1.1%), b_comp_prob: 3.3 (0.5%), b_tok_touch_all: 306 (50.0%), b_finish: 1.04 (0.2%), tests_pri_0: 220 (35.9%), check_dkim_signature: 0.60 (0.1%), check_dkim_adsp: 2.7 (0.4%), poll_dns_idle: 0.55 (0.1%), tests_pri_10: 2.1 (0.3%), tests_pri_500: 9 (1.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 0/2] Don't show PF_IO_WORKER in /proc//task/ X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Thu, Mar 25, 2021 at 12:42 PM Linus Torvalds > wrote: >> >> On Thu, Mar 25, 2021 at 12:38 PM Linus Torvalds >> wrote: >> > >> > I don't know what the gdb logic is, but maybe there's some other >> > option that makes gdb not react to them? >> >> .. maybe we could have a different name for them under the task/ >> subdirectory, for example (not just the pid)? Although that probably >> messes up 'ps' too.. > > Actually, maybe the right model is to simply make all the io threads > take signals, and get rid of all the special cases. > > Sure, the signals will never be delivered to user space, but if we > > - just made the thread loop do "get_signal()" when there are pending signals > > - allowed ptrace_attach on them > > they'd look pretty much like regular threads that just never do the > user-space part of signal handling. > > The whole "signals are very special for IO threads" thing has caused > so many problems, that maybe the solution is simply to _not_ make them > special? The special case in check_kill_permission is certainly unnecessary. Having the signal blocked is enough to prevent signal_pending() from being true. The most straight forward thing I can see is to allow ptrace_attach and to modify ptrace_check_attach to always return -ESRCH for io workers unless ignore_state is set causing none of the other ptrace operations to work. That is what a long running in-kernel thread would do today so user-space aka gdb may actually cope with it. We might be able to support if io workers start supporting SIGSTOP but I am not at all certain. Eric