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 2C85016D4C4 for ; Tue, 25 Jun 2024 14:51:39 +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=1719327101; cv=none; b=Y3oq1MlAJY8+XJgZsaSpJa/FEKGhTT5KfwWrb2DPRo1sKkMfIXgxm/xXHlBx/FjQAxXPi9TnSGfV10PqugKuKYB2r0LIDi51oRYAX8SAe/MpzXct27PLgLHhZpr6qUAVhJ+vZqDp7IymxLIRxFTIJIHPTYbr6fpdclNgl2msPOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719327101; c=relaxed/simple; bh=v76kX6Yqf/ttqX1bSAcPMLXkbrs/9IQ1fOvtZsUtYbM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lk/hJxV8137I2L9Y3oP0eMlrICGBOzs8tjTIxWu2mt4bSrCbgyxJWRyHvVVheo7JHSb1EPB5PCIvrz/tEGpDeI5W7qS7/E4JkGKJP7CINtdfcj7dg+A8nxLPylNEitBFnakvNcPN9eWTy5cicevVnTwTG6gXU/KNSBFCknOmzGQ= 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=cmmPS6ic; 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="cmmPS6ic" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719327099; 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=v76kX6Yqf/ttqX1bSAcPMLXkbrs/9IQ1fOvtZsUtYbM=; b=cmmPS6ic3pmOn0hUL7umlYGKl6cV7fI5855U8JEazvo2le42MJzRWQKp5wvkVe4Ev9FN/M ny2A7e4gfYh8rCGIFZ4V0pEopJUmvUvd6F00dgbzbofOUGVn/AX2IX1cjo5N1B7uiGtMvQ qyqdXxT9FWJSyM/THp7b1xBCUmbDXYI= Received: from mx-prod-mc-01.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-612-CgwGlM-ENm2Cp5z6Cl9IPQ-1; Tue, 25 Jun 2024 10:51:32 -0400 X-MC-Unique: CgwGlM-ENm2Cp5z6Cl9IPQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 978DE19560A0; Tue, 25 Jun 2024 14:51:30 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.198]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id A39761955E91; Tue, 25 Jun 2024 14:51:26 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 25 Jun 2024 16:49:57 +0200 (CEST) Date: Tue, 25 Jun 2024 16:49:52 +0200 From: Oleg Nesterov To: Masami Hiramatsu Cc: Andrii Nakryiko , linux-trace-kernel@vger.kernel.org, rostedt@goodmis.org, peterz@infradead.org, mingo@redhat.com, bpf@vger.kernel.org, jolsa@kernel.org, paulmck@kernel.org, clm@meta.com Subject: Re: [PATCH 02/12] uprobes: grab write mmap lock in unapply_uprobe() Message-ID: <20240625144952.GA21558@redhat.com> References: <20240625002144.3485799-1-andrii@kernel.org> <20240625002144.3485799-3-andrii@kernel.org> <20240625102925.665f2fa3b39dc7602b1321d8@kernel.org> Precedence: bulk X-Mailing-List: linux-trace-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: <20240625102925.665f2fa3b39dc7602b1321d8@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 On 06/25, Masami Hiramatsu wrote: > > On Mon, 24 Jun 2024 17:21:34 -0700 > Andrii Nakryiko wrote: > > > Given unapply_uprobe() can call remove_breakpoint() which eventually > > calls uprobe_write_opcode(), which can modify a set of memory pages and > > expects mm->mmap_lock held for write, it needs to have writer lock. > > Oops, it is an actual bug, right? Why? So far I don't understand this change. Quite possibly I missed something, but in this case the changelog should explain the problem more clearly. Oleg.