Message ID | 20241122035922.3321100-2-andrii@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C835FE65D1E for <linux-mm@archiver.kernel.org>; Fri, 22 Nov 2024 03:59:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 547836B00C0; Thu, 21 Nov 2024 22:59:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CF786B00C1; Thu, 21 Nov 2024 22:59:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 306486B00C2; Thu, 21 Nov 2024 22:59:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 00BC96B00C0 for <linux-mm@kvack.org>; Thu, 21 Nov 2024 22:59:43 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 796AF141228 for <linux-mm@kvack.org>; Fri, 22 Nov 2024 03:59:43 +0000 (UTC) X-FDA: 82812375324.21.68FD165 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf11.hostedemail.com (Postfix) with ESMTP id 6F6D140009 for <linux-mm@kvack.org>; Fri, 22 Nov 2024 03:58:35 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oEMjM3Dg; spf=pass (imf11.hostedemail.com: domain of andrii@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=andrii@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732247797; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BfxMzVavNHdw+CGTzkQ/ait716Tk5SRDXovanvJZ0BY=; b=5eqDDI89xUK5tA8Sr8xFSJdecqmFFo7NbOUdlCjZAlt+a4//zCbr/qDtwhF3dsqbgHc7XU gAvHuJoDDOZDiVi52nCMp4jzlLE/rqLBG9+egqkjPpwERxX1qRVghv4vR91yIrclbX2YkJ kEAk6Y3tXPd7W/CHsp8lG8WhsO/iFNw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oEMjM3Dg; spf=pass (imf11.hostedemail.com: domain of andrii@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=andrii@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732247797; a=rsa-sha256; cv=none; b=bkujSEdJ/DZIULP+UpKMSj7fIr4BBp9O5cn+E8rF8GAUYp3yY/mpa8nKOpx5a3J+tEvsf1 EzW/N3xILgeCBChT0aRAbNE4rf+SYFhMnOYRCrTdo7H8KX5OMhscKbn2FK+AKBIprFLlBh wz0xECM3DPE2tF3yyV4RDD2X0s0CD+g= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AC79EA40AFF; Fri, 22 Nov 2024 03:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84AE7C4CECE; Fri, 22 Nov 2024 03:59:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732247980; bh=IrM7jUhEG4Z9f//nITfI+eGyW4Lnt6qYBNt5PkL6luM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oEMjM3Dg5YOSh7dsCuJUD6w40TK3OBk1GWuAwaKApntlzya3paJAdHFLEh56H6uYv yIqflIuUP2jbDT8jFBJKMhM1+7pnWeu5LKK0tMgpExDl/NTwRqFTpJtS2ZPnXua/uN FqW5mblLMmkq+2xC18ZZrnLoZsv7EJFaC/8Q/4f9FL2mNhXmIv7ObLUsdsMNOn8tlh 9M3FqqaMNKWxsc3CTMFTQT8usfKrQdETreB3Vb7vb1ZQ73X9S8Fha5EC64fMSHtFOK 8/h9kv/J09xvzr21AqsJHlyvVaPUB5vhEg+9+RKiJcUUUosuDuNNPVwaKzsahksBry WI9YAczrP+iVg== From: Andrii Nakryiko <andrii@kernel.org> To: linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, peterz@infradead.org, mingo@kernel.org, torvalds@linux-foundation.org Cc: oleg@redhat.com, rostedt@goodmis.org, mhiramat@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, paulmck@kernel.org, willy@infradead.org, surenb@google.com, mjguzik@gmail.com, brauner@kernel.org, jannh@google.com, mhocko@kernel.org, vbabka@suse.cz, shakeel.butt@linux.dev, hannes@cmpxchg.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, david@redhat.com, arnd@arndb.de, viro@zeniv.linux.org.uk, hca@linux.ibm.com, Andrii Nakryiko <andrii@kernel.org> Subject: [PATCH v5 tip/perf/core 1/2] uprobes: simplify find_active_uprobe_rcu() VMA checks Date: Thu, 21 Nov 2024 19:59:21 -0800 Message-ID: <20241122035922.3321100-2-andrii@kernel.org> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241122035922.3321100-1-andrii@kernel.org> References: <20241122035922.3321100-1-andrii@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6F6D140009 X-Stat-Signature: wo8besa8ms4tc53okqs9wso3jcqrg55t X-Rspam-User: X-HE-T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O5maMz2fptY7kSq4t42QTzROiQri5/SWBF2DI9HU/uKNjO4RXya5ujiUglWIqUSs+1RqZQI8Hz9+NnHQu3WhF9iuz840bXZDmtxaFA15OG2MDBu7Fw66G9Fj5fSpZ1OpbeNzdoMBuEudc0SvQ+EZq3BCH/bvg6mjayIjR4sc2nXNoESwaweAN2hvrPbhtbkT8cYi7FzvV2SG4TuFyjscHQvQlryjHC9GsUcKRA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
uprobes: speculative lockless VMA-to-uprobe lookup
|
expand
|
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index a76ddc5fc982..c4da8f741f3a 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -2305,7 +2305,7 @@ static struct uprobe *find_active_uprobe_rcu(unsigned long bp_vaddr, int *is_swb mmap_read_lock(mm); vma = vma_lookup(mm, bp_vaddr); if (vma) { - if (valid_vma(vma, false)) { + if (vma->vm_file) { struct inode *inode = file_inode(vma->vm_file); loff_t offset = vaddr_to_offset(vma, bp_vaddr);