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 48111200AF for ; Mon, 9 Sep 2024 19:37:50 +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=1725910671; cv=none; b=IE1Qo4y8brkEX1yEigCxiG1lsTH6LbEHEzmt0a98+VLa8yjELv0FkNCu68ldVazQloaJik9dcI1e4VzULcNK+35Ida2QT0LH5v81Zc5vvKHX1MTYPFJnmEM2UbgnRTO/X9YDHan7o1Vu+XMsyvKa+yezgXIrKVewdbW1uIJdxrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725910671; c=relaxed/simple; bh=RsXgnz/Awu8194XCZziysSI+1w0BvXXdgMewrhU6Q4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ikQu4tA+kneKVhzz1A6wuw6wQ5qldQPmuMQoTm2//xWnOBFXygFi9H0nzJdJgMDLv7NOHqfcjYwy9E/9aoeNu4qln2Rn2+M4RHz62FgewImTDxqO46I5UJaBL9ga1wpK+AqKdt/B+2Bb7PNUBoQv7iu+DZ85ByvKuQSMhsB/BGg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=fT0CGzqQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="fT0CGzqQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725910669; 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=76PMED9qVa8H24o7AErFGwfepAPAtA5MZWDkqvtekV0=; b=fT0CGzqQjraxoWaqIxRgEr7NuVIqWb9WwVPZ7daPaoFOmMpgbgl2PXZeb+jmGK2ED7BpjO aAdgjNDukN15dgzRFMc8yz+ie8hODlVZUhA331sFKS4NrOTnMcT9MnHpI24qpPPv848BxM bDr1pFJz61GhK2Wd3yBChz8zoLHZj8E= 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-414-V6GzlB0yMd6Y-8EAXNL46A-1; Mon, 09 Sep 2024 15:37:44 -0400 X-MC-Unique: V6GzlB0yMd6Y-8EAXNL46A-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 6DCC819560B1; Mon, 9 Sep 2024 19:37:42 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.74]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 36C571955F45; Mon, 9 Sep 2024 19:37:37 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 9 Sep 2024 21:37:31 +0200 (CEST) Date: Mon, 9 Sep 2024 21:37:25 +0200 From: Oleg Nesterov To: Jubilee Young Cc: akpm@linux-foundation.org, apais@microsoft.com, benhill@microsoft.com, ebiederm@xmission.com, linux-kernel@vger.kernel.org, romank@linux.microsoft.com, ssengar@microsoft.com, sunilmut@microsoft.com, torvalds@linux-foundation.org, vdso@hexbites.dev Subject: Re: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS Message-ID: <20240909193725.GD14058@redhat.com> References: Precedence: bulk X-Mailing-List: linux-kernel@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: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 On 09/07, Jubilee Young wrote: > > > Perhaps it makes sense to discuss the alternatives? Say, a process can have a > > please_insert_the_breakpoint_here() function implemented in asm which just does > > asm(ret). > > There's some merit in having the debuggers recognize this pattern, as that > then would save every language that wants to have this power available > the trouble of reimplementing it. But first debuggers must recognize it, > which would require teaching each of them, which can be... tedious. Yet another thing in this discussion I can't understand... sorry, I tried. You do not need to teach, say, gdb to recognize this pattern. You can just do $ gdb -ex 'b please_insert_the_breakpoint_here' ... Nevermind, as I have already said you can safely ignore me. I still do not see any "real" use-case for breakpoint_if_debugging(), but I guess that is due to my ignorance and lack of imagination. Oleg.