Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1343251pxb; Sun, 22 Aug 2021 13:56:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz++cDNrbq60jSI2Tlb2CZcKI/GlQdpyNabzuZVdiGtdGUqFBgmy1hNWvFSLyWqjpXbP/dR X-Received: by 2002:a17:906:f188:: with SMTP id gs8mr5016559ejb.207.1629665806665; Sun, 22 Aug 2021 13:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629665806; cv=none; d=google.com; s=arc-20160816; b=ElxhPu7xbUxrlB1Hy9J7J/eIJhIqp8a9v7ZBXmnWKeM5sWaNwG8rl5wjU5dt/ZElpD DAKSV4TDbq6GzJVAl3lkYWf/8JxpbPEb5NHjMi14U9A6Js75J5yRf+9ZLMIQh2G6kG36 +d3SiNplS1Pf6GMnyhUp8NVN25uY3PHYy6FWW44xP7nFt5lrCUy5nMei51uo+7Xu1Rpk bUNAPPZRLSmJRhg+M6tTH8zH+6yi0gjdoMeSUTYbrbuROGIjMLq/V775QHV6w3+/1YMB 1pTkGdW++8nNkFK4zzHu9urCunFNSe4a1vT7TjEyO3KEcU5CLTQHPvUhjIedi0uDuvW6 b8Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=aGOWWAnxAmst0SZejXE1yg4VhhJX9zYQIipoMVaSe5Q=; b=P7OqL828cljDCpegsLtJu+oKpaTgHsWBJ7ADOPMAE0KHLh6ON/6FRpwUGpSlch3vA0 AGblw57f+c+YaA0mzAuKX79WJxpSDKI41C5swm9iX2LFVJuRWLDw/qlQQVErT3PIuOpd 6Nu+QizujHEDnDDTqnvVEvXz69YCV5FSq/i2TxAlwSWvn0ql7qA2+AC0eX6qoySjoVAo uq3IVpFMTn49PlO3Lk1ovdREkCca12IHRo7JWdmZKwQaKTT9SgHlU/aAeEqf5BiVmp3G mNFvGLyHfSk1gaAyDVkxw3mjbjW1/69LntR15lvSG/vqYcH2AfVWfBYU2P+D+5VUSdeo c7/w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lh18si12360200ejb.379.2021.08.22.13.56.23; Sun, 22 Aug 2021 13:56:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232903AbhHVUzv (ORCPT + 99 others); Sun, 22 Aug 2021 16:55:51 -0400 Received: from cloud48395.mywhc.ca ([173.209.37.211]:44420 "EHLO cloud48395.mywhc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232799AbhHVUzu (ORCPT ); Sun, 22 Aug 2021 16:55:50 -0400 Received: from modemcable064.203-130-66.mc.videotron.ca ([66.130.203.64]:57988 helo=[192.168.1.179]) by cloud48395.mywhc.ca with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mHuUm-0001XV-30; Sun, 22 Aug 2021 16:55:08 -0400 Message-ID: Subject: Re: [PATCH] kernel: make TIF_NOTIFY_SIGNAL and core dumps co-exist From: Olivier Langlois To: Jens Axboe , Linus Torvalds Cc: LKML , "Eric W. Biederman" , Oleg Nesterov , Tony Battersby Date: Sun, 22 Aug 2021 16:55:06 -0400 In-Reply-To: <7fb2d8a6-951c-092c-ccaa-15522ae2ed01@kernel.dk> References: <76d3418c-e9ba-4392-858a-5da8028e3526@kernel.dk> <7fb2d8a6-951c-092c-ccaa-15522ae2ed01@kernel.dk> Organization: Trillion01 Inc Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud48395.mywhc.ca X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - trillion01.com X-Get-Message-Sender-Via: cloud48395.mywhc.ca: authenticated_id: olivier@trillion01.com X-Authenticated-Sender: cloud48395.mywhc.ca: olivier@trillion01.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-08-19 at 08:59 -0600, Jens Axboe wrote: > > You're absolutely right. On the io_uring side, in the current tree, > there's only one check where current != task being checked - and > that's > in the poll rewait arming. That one should likely just go away. It > may > be fine as it is, as it just pertains to ring exit cancelations. We > want > to ensure that we don't rearm poll requests if the process is > canceling > and going away. I'll take a closer look at that one. > > For this particular patch, I agree it's racy. I'll see if I can come > up > with something better... > I have finally found the patch that you wanted me to test. I'm going to do it ASAP despite still having issue. I do have a different approach to solve the same core dump issue. Feel free to consider it if this can avoid the race condition described here.