+++ /dev/null
-From 6ed79248497fd2585712d169a360997ece5b94bd Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 21 Aug 2022 20:29:06 +0200
-Subject: media: atomisp: Ensure that USERPTR pointers are page aligned
-
-From: Hans de Goede <hdegoede@redhat.com>
-
-[ Upstream commit 6e6c4ae0f0ba295dbf6cbd48d93bec169d6ce431 ]
-
-The atomisp code needs USERPTR pointers to be page aligned,
-otherwise bad things (scribbling over other parts of the
-process' RAM) happen.
-
-Add a check to ensure this and exit VIDIOC_QBUF calls with
-unaligned pointers with -EINVAL.
-
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-index 8a0648fd7c81..317db11703e6 100644
---- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-@@ -1290,6 +1290,12 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
- * address and reprograme out page table properly
- */
- if (buf->memory == V4L2_MEMORY_USERPTR) {
-+ if (offset_in_page(buf->m.userptr)) {
-+ dev_err(isp->dev, "Error userptr is not page aligned.\n");
-+ ret = -EINVAL;
-+ goto error;
-+ }
-+
- vb = pipe->capq.bufs[buf->index];
- vm_mem = vb->priv;
- if (!vm_mem) {
---
-2.35.1
-
media-cros-ec-cec-limit-msg.len-to-cec_max_msg_size.patch
media-dvb-frontends-drxk-initialize-err-to-0.patch
media-meson-vdec-fix-possible-refcount-leak-in-vdec_.patch
-media-atomisp-ensure-that-userptr-pointers-are-page-.patch
media-atomisp-fix-v4l2_fh-resource-leak-on-open-erro.patch
acpi-apei-fix-integer-overflow-in-ghes_estatus_pool_.patch
scsi-core-restrict-legal-sdev_state-transitions-via-.patch
+++ /dev/null
-From dc1828398789d9b3595ded4c295cc0657372ba4a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 21 Aug 2022 20:29:06 +0200
-Subject: media: atomisp: Ensure that USERPTR pointers are page aligned
-
-From: Hans de Goede <hdegoede@redhat.com>
-
-[ Upstream commit 6e6c4ae0f0ba295dbf6cbd48d93bec169d6ce431 ]
-
-The atomisp code needs USERPTR pointers to be page aligned,
-otherwise bad things (scribbling over other parts of the
-process' RAM) happen.
-
-Add a check to ensure this and exit VIDIOC_QBUF calls with
-unaligned pointers with -EINVAL.
-
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-index b7dda4b96d49..b98074418718 100644
---- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-@@ -1291,6 +1291,12 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
- * address and reprograme out page table properly
- */
- if (buf->memory == V4L2_MEMORY_USERPTR) {
-+ if (offset_in_page(buf->m.userptr)) {
-+ dev_err(isp->dev, "Error userptr is not page aligned.\n");
-+ ret = -EINVAL;
-+ goto error;
-+ }
-+
- vb = pipe->capq.bufs[buf->index];
- vm_mem = vb->priv;
- if (!vm_mem) {
---
-2.35.1
-
media-meson-vdec-fix-possible-refcount-leak-in-vdec_.patch
media-v4l-subdev-fail-graciously-when-getting-try-da.patch
media-atomisp-fix-vidioc_try_fmt.patch
-media-atomisp-ensure-that-userptr-pointers-are-page-.patch
media-atomisp-fix-v4l2_fh-resource-leak-on-open-erro.patch
acpi-apei-fix-integer-overflow-in-ghes_estatus_pool_.patch
scsi-core-restrict-legal-sdev_state-transitions-via-.patch
+++ /dev/null
-From 58a3482a386a12a9ca97f517fd006be917767483 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 21 Aug 2022 20:29:06 +0200
-Subject: media: atomisp: Ensure that USERPTR pointers are page aligned
-
-From: Hans de Goede <hdegoede@redhat.com>
-
-[ Upstream commit 6e6c4ae0f0ba295dbf6cbd48d93bec169d6ce431 ]
-
-The atomisp code needs USERPTR pointers to be page aligned,
-otherwise bad things (scribbling over other parts of the
-process' RAM) happen.
-
-Add a check to ensure this and exit VIDIOC_QBUF calls with
-unaligned pointers with -EINVAL.
-
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-index 459645c2e2a7..4de01aa28fe5 100644
---- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
-@@ -1338,6 +1338,12 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
- * address and reprograme out page table properly
- */
- if (buf->memory == V4L2_MEMORY_USERPTR) {
-+ if (offset_in_page(buf->m.userptr)) {
-+ dev_err(isp->dev, "Error userptr is not page aligned.\n");
-+ ret = -EINVAL;
-+ goto error;
-+ }
-+
- vb = pipe->capq.bufs[buf->index];
- vm_mem = vb->priv;
- if (!vm_mem) {
---
-2.35.1
-
media-hantro-hevc-fix-chroma-offset-computation.patch
media-v4l-subdev-fail-graciously-when-getting-try-da.patch
media-atomisp-fix-vidioc_try_fmt.patch
-media-atomisp-ensure-that-userptr-pointers-are-page-.patch
media-atomisp-fix-v4l2_fh-resource-leak-on-open-erro.patch
media-atomisp-fix-locking-around-asd-streaming-read-.patch
drm-vc4-hdmi-check-the-hsm-rate-at-runtime_resume.patch