diff options
author | 2025-06-09 20:06:58 -0700 | |
---|---|---|
committer | 2025-06-09 20:06:58 -0700 | |
commit | f09079bd04a924c72d555cd97942d5f8d7eca98c (patch) | |
tree | 3db88eab0771fde1d4660416bb54a3486a360651 /arch/powerpc/platforms/book3s/vas-api.c | |
parent | Linux 6.16-rc1 (diff) | |
parent | powerpc/vas: Return -EINVAL if the offset is non-zero in mmap() (diff) | |
download | linux-rng-linus/master.tar.xz linux-rng-linus/master.zip |
Merge tag 'powerpc-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linuxlinus/master
Pull powerpc fixes from Madhavan Srinivasan:
- a couple of fixes for out of bounds issues in memtrace and vas
Thanks to Ritesh Harjani (IBM), Haren Myneni, and Jonathan Greental
* tag 'powerpc-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/vas: Return -EINVAL if the offset is non-zero in mmap()
powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap
Diffstat (limited to 'arch/powerpc/platforms/book3s/vas-api.c')
-rw-r--r-- | arch/powerpc/platforms/book3s/vas-api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c index 0b6365d85d11..dc6f75d3ac6e 100644 --- a/arch/powerpc/platforms/book3s/vas-api.c +++ b/arch/powerpc/platforms/book3s/vas-api.c @@ -521,6 +521,15 @@ static int coproc_mmap(struct file *fp, struct vm_area_struct *vma) return -EINVAL; } + /* + * Map complete page to the paste address. So the user + * space should pass 0ULL to the offset parameter. + */ + if (vma->vm_pgoff) { + pr_debug("Page offset unsupported to map paste address\n"); + return -EINVAL; + } + /* Ensure instance has an open send window */ if (!txwin) { pr_err("No send window open?\n"); |