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 D711D3A7F41 for ; Thu, 6 Aug 2026 15:35:52 +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=1786030554; cv=none; b=N4dQZUnCNRq9EfnR/xP+qvbidhYCChy0d+I2evdqQ5ZBkcoJiHWXs6aBxqUjfLObcUArZc6TN3fJMpQInbdjiOHsVK3xdUXfnjeI4HNKY/bAZTwDFK6fc/lxkJ1DkekDUtahnP+l6wXIXIQiPf/mufnkmDKpLTtIFoUq+gQmh8E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786030554; c=relaxed/simple; bh=r6HeOM6i2D+rbIGS117BMSevYrXhqKly7idLuF29n0k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cVjayrTBEy4c5Ba8P3hGbsolrpoM/K43g/9ZzcgSjOfkQR/n5C/deBpKBSktBuJ+jOnDabSZvaZXfcfFHB/tbSTQp3BRIQYJ6HicfHrYrwFaFAXDPCl1dyXxW7gcL5n2IJC6ipxE33LlnjIy8yR8MVPy7YaZ5j7i8TcD+ic0PNk= 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=f9kYoNGq; 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="f9kYoNGq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786030551; 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=3a+zvsPBODBUkg2zPTRvsk0hWuKJ+5dJXyH550K1dLI=; b=f9kYoNGqOMLdmcmztZ5z0QYYlnpsloBp/KpN2UOMV+Olj1C6njBJlpEnfQyqkKnXSEzJ3y auVjJy0VkQDiFX3UIFJTdvSt+XHjieLEJshC5NCs/yEk4YBrH/ccwR6usf+qdtqdn6MpSN B/EWUrx+zl30xWZ8Q0blcmPEvtDXMW4= 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-576-POPOuaPvN8267V3tIFsocA-1; Thu, 06 Aug 2026 11:35:47 -0400 X-MC-Unique: POPOuaPvN8267V3tIFsocA-1 X-Mimecast-MFC-AGG-ID: POPOuaPvN8267V3tIFsocA_1786030544 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 9B9371956088; Thu, 6 Aug 2026 15:35:44 +0000 (UTC) Received: from fedora (unknown [10.44.32.54]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 0B17B30001A2; Thu, 6 Aug 2026 15:35:40 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 6 Aug 2026 17:35:44 +0200 (CEST) Date: Thu, 6 Aug 2026 17:35:39 +0200 From: Oleg Nesterov To: Sumanth Korikkar Cc: Jiri Olsa , Andrii Nakryiko , Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Ilya Leoshkevich , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Subject: Re: [PATCH] uprobes: Skip breakpoint installation on non executable vmas Message-ID: References: <20260805131904.1127416-1-sumanthk@linux.ibm.com> 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: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 On 08/06, Sumanth Korikkar wrote: > > On Thu, Aug 06, 2026 at 01:01:11PM +0200, Oleg Nesterov wrote: > > > > But your change in install_breakpoint() essentually reverts that commit? > > If uprobe_register() -> register_for_each_vma() finds a VM_MAYEXEC vma > > without VM_EXEC valid_vma() will return true, but then install_breakpoint() > > will fail anyway. > > Initially non exec vma will be ignored via uprobe_register(), > install_breakpoint() will reject non vma mappings initially. > > As far as I understand, if mprotect(PROT_EXEC) is performed later by a > process, it adds VM_EXEC flag to vma and calls vma_complete() via > vma_modify_flags(). uprobe_mmap() will then call install_breakpoint() > and now it should succeed because VM_EXEC is set. Heh, I am stupid the 2nd time in the same thread ;) Sumanth, thanks for correcting me! It seems that I forgot everything about these code paths. Then this change makes more sense, but the VM_EXEC check needs the comment to explain this all. However, I personally still don't think it's worth "fixing". But I leave the decision to Andrii and Jiri who (unlike me) understand how USDT's are used. Oleg.