From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev,
Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>,
Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 6.3 13/13] drm/amdgpu: Validate VM ioctl flags.
Date: Mon, 3 Jul 2023 20:54:23 +0200 [thread overview]
Message-ID: <20230703184519.591298957@linuxfoundation.org> (raw)
In-Reply-To: <20230703184519.206275653@linuxfoundation.org>
From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
commit a2b308044dcaca8d3e580959a4f867a1d5c37fac upstream.
None have been defined yet, so reject anybody setting any. Mesa sets
it to 0 anyway.
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2371,6 +2371,10 @@ int amdgpu_vm_ioctl(struct drm_device *d
struct amdgpu_fpriv *fpriv = filp->driver_priv;
int r;
+ /* No valid flags defined yet */
+ if (args->in.flags)
+ return -EINVAL;
+
switch (args->in.op) {
case AMDGPU_VM_OP_RESERVE_VMID:
/* We only have requirement to reserve vmid from gfxhub */
next prev parent reply other threads:[~2023-07-03 18:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 18:54 [PATCH 6.3 00/13] 6.3.12-rc1 review Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 01/13] xtensa: fix lock_mm_and_find_vma in case VMA not found Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 02/13] drm/amd/display: Do not update DRR while BW optimizations pending Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 03/13] PCI/ACPI: Validate acpi_pci_set_power_state() parameter Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 04/13] PCI/ACPI: Call _REG when transitioning D-states Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 05/13] execve: always mark stack as growing down during early stack setup Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 06/13] nfs: dont report STATX_BTIME in ->getattr Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 07/13] Revert "cxl/port: Enable the HDM decoder capability for switch ports" Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 08/13] nubus: Partially revert proc_create_single_data() conversion Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 09/13] hugetlb: revert use of page_cache_next_miss() Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 10/13] scripts/tags.sh: Resolve gtags empty index generation Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 11/13] docs: Set minimal gtags / GNU GLOBAL version to 6.6.5 Greg Kroah-Hartman
2023-07-03 18:54 ` [PATCH 6.3 12/13] dm ioctl: Avoid double-fetch of version Greg Kroah-Hartman
2023-07-03 18:54 ` Greg Kroah-Hartman [this message]
2023-07-04 7:34 ` [PATCH 6.3 00/13] 6.3.12-rc1 review Naresh Kamboju
2023-07-04 7:43 ` Greg Kroah-Hartman
2023-07-04 8:24 ` Greg Kroah-Hartman
2023-07-04 8:39 ` Greg Kroah-Hartman
2023-07-04 8:43 ` Harshit Mogalapalli
2023-07-04 8:47 ` Greg Kroah-Hartman
2023-07-04 9:56 ` Thorsten Leemhuis
2023-07-04 12:28 ` Greg Kroah-Hartman
2023-07-05 17:36 ` Mike Kravetz
2023-07-04 10:53 ` Arnd Bergmann
2023-07-04 12:29 ` Greg Kroah-Hartman
2023-07-05 7:09 ` Conor Dooley
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=20230703184519.591298957@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=alexander.deucher@amd.com \
--cc=bas@basnieuwenhuizen.nl \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
/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