From patchwork Sat Nov 16 17:59:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 13877674 Return-Path: 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 DCE9ED68BF6 for ; Sat, 16 Nov 2024 17:59:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 778FE9C001F; Sat, 16 Nov 2024 12:59:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7286D9C0018; Sat, 16 Nov 2024 12:59:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52D859C001F; Sat, 16 Nov 2024 12:59:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1A3469C0018 for ; Sat, 16 Nov 2024 12:59:35 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id CA93B1A1D4E for ; Sat, 16 Nov 2024 17:59:34 +0000 (UTC) X-FDA: 82792720164.02.F1B6C1C Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by imf23.hostedemail.com (Postfix) with ESMTP id 499FD140003 for ; Sat, 16 Nov 2024 17:59:02 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=ct6XonbA; spf=pass (imf23.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731779915; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3/iffj9AwrmFtA4v15nvK21qog5xz91IornymITaB6w=; b=8ZZ+hXfEit58Qa5+ADy9BENI1ugl6pog+XD+JMH4Gjwy93buOb2lx6T4UgVQlKL6PuztwL FMq5ChZrjQ3K585Iv58eoYoVEMJBhLYkRr+3vfndOHWkvc711ZNh1U1g9JkZVTOHbOUyqF bLTCTyxHQdHlrmdAKQzCTJAp9t/VIJU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731779915; a=rsa-sha256; cv=none; b=fsn14AB6qaDqsw/qkiJhlbJuhXiTY5pHx5OH8tmAAEgbbtmJbT6wRPW6mcj5a6ugpJIV/f vmMRIJzjRHCjTWhEA/+gBWkmfxPm06Bv/s32T+R+J2W+7RCnD2utnwbfDKFXTLb0Bc3nn5 G0C76Rc7w7Qh7Nd8TW0yRI2xJWcOjfM= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=ct6XonbA; spf=pass (imf23.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-7b150dc7bc0so53375485a.1 for ; Sat, 16 Nov 2024 09:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen-com.20230601.gappssmtp.com; s=20230601; t=1731779972; x=1732384772; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3/iffj9AwrmFtA4v15nvK21qog5xz91IornymITaB6w=; b=ct6XonbA6fDukT65hxGsRBl4Mu2ACuOurfs8qq+As/E0kS9apJeF1PeMhWqSAtG1Rj ay1gL8uRMPr+W3ZI+kwRnwn/3XhqOyf/N9dfewcJt73ahAOX8kfdGnf4z4ZE0vRxYpy+ HE5Q+CLw4VXbaJ5+VUAQCkpmwoyDl+vuUyFjKDwrvf2u5YtF/daSToFz/bnXlysjpWjJ Nap6IWq2jgmubUKUovw/ADRd1BQ3Dgy16AwEwWZFCgSPSPabShkOuP2ygxZatj7gQxbV Xl+/Ne+Tlj+0ArMhOfLPxk3q6Kg9AoP6e3R6cBL/tcLREK31rDvTh6bYxbXNkm88hy5W ytqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731779972; x=1732384772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3/iffj9AwrmFtA4v15nvK21qog5xz91IornymITaB6w=; b=wG0vXPQ7p9PSzsCF79NUGZCiPuOiILuds33mc7hdrj+V14Sq0QkBE1ozz65AEUYK8A VKMNR45bgmsIG9SNCgbjz6vy7uZ4hTrYtBTWEiJMUX/Ys8JTA2g2VU3JsmwdPRSV+NXL 7rK7N5WHX/X1I9Yvn+J7x3SFkBo04GbLNmI0zJwpGUgaGj1p7xrxDO0He8ackQfSWril M6HE4L2Ha8VRZ/LZmHdN59EpY0df7z6+tNBB2KnPIo9ZmjG133+wteYzS7s7/hClNrK5 J2OU0emozgV7wMyulFWQemdu/D9sqkjA7KdkDn51kBMcHpaobsIPAjR+ktlFN1mS0DBJ JYFw== X-Forwarded-Encrypted: i=1; AJvYcCVN7ca2Yo3blRVONSD4+w52YMj13KlFzSiyUgIUTte1aGUwGu8+mb4KpxDNZehnmZ1wbn4E6OZ5hg==@kvack.org X-Gm-Message-State: AOJu0Yzna9Lus0Nvl2H9VJx/8HxY+QW6+16QDZioGTYR5B3USZHzVj3a e+jqqQ63KjN1r/IWSROL7TzXj8opiAMwq0zmt6cGiVliMjPv1kMwYnIfnCVXi/I= X-Google-Smtp-Source: AGHT+IE8nO0AKxOziuoNl9dbDG8TGtYIxbG42IN6xSk4xPBQ4y/OVn6DudmIksQC42h6NfG3SOwe+g== X-Received: by 2002:a05:620a:3186:b0:7b1:5306:a1ca with SMTP id af79cd13be357-7b3622de46amr1114698785a.36.1731779972207; Sat, 16 Nov 2024 09:59:32 -0800 (PST) Received: from soleen.c.googlers.com.com (51.57.86.34.bc.googleusercontent.com. [34.86.57.51]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b35ca309d6sm280530085a.94.2024.11.16.09.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2024 09:59:31 -0800 (PST) From: Pasha Tatashin To: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, akpm@linux-foundation.org, corbet@lwn.net, derek.kiernan@amd.com, dragan.cvetic@amd.com, arnd@arndb.de, gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, tj@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com, shuah@kernel.org, vegard.nossum@oracle.com, vattunuru@marvell.com, schalla@marvell.com, david@redhat.com, willy@infradead.org, osalvador@suse.de, usama.anjum@collabora.com, andrii@kernel.org, ryan.roberts@arm.com, peterx@redhat.com, oleg@redhat.com, tandersen@netflix.com, rientjes@google.com, gthelen@google.com Subject: [RFCv1 5/6] misc/page_detective: enable loadable module Date: Sat, 16 Nov 2024 17:59:21 +0000 Message-ID: <20241116175922.3265872-6-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241116175922.3265872-1-pasha.tatashin@soleen.com> References: <20241116175922.3265872-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Stat-Signature: fs9k9cfj97c4j3ebd1xpgugtd7ptgyp9 X-Rspam-User: X-Rspamd-Queue-Id: 499FD140003 X-Rspamd-Server: rspam02 X-HE-Tag: 1731779942-76595 X-HE-Meta: U2FsdGVkX181xLd5QLjcJbk/qZ9ZOgOufM3nsKrosiAzjTXJBbPeyVTerHFBxVxcNY48sPfncl52ArbOUhtAStbfzVgqJfJwWmWYFRIOwh361THY6cm8jRngrTVFd12JTbCvCgOr5wJzTUwGaqiK06m3wtygSwmEU/FQwlkZkN37Voo/Hn00XLe0gns20j+bxXpZOXjQyy8HnELgi6pI4nLRgUlJ7Ld9Vh60vYqN0fWtc31DQYj0tw8xlCl3w73INQHQ+GQyNdJyuqRZJvk8U9kCu0Z3pU1UVcNIGQaR9iWGSaWhKKMIZ58Iu1AbQnteRJBV5fwjPbJKSaNwmQGy+ZyH9oN8x7ixbZKIWRs9vlC8uUUKsTjrP5g/+SzUOv7yik8Vt8z76RLYUEYEFEodGMZd48/oynNt+7mFRomYsBHHMAmAlByClfmBxXzia2DtPkkwrUnraRqYao9B6sZrlQHyyctB2ZuzIew/Et7VhZ5CGvF0fV0OC+xsH6/dxj8d6LE6cQvybAeOY81cu46+sfCgs5fnp6RVnOrwAgUYeyMWEArccwG5aU7Z45ChHk4BNUIlPrEBtyltEae7IiRRc83oPw9I8WQAaUR/02BN46TTHZHhVZpjXWNV04T9Yny4CNqausvTWHC+IrHoYbdQKtKJCrHnjM6v5RHB9KCr9+SiX9HNdVreTtqsVYrmIZvzVjv2S4Jr1Y+STDtN0OefgSGGKzsrM5RgUQbCCxNfFpOqFmUvjSYiwU4CGfgIGooHpWzKrD4MporIq5dRi171fpUdx/FCBJDQiYY5e9dqA2Y1eH3i4w8+5k5BYXJmNjQcm031xd4O5Ss6M/LmQinKC7QSxtT2vx+B70eRSsv1ry0VdvaF3W10Yo04sBcLScmrx4jS672qVX6UNZQddNxECybt6GTPl7FOIPcES4Dk6XPTy+c2lvSnlK97XwJtWkvCPYMYE5/x2jgSQl4LPiU 8iq3XZ0o 4nd1Lim4wh1LLi2efXxJJSzs/rB4+mnXgB4t002eh3mzpD9sOWmn056qsahPkaGCQcS5/0hdkf0N8uJsZGHu24Zjr4A6NOvScmgxl+2yFcWe1SzbEIQxrvuYld3bi3hrsovV5DHse2zxMiT3CGRz8s3zVvl6lHcHR8sXGGE5Y7rVRXj6nSBeZuYet92c+FUEtSPue2t9puoXvZNVfsEBWBxkYTI7BjFrxusXoIfdApv48wl2uajpL3VeF6Xumc0BeiZ/nMnO/bas316wdXV3caityVptQ9wo87tUfZlNsrlKJjieoBJ3eYfKJQjpPR+mfzYcN+F8veF73as8qFK2a06lta/d4c764+PzHST0JbcZ8dlxfb6m7YQcpWedbyA5mY2mRrzkxXI5Qn2kg3Hs1ml7Nn695WQw1O4rkro6KWt98GaeFxUaDmEc0tA== 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: List-Subscribe: List-Unsubscribe: Export the missing symbols, and allow page_detective to be built as a loadable module. This can be make this available in the field, where Page Detective is loaded only once it is needed. Signed-off-by: Pasha Tatashin --- drivers/misc/Kconfig | 2 +- fs/kernfs/dir.c | 1 + kernel/pid.c | 1 + mm/memcontrol.c | 1 + mm/oom_kill.c | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 2965c3c7cdef..b58b4f9567ff 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -495,7 +495,7 @@ config MISC_RTSX config PAGE_DETECTIVE depends on PAGE_TABLE_CHECK depends on MEMCG - bool "Page Detective" + tristate "Page Detective" help A debugging tool designed to provide detailed information about the usage and mapping of physical memory pages. This tool operates through diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 458519e416fe..84ad163a4281 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -279,6 +279,7 @@ void pr_cont_kernfs_path(struct kernfs_node *kn) out: spin_unlock_irqrestore(&kernfs_pr_cont_lock, flags); } +EXPORT_SYMBOL_GPL(pr_cont_kernfs_path); /** * kernfs_get_parent - determine the parent node and pin it diff --git a/kernel/pid.c b/kernel/pid.c index 2715afb77eab..89454dc9535e 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -447,6 +447,7 @@ struct task_struct *find_get_task_by_vpid(pid_t nr) return task; } +EXPORT_SYMBOL_GPL(find_get_task_by_vpid); struct pid *get_task_pid(struct task_struct *task, enum pid_type type) { diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 53db98d2c4a1..389aeec06a04 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -967,6 +967,7 @@ struct mem_cgroup *get_mem_cgroup_from_folio(struct folio *folio) rcu_read_unlock(); return memcg; } +EXPORT_SYMBOL_GPL(get_mem_cgroup_from_folio); /** * mem_cgroup_iter - iterate over memory cgroup hierarchy diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 4d7a0004df2c..df230a091dcc 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -149,6 +149,7 @@ struct task_struct *find_lock_task_mm(struct task_struct *p) return t; } +EXPORT_SYMBOL_GPL(find_lock_task_mm); /* * order == -1 means the oom kill is required by sysrq, otherwise only