From: Greg Kroah-Hartman Date: Mon, 3 Jul 2023 18:38:59 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.15.120~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c904fabffff12c1a8a4751c710b41a06031d9f4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: drm-amdgpu-validate-vm-ioctl-flags.patch scripts-tags.sh-resolve-gtags-empty-index-generation.patch --- diff --git a/queue-4.14/drm-amdgpu-validate-vm-ioctl-flags.patch b/queue-4.14/drm-amdgpu-validate-vm-ioctl-flags.patch new file mode 100644 index 00000000000..04371b3bca5 --- /dev/null +++ b/queue-4.14/drm-amdgpu-validate-vm-ioctl-flags.patch @@ -0,0 +1,33 @@ +From a2b308044dcaca8d3e580959a4f867a1d5c37fac Mon Sep 17 00:00:00 2001 +From: Bas Nieuwenhuizen +Date: Sat, 13 May 2023 14:51:00 +0200 +Subject: drm/amdgpu: Validate VM ioctl flags. + +From: Bas Nieuwenhuizen + +commit a2b308044dcaca8d3e580959a4f867a1d5c37fac upstream. + +None have been defined yet, so reject anybody setting any. Mesa sets +it to 0 anyway. + +Signed-off-by: Bas Nieuwenhuizen +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -2712,6 +2712,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: + /* current, we only have requirement to reserve vmid from gfxhub */ diff --git a/queue-4.14/scripts-tags.sh-resolve-gtags-empty-index-generation.patch b/queue-4.14/scripts-tags.sh-resolve-gtags-empty-index-generation.patch new file mode 100644 index 00000000000..6cf511d3879 --- /dev/null +++ b/queue-4.14/scripts-tags.sh-resolve-gtags-empty-index-generation.patch @@ -0,0 +1,65 @@ +From e1b37563caffc410bb4b55f153ccb14dede66815 Mon Sep 17 00:00:00 2001 +From: "Ahmed S. Darwish" +Date: Mon, 15 May 2023 19:32:16 +0200 +Subject: scripts/tags.sh: Resolve gtags empty index generation + +From: Ahmed S. Darwish + +commit e1b37563caffc410bb4b55f153ccb14dede66815 upstream. + +gtags considers any file outside of its current working directory +"outside the source tree" and refuses to index it. For O= kernel builds, +or when "make" is invoked from a directory other then the kernel source +tree, gtags ignores the entire kernel source and generates an empty +index. + +Force-set gtags current working directory to the kernel source tree. + +Due to commit 9da0763bdd82 ("kbuild: Use relative path when building in +a subdir of the source tree"), if the kernel build is done in a +sub-directory of the kernel source tree, the kernel Makefile will set +the kernel's $srctree to ".." for shorter compile-time and run-time +warnings. Consequently, the list of files to be indexed will be in the +"../*" form, rendering all such paths invalid once gtags switches to the +kernel source tree as its current working directory. + +If gtags indexing is requested and the build directory is not the kernel +source tree, index all files in absolute-path form. + +Note, indexing in absolute-path form will not affect the generated +index, as paths in gtags indices are always relative to the gtags "root +directory" anyway (as evidenced by "gtags --dump"). + +Signed-off-by: Ahmed S. Darwish +Cc: +Signed-off-by: Masahiro Yamada +Signed-off-by: Greg Kroah-Hartman +--- + scripts/tags.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/scripts/tags.sh ++++ b/scripts/tags.sh +@@ -37,6 +37,13 @@ find_all_archs() + done + } + ++# gtags(1) refuses to index any file outside of its current working dir. ++# If gtags indexing is requested and the build output directory is not ++# the kernel source tree, index all files in absolute-path form. ++if [[ "$1" == "gtags" && -n "${tree}" ]]; then ++ tree=$(realpath "$tree")/ ++fi ++ + # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH + if [ "${ALLSOURCE_ARCHS}" = "" ]; then + ALLSOURCE_ARCHS=${SRCARCH} +@@ -145,7 +152,7 @@ docscope() + + dogtags() + { +- all_target_sources | gtags -i -f - ++ all_target_sources | gtags -i -C "${tree:-.}" -f - "$PWD" + } + + # Basic regular expressions with an optional /kind-spec/ for ctags and diff --git a/queue-4.14/series b/queue-4.14/series index 91cd0d25fb1..48cea423f55 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -2,3 +2,5 @@ gfs2-don-t-deref-jdesc-in-evict.patch x86-microcode-amd-load-late-on-both-threads-too.patch x86-smp-use-dedicated-cache-line-for-mwait_play_dead.patch fbdev-imsttfb-fix-use-after-free-bug-in-imsttfb_probe.patch +scripts-tags.sh-resolve-gtags-empty-index-generation.patch +drm-amdgpu-validate-vm-ioctl-flags.patch