lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172285896546.2215.10122357135816753782.tip-bot2@tip-bot2>
Date: Mon, 05 Aug 2024 11:56:05 -0000
From: "tip-bot2 for Oleg Nesterov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Andrii Nakryiko <andrii@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>, Jiri Olsa <jolsa@...nel.org>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
 [tip: perf/core] uprobes: is_trap_at_addr: don't use get_user_pages_remote()

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     300b05621a3f85621130e356ca6ae90f6a4eec0e
Gitweb:        https://git.kernel.org/tip/300b05621a3f85621130e356ca6ae90f6a4eec0e
Author:        Oleg Nesterov <oleg@...hat.com>
AuthorDate:    Thu, 01 Aug 2024 15:27:14 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Fri, 02 Aug 2024 11:30:30 +02:00

uprobes: is_trap_at_addr: don't use get_user_pages_remote()

get_user_pages_remote() and the comment above it make no sense.

There is no task_struct passed into get_user_pages_remote() anymore, and
nowadays mm_account_fault() increments the current->min/maj_flt counters
regardless of FAULT_FLAG_REMOTE.

Reported-by: Andrii Nakryiko <andrii@...nel.org>
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Jiri Olsa <jolsa@...nel.org>
Acked-by: Andrii Nakryiko <andrii@...nel.org>
Link: https://lore.kernel.org/r/20240801132714.GA8783@redhat.com
---
 kernel/events/uprobes.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 2d1457e..698bb22 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -2035,13 +2035,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
 	if (likely(result == 0))
 		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.
-	 */
-	result = get_user_pages_remote(mm, vaddr, 1, FOLL_FORCE, &page, NULL);
+	result = get_user_pages(vaddr, 1, FOLL_FORCE, &page);
 	if (result < 0)
 		return result;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ