]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/vas: Return -EINVAL if the offset is non-zero in mmap()
authorHaren Myneni <haren@linux.ibm.com>
Tue, 10 Jun 2025 02:12:27 +0000 (07:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:19 +0000 (11:05 +0100)
commit7298df96179b3ee832717f7ef3bf035311bde736
tree8e063bce1c99d1f6d3e70a33abc989fddf760575
parent81260c41b518b6f32c701425f1427562fa92f293
powerpc/vas: Return -EINVAL if the offset is non-zero in mmap()

[ Upstream commit 0d67f0dee6c9176bc09a5482dd7346e3a0f14d0b ]

The user space calls mmap() to map VAS window paste address
and the kernel returns the complete mapped page for each
window. So return -EINVAL if non-zero is passed for offset
parameter to mmap().

See Documentation/arch/powerpc/vas-api.rst for mmap()
restrictions.

Co-developed-by: Jonathan Greental <yonatan02greental@gmail.com>
Signed-off-by: Jonathan Greental <yonatan02greental@gmail.com>
Reported-by: Jonathan Greental <yonatan02greental@gmail.com>
Fixes: dda44eb29c23 ("powerpc/vas: Add VAS user space API")
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250610021227.361980-2-maddy@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/book3s/vas-api.c