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 34E10137910 for ; Wed, 3 Jul 2024 11:40:15 +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=1720006817; cv=none; b=ujOuc77hExBlNyZz02MiGkMBbRmL73Mqp4IWqkA4MNnfPRfamwFFlERqnoT19nCq9rh85oyVltfwVHLdiJqmKdGxe2cJlnf/F2A9NFCK5ZldBg+66uJJZFvmPfx7mqwtGjZaxXPFhCdvf+kuDZ4X4/wOyJoRp0ycefSvZXu6DS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720006817; c=relaxed/simple; bh=Q/gLFE2jiZm2A5UjLyCwu76dGuP501HZRmWqLeZf/iM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=unGb1Iu4p44aPkgQKG6TJymBy2C/+MVZu9O94Z0zGVm1Y7yuldF4cfY2ZhrctooIEcN6lmX5bI4Qi1BMnBsPt1w3hpMgbrDb2fU+sjDiY9esDHIrzc4fAckdukUh6uDFOO2/B0zrJPkiNSYvde2YicHTjeULy9d8Pg8aJkTdTIk= 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=LdH4InJR; arc=none smtp.client-ip=170.10.129.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="LdH4InJR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720006815; 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=REw1xMcZju11woGKbqg6skhczkzaJjJnxVodA2+Ty3k=; b=LdH4InJRLij5aFjvXGkXOSW9eYLbH7dTzbexRGfuKlfR4/IOcnelAYWwN3IJnMpPt17UA6 HujtZ8+Qdlwa8QqAGQfkbsbEAyPiQ/A3CUcmX5ouLiY8eTg7J/bX12X2/f6RLRqD7SvN0S /fqX7zOf/amiYJwQqdkfdBomYQ+cMgM= 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-655-EHJL6A1qPCGubzUU4B5LsQ-1; Wed, 03 Jul 2024 07:40:11 -0400 X-MC-Unique: EHJL6A1qPCGubzUU4B5LsQ-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 B109F19560B1; Wed, 3 Jul 2024 11:40:09 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.202]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id E9F081955F21; Wed, 3 Jul 2024 11:40:05 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 3 Jul 2024 13:38:34 +0200 (CEST) Date: Wed, 3 Jul 2024 13:38:30 +0200 From: Oleg Nesterov To: Andrii Nakryiko Cc: linux-trace-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, peterz@infradead.org, mingo@redhat.com, bpf@vger.kernel.org, jolsa@kernel.org, paulmck@kernel.org, clm@meta.com Subject: Re: [PATCH v2 01/12] uprobes: update outdated comment Message-ID: <20240703113829.GA28444@redhat.com> References: <20240701223935.3783951-1-andrii@kernel.org> <20240701223935.3783951-2-andrii@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: <20240701223935.3783951-2-andrii@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Sorry for the late reply. I'll try to read this version/discussion when I have time... yes, I have already promised this before, sorry :/ On 07/01, Andrii Nakryiko wrote: > > There is no task_struct passed into get_user_pages_remote() anymore, > drop the parts of comment mentioning NULL tsk, it's just confusing at > this point. Agreed. > @@ -2030,10 +2030,8 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr) > goto out; > > /* > - * The NULL 'tsk' here ensures that any faults that occur here > - * will not be accounted to the task. 'mm' *is* current->mm, > - * but we treat this as a 'remote' access since it is > - * essentially a kernel access to the memory. > + * 'mm' *is* current->mm, but we treat this as a 'remote' access since > + * it is essentially a kernel access to the memory. > */ > result = get_user_pages_remote(mm, vaddr, 1, FOLL_FORCE, &page, NULL); OK, this makes it less confusing, so Acked-by: Oleg Nesterov --------------------------------------------------------------------- but it still looks confusing to me. This code used to pass tsk = NULL only to avoid tsk->maj/min_flt++ in faultin_page(). But today mm_account_fault() increments these counters without checking FAULT_FLAG_REMOTE, mm == current->mm, so it seems it would be better to just use get_user_pages() and remove this comment? Oleg.