Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5528686yba; Mon, 13 May 2019 12:27:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyka+H5cY/cjV/fs6JmymDBqiGHBwYGw+2FGgDG9d56zyx88L/qVaCi/pbQpGH+fiXmtPz X-Received: by 2002:a63:682:: with SMTP id 124mr34191353pgg.243.1557775670355; Mon, 13 May 2019 12:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557775670; cv=none; d=google.com; s=arc-20160816; b=HNoggDg8Cp4Iba5XpV8JL5lI1mBx4WYqJHN+posUx+qkWNwKDwib8g0GfiMkZDwdaj wxbARQHe0tiIO08QMZXI4bCwfmfCQH4OuQdmDyGgNOYO+8gdFoVb+UThuqjJpNPAH858 gtC9Ie2cHJnF7AYuFiWdihSg2ptzg09M3tMjtHUHMlkvpNdtFy6H4itX33JB6X89tyl2 rxHPgghqiIhDE6zWiYoYE83lerInbqJx9jgFCewvL+tv8nLU+fOfDq2A6Vz0cQiZsVm0 84BLec11Np+7uuTDHTsMOfQY3xIl4IgyUN6g/HtCcQz/qXTSAQdkWguMM99zukI4uCGx OlKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0GOIAK8zHZiofzMwJlNPp9elh1TDYwHR7F0bAgbQV+E=; b=eR8XZsjsliWn0O8kH3t268FAoMsi9rPYjZDXM9Vh4COhTemapdiVRII8KVwGPu3tSb soZZkIn/s/SAzgLcusNf43ere7ZURIU9V0vV73ZA4GVv6jp0+QJx/pm8K2wd/14YEbde C8dNSHUEvf+bxcme5Yc1G7Q9gFXyBu87s+4yaWNynuipG/TymiDWp9Og5YylKym8zy7a rOZHzph8qkVkUGe5o9idqrQdFUQZuj5gZBwLPSfabE0MII7JkGjuVKue8WH05GNGjyg3 0Fgkdow4QUc7POLFzlSkDccyFm/OaKyDnoSl3WyOPkrAIZyp4FZgMTrinfNNeHYdT6i1 whiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si17296871plo.341.2019.05.13.12.27.27; Mon, 13 May 2019 12:27:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730570AbfEMQiT (ORCPT + 99 others); Mon, 13 May 2019 12:38:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40336 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729738AbfEMQiS (ORCPT ); Mon, 13 May 2019 12:38:18 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C7313001822; Mon, 13 May 2019 16:38:18 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.159]) by smtp.corp.redhat.com (Postfix) with SMTP id 7526160856; Mon, 13 May 2019 16:38:17 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 13 May 2019 18:38:16 +0200 (CEST) Date: Mon, 13 May 2019 18:38:14 +0200 From: Oleg Nesterov To: "Alex Xu (Hello71)" Cc: linux-kernel@vger.kernel.org, tj@kernel.org, guro@fb.com, kernel-team@fb.com Subject: Re: [REGRESSION] ptrace broken from "cgroup: cgroup v2 freezer" (76f969e) Message-ID: <20190513163814.GA31756@redhat.com> References: <1557709124.798rxdb4l3.astroid@alex-desktop.none> <20190513121703.GA24724@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513121703.GA24724@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 13 May 2019 16:38:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/13, Oleg Nesterov wrote: > > Probably we add leave_frozen(true) after freezable_schedule() for now, then > think try to make something better... And again, this is what I thought ptrace_stop() does, somehow I didn't notice that the last version doesn't have leave_frozen() in ptrace_stop(). Perhaps we can do a bit better, change only tracehook_report_syscall_entry() and PTRACE_EVENT_EXIT/SECCOMP paths to do leave_frozen() ? At first glance other callers look fine in that they can do nothing "interesting" befor get_signal(), but we need to re-check... Oleg. > But I am not sure I 100% understand whats going on in this case, could you > try the patch below? (Just in case, of course it is wrong). > > Oleg. > > --- x/kernel/signal.c > +++ x/kernel/signal.c > @@ -149,8 +149,7 @@ > { > if ((t->jobctl & (JOBCTL_PENDING_MASK | JOBCTL_TRAP_FREEZE)) || > PENDING(&t->pending, &t->blocked) || > - PENDING(&t->signal->shared_pending, &t->blocked) || > - cgroup_task_frozen(t)) { > + PENDING(&t->signal->shared_pending, &t->blocked) { > set_tsk_thread_flag(t, TIF_SIGPENDING); > return true; > } >