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.133.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 1917322836C for ; Sun, 9 Nov 2025 17:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762708475; cv=none; b=pd6tpGfqY7ufgefihlwcQ8r0lEB0tl5ekAxCgD+X45voIrz2ZpMzCGEjg7LFg+XfycfhdVx15e5TvWRXTSQg3YAQgqsKP7zOKg/fEperzs2qnh1VYfpjAGtVUB56rIi+UPSfS1izRv6s28FxDu/eKIjXEUD+odP5OYI/MyTmiKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762708475; c=relaxed/simple; bh=X8iXuBDLNyavzveN+u0clYIy8dEtP8NarhPdel67RD4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=EzTErj55Mbz9xL2gxPKS15oG9yJMLhWlt0TgbQISgayC9Jkj19sc68f+wgATuhWiliyQUtxT3ZTVFNF9/Al8gFYu+MIPYqFwtqj/yWz0IyzCXtfVzgC+N/qtQqKWHOiGPetutpCxhBRKF+4Ss22T2VyxUa96/Qpx2th690oXvHs= 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=THatMZNy; arc=none smtp.client-ip=170.10.133.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="THatMZNy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762708472; 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=F5HpPOlX4A+IDC0iS/hUD8BvRwzAlkYdd4UARWjCrtI=; b=THatMZNy56w7IlMc6jGpqXEuKHNYm/pPvCC2045wc6ll/1OOERJX+4+FVsbZeAGxQVivvf 94SXwfWvJSX5aRNAQOfjMR/vPViq3dlRRAtkg29D6YIGvqYiAF9T1G9wa+9eGZnu/GCTA9 4sqJsbA1QDWzi4EQFxE3v0dwyhmO9dU= Received: from mx-prod-mc-05.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-22-urEjOo_RN3iK77_WM-03lw-1; Sun, 09 Nov 2025 12:14:28 -0500 X-MC-Unique: urEjOo_RN3iK77_WM-03lw-1 X-Mimecast-MFC-AGG-ID: urEjOo_RN3iK77_WM-03lw_1762708467 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1E835195608A; Sun, 9 Nov 2025 17:14:27 +0000 (UTC) Received: from fedora (unknown [10.44.32.53]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 6443730001B9; Sun, 9 Nov 2025 17:14:06 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 9 Nov 2025 18:14:26 +0100 (CET) Date: Sun, 9 Nov 2025 18:14:04 +0100 From: Oleg Nesterov To: Bernd Edlinger , Linus Torvalds , Dmitry Levin Cc: Alexander Viro , Alexey Dobriyan , Kees Cook , Andy Lutomirski , Will Drewry , Christian Brauner , 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: [RFC PATCH 0/3] mt-exec: fix deadlock with ptrace_attach() Message-ID: References: Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HzdY8GBI4GCxuXRH5WHh4cFAYaUnB6gUfc1wfLZ4wfA_1762708467 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Not for inclusion yet. 2/2 is untested, incomplete, possibly buggy. But could you review at least the intent? Do you see any problem with this approach? This problem is very, very old. It seems that nobody can suggest a simple/clean fix... Oleg. --- fs/binfmt_elf.c | 4 +- fs/binfmt_elf_fdpic.c | 4 +- fs/binfmt_flat.c | 4 +- fs/exec.c | 142 +++++++++++++++++++++++------------------------- include/linux/binfmts.h | 2 +- kernel/exit.c | 9 +-- kernel/signal.c | 6 +- 7 files changed, 87 insertions(+), 84 deletions(-)