From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5957533121E for ; Tue, 11 Nov 2025 13:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762866785; cv=none; b=fStAm7ZcxisDG8JSv3qvIbWpXrLhMYiQCiLrt2/c6sQLPG8tjw1UX2GmtXzE1VL+biksD6JjIxm7ieqnmoyDGMCrmjzmKwirSSEA7sEMmQWIvB+QcY9vyvZtrO8685kSR3IdP7MIkTCKSEsFntUWdkO0etcahDsiJHwEyB5ffDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762866785; c=relaxed/simple; bh=ZQiYZa+UMJ28kPPzr7A5LUc/D3pE1z5z0fBFkzoygMc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=skX9j2Fgo49ns4RUho7m3Bn6RjEumRZHmXYsBS2CCpMa17Mg07tCXS+9+D60XLB9h7NL2tpcqKcime1P4Lfp1IGZW5Cm4I26JJNdiAwaozhY/RZ1fKF/e6uAcvqp0I0b3v2ee7rYnbJS+QnYBvW7OAvflaVKt5VnMcHLd7aHQGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bhK/Urp5; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bhK/Urp5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762866783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZQiYZa+UMJ28kPPzr7A5LUc/D3pE1z5z0fBFkzoygMc=; b=bhK/Urp5HJF7LNICVKVEYMWAgN15B8/DkiwKtOtREir0Edki99/7j7MOmmMnVXXtpEN2kk Xk3SwozFeNVOXzvdDocDMLY/d6AdiQ6bUHf5c2eSR1EQ25koc2Vi8nNnqQx4m1ddXzba0d HE7aDwBXAHIbwyJtcdSiohDWsOFrBDs= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-9-RmVw9LOWG7O6AoUjelsw-1; Tue, 11 Nov 2025 08:12:59 -0500 X-MC-Unique: 9-RmVw9LOWG7O6AoUjelsw-1 X-Mimecast-MFC-AGG-ID: 9-RmVw9LOWG7O6AoUjelsw_1762866773 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 440D51956061; Tue, 11 Nov 2025 13:12:50 +0000 (UTC) Received: from fedora (unknown [10.44.33.58]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 6E9631800872; Tue, 11 Nov 2025 13:12:30 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 11 Nov 2025 14:12:49 +0100 (CET) Date: Tue, 11 Nov 2025 14:12:28 +0100 From: Oleg Nesterov To: Bernd Edlinger Cc: Christian Brauner , Alexander Viro , Alexey Dobriyan , Kees Cook , Andy Lutomirski , Will Drewry , Andrew Morton , Michal Hocko , Serge Hallyn , James Morris , Randy Dunlap , Suren Baghdasaryan , Yafang Shao , Helge Deller , "Eric W. Biederman" , Adrian Reber , Thomas Gleixner , Jens Axboe , Alexei Starovoitov , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, tiozhang , Luis Chamberlain , "Paulo Alcantara (SUSE)" , Sergey Senozhatsky , Frederic Weisbecker , YueHaibing , Paul Moore , Aleksa Sarai , Stefan Roesch , Chao Yu , xu xin , Jeff Layton , Jan Kara , David Hildenbrand , Dave Chinner , Shuah Khan , Elena Reshetova , David Windsor , Mateusz Guzik , Ard Biesheuvel , "Joel Fernandes (Google)" , "Matthew Wilcox (Oracle)" , Hans Liljestrand , Penglei Jiang , Lorenzo Stoakes , Adrian Ratiu , Ingo Molnar , "Peter Zijlstra (Intel)" , Cyrill Gorcunov , Eric Dumazet Subject: Re: [PATCH v17] exec: Fix dead-lock in de_thread with ptrace_attach Message-ID: References: <20251105143210.GA25535@redhat.com> <20251111-ankreiden-augen-eadcf9bbdfaa@brauner> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 11/11, Bernd Edlinger wrote: > > On 11/11/25 10:21, Christian Brauner wrote: > > On Wed, Nov 05, 2025 at 03:32:10PM +0100, Oleg Nesterov wrote: > >> > >> This is the most problematic change which I can't review... > >> > >> Firstly, it changes task->mm/real_cred for __ptrace_may_access() and this > >> looks dangerous to me. > > > > Yeah, that is not ok. This is effectively override_creds for real_cred > > and that is not a pattern I want to see us establish at all! Temporary > > credential overrides for the subjective credentials is already terrible > > but at least we have the explicit split between real_cred and cred > > expressely for that. So no, that's not an acceptable solution. > > > > Well when this is absolutely not acceptable then I would have to change > all security engines to be aware of the current and the new credentials. Hmm... even if we find another way to avoid the deadlock? Say, the patches I sent... Oleg.