Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8667855imu; Tue, 4 Dec 2018 12:07:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/UIcKz8qms0XXojHMLxnKUyAyQ9ABU+FV6OLKGFhAFjRr11HW8ngepUiaohxl8itLM51n72 X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr21712168plb.55.1543954027090; Tue, 04 Dec 2018 12:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543954027; cv=none; d=google.com; s=arc-20160816; b=UksmW0OVyn5IckTCvQn51A/UNq6RQMnUyRnUNhrAP3O81EPH4krNQj3LnTYxDok1Xk CLL5wFpu7blUWetlVFWHiQ4LqqRqQ/Hij5xit2UkJNqmSAjSQSOTb86Ak8auc/5KG18B Hj65jLEdaabbvwA0zyGkgsExQtiPdLnVFFbtIXVzXpzjV5mWWdyH3s43xRAr+59iezhN b6XJ16LgKyhJHrWIKgGYcxJcrKGZ3GJayDolMHqcQ0PTfmC7Krxnnm+Rtll/pFcMer2A LrEvXYYln3wv+zden+eDG4HlVWW2loxAFgiw+82/6LV/5O31VEhjV1e+XnDWbfDSfeEy Ix7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Fi4+SGIYWWC6wVW6RjL32xj392zypfY7lB8sb2fwmyQ=; b=Dm14IXBRQLCnndJ/vgWz5WuSOABoUI6v6cBOiOjocfRm3EipDP2u3zufGwX2flEoTH rwhOlriZ6Cw6uMEeJq5zj84CF+tBHnNX4TG3kJ9MaGJH9Ea6wGsS9qI6p1vOihqTGY0r ojcHnu+AjKg9kIJx/gIdJeaysqH5pCTZw36l8WJoka8MIqPo3wXFyIscD7Euc/kXDCvF lJ1QxZrV94uOFRFzZJYHW65Bn3FkFDTRb9mTKzIYTG4dH5PMvwtX/0C861m4yv+MydVJ HtzSBwPZxpPIO41flSJ2uGsQHuhFg3bOPo6SB3zE0suAmYYgzu973YZliQikhUZcbfnf 4NXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fjaXNvuK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si19166161plo.102.2018.12.04.12.06.50; Tue, 04 Dec 2018 12:07:07 -0800 (PST) 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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fjaXNvuK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725961AbeLDUGG (ORCPT + 99 others); Tue, 4 Dec 2018 15:06:06 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:44092 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbeLDUGG (ORCPT ); Tue, 4 Dec 2018 15:06:06 -0500 Received: by mail-lj1-f194.google.com with SMTP id k19-v6so16082096lji.11 for ; Tue, 04 Dec 2018 12:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fi4+SGIYWWC6wVW6RjL32xj392zypfY7lB8sb2fwmyQ=; b=fjaXNvuK5hIOoiS4zWx8TcdFXIEkHI1vk2seKVJ4VVEG0qI6DThU+dwpU2LsLwuIuS L6afqK+K1RV4QvegELSu0G9kQnWTFF6uVdT42S6GXC4oDapd0nmG7YblGyYhBGIGNATv p3omYgn+YIydjVU1kdFH/cfqa/DJpYIftkAsI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fi4+SGIYWWC6wVW6RjL32xj392zypfY7lB8sb2fwmyQ=; b=KJx5Hm1tru/vhqP8JZzQ2yiKtk4qxHRb32TZmKpDVXp6Fstd8f1j75ZN28ZIofNW2Q q8TxkmNiN024hGm4O66NBAqgsQPnte+Q7ZLlhNPIbAvEIE8ABUUPCerlEYQ9g+dWAwQ+ L1cFRZoqEJfOIEsWlsVqkG578I1F99NgGnoDJ9RlhupJn8fns1QwGwcOdbBloJC8O6Pa Xd6n4VAfkj1S1eSDqM1VVnhD+XfqB7tV3IVR2IaYVzxHQ1xdBKS3RtSYcXz3x8zVtHKu /5TXwny1Q1TOczHiPQNdyHJBC96ZDY5pX2QW7CXVmoadAy5+ysMOMX8PChIMe/oC8bYu lTYA== X-Gm-Message-State: AA+aEWYYQ9yWAdy683R+eD7KMmPPvDO6ASqveWzY2uG4WDxxfPMRjco4 t5ZKjOBy4GSgglNgnNIHhGf6vcPYBYA= X-Received: by 2002:a2e:94ce:: with SMTP id r14-v6mr13864638ljh.34.1543953963393; Tue, 04 Dec 2018 12:06:03 -0800 (PST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id m21sm3172622lfl.97.2018.12.04.12.06.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 12:06:02 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id v5so12925342lfe.7 for ; Tue, 04 Dec 2018 12:06:02 -0800 (PST) X-Received: by 2002:a19:6e0b:: with SMTP id j11mr13339696lfc.124.1543953960739; Tue, 04 Dec 2018 12:06:00 -0800 (PST) MIME-Version: 1.0 References: <20181203123857.GS31738@dhcp22.suse.cz> <20181203131006.GA10054@amd> <20181203135351.GU31738@dhcp22.suse.cz> <20181203141459.GA14789@amd> <20181203141737.GY31738@dhcp22.suse.cz> <20181204090228.GC73770@gmail.com> <20181204091020.GD1286@dhcp22.suse.cz> <20181204093310.GE73770@gmail.com> <20181204095802.GF1286@dhcp22.suse.cz> <20181204181714.GR1286@dhcp22.suse.cz> In-Reply-To: From: Linus Torvalds Date: Tue, 4 Dec 2018 12:05:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "exec: make de_thread() freezable (was: Re: Linux 4.20-rc4) To: mhocko@kernel.org Cc: Ingo Molnar , pavel@ucw.cz, Oleg Nesterov , Linux List Kernel Mailing , rafael.j.wysocki@intel.com, chanho.min@lge.com, Thomas Gleixner , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 11:49 AM Linus Torvalds wrote: > > because honestly, the *only* reason we hold on to that lock is for the > insane and not really interesting case of "somebody tried to use > ptrace to change the creds in-flight during the exec". No, sorry, me confused. Not somebody trying to change them, it's just ptrace_attach() trying to change _our_ state during this sequence, and relying on it all being atomic. So taking a ref is unnecessary and pointless. It's not the creds that change, it's that we really want to delay ptrace_attach(). We could maybe set that "we're busy now" flag, and have ptrace_attach() do something like if (task_is_busy(task)) { sched_yield(); return -ERESTARTSYS; } or something like that. Linus