From: Andrii Nakryiko <andrii@kernel.org>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
adobriyan@gmail.com, Andrii Nakryiko <andrii@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH v2 2/2] fs/procfs: improve PROCMAP_QUERY's compat mode handling
Date: Mon, 1 Jul 2024 10:48:05 -0700 [thread overview]
Message-ID: <20240701174805.1897344-2-andrii@kernel.org> (raw)
In-Reply-To: <20240701174805.1897344-1-andrii@kernel.org>
Kernel provides compat_ptr_ioctl() wrapper to sanitize pointers for
32-bit processes on 64-bit host architectures. Given procfs_procmap_ioctl()
always expects pointer argument, this is exactly what we need.
This has any effect only on 32-bit processes on s390 architecture.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 3757be498749 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
fs/proc/task_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 3f1d0d2f78fe..b7bb4d04e962 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -637,7 +637,7 @@ const struct file_operations proc_pid_maps_operations = {
.llseek = seq_lseek,
.release = proc_map_release,
.unlocked_ioctl = procfs_procmap_ioctl,
- .compat_ioctl = procfs_procmap_ioctl,
+ .compat_ioctl = compat_ptr_ioctl,
};
/*
--
2.43.0
prev parent reply other threads:[~2024-07-01 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 17:48 [PATCH v2 1/2] fs/procfs: fix integer to pointer cast warning in do_procmap_query() Andrii Nakryiko
2024-07-01 17:48 ` Andrii Nakryiko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701174805.1897344-2-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).