[vdr-softhddevice] Update to 1.12.2
by Martin Gansser
commit f95fd2896bd62cdbe565a0289a220d6898aec736
Author: Martin Gansser <mgansser(a)online.de>
Date: Wed Sep 6 16:44:35 2023 +0200
Update to 1.12.2
.gitignore | 1 +
sources | 2 +-
vdr-softhddevice.spec | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 263189d..0f791d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@
/vdr-softhddevice-1.11.2.tar.gz
/vdr-softhddevice-1.12.0.tar.gz
/vdr-softhddevice-1.12.1.tar.gz
+/vdr-softhddevice-1.12.2.tar.gz
diff --git a/sources b/sources
index f941b34..3b83a39 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (vdr-softhddevice-1.12.1.tar.gz) = 5e11262c408d906228d7c584d3ae538d4929409ad56da45cca5ab2cde77442f2d26c5ade92a071d05f9796808188fd36c47693905c3eda9324e07375fb74935a
+SHA512 (vdr-softhddevice-1.12.2.tar.gz) = 4b6a81d90901c8dfc336e8bbd00c1838a301f5e354691e5db471f19a01cdf041b0cd761620f802e4bc067c485a63b627ff38d8bfed21e0a82470c05eb904aace
diff --git a/vdr-softhddevice.spec b/vdr-softhddevice.spec
index b96d4f2..28b6d12 100644
--- a/vdr-softhddevice.spec
+++ b/vdr-softhddevice.spec
@@ -5,7 +5,7 @@
%endif
Name: vdr-softhddevice
-Version: 1.12.1
+Version: 1.12.2
Release: 1%{?dist}
Summary: A software and GPU emulated HD output device plugin for VDR
@@ -86,6 +86,9 @@ install -Dpm 644 %{SOURCE1} \
%license AGPL-3.0.txt
%changelog
+* Wed Sep 06 2023 Martin Gansser <martinkg(a)fedoraproject.org> - 1.12.2-1
+- Update to 1.12.2
+
* Mon Aug 14 2023 Martin Gansser <martinkg(a)fedoraproject.org> - 1.12.1-1
- Update to 1.12.1
1 year, 2 months
[nvidia-470xx-kmod] Fix for F39 branch
by Leigh Scott
commit 63999d0a0f1225e5f970e0d96f1fe37f61768b3c
Author: orphan <orphan(a)rpmfusion.org>
Date: Wed Sep 6 14:54:06 2023 +0100
Fix for F39 branch
...ernel_6.5-get_user_pages-dropped-vmas-arg.patch | 102 +++++++++++++++++++++
....5-get_user_pages_remote-dropped-vmas-arg.patch | 65 +++++++++++++
nvidia-470xx-kmod.spec | 14 ++-
3 files changed, 180 insertions(+), 1 deletion(-)
---
diff --git a/buildfix_kernel_6.5-get_user_pages-dropped-vmas-arg.patch b/buildfix_kernel_6.5-get_user_pages-dropped-vmas-arg.patch
new file mode 100644
index 0000000..6df3843
--- /dev/null
+++ b/buildfix_kernel_6.5-get_user_pages-dropped-vmas-arg.patch
@@ -0,0 +1,102 @@
+From 738922af87e3d0096cbe737233fe7f28e91310eb Mon Sep 17 00:00:00 2001
+From: Paolo Pisati <paolo.pisati(a)canonical.com>
+Date: Fri, 21 Jul 2023 14:01:39 +0000
+Subject: [PATCH 2/2] Linux 6.5: get_user_pages() dropped vmas arg
+
+Signed-off-by: Paolo Pisati <paolo.pisati(a)canonical.com>
+---
+ common/inc/nv-mm.h | 4 +++
+ conftest.sh | 25 ++++++++++++++++++-
+ nvidia-uvm/uvm_tools.c | 17 +++++++++++++
+ 3 files changed, 45 insertions(+), 1 deletion(-)
+
+diff --git a/common/inc/nv-mm.h b/common/inc/nv-mm.h
+index 321d718c..0ce99fad 100644
+--- a/common/inc/nv-mm.h
++++ b/common/inc/nv-mm.h
+@@ -93,7 +93,11 @@ typedef int vm_fault_t;
+ if (force)
+ flags |= FOLL_FORCE;
+
++#if defined(NV_GET_USER_PAGES_DROPPED_VMA)
++ return get_user_pages(start, nr_pages, flags, pages);
++#else
+ return get_user_pages(start, nr_pages, flags, pages, vmas);
++#endif
+ }
+ #endif
+ #endif
+diff --git a/conftest.sh b/conftest.sh
+index 9b844b84..bcdc8e5c 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -2593,7 +2593,6 @@ compile_test() {
+ # write and force parameters AND that gup has task_struct and
+ # mm_struct as its first arguments.
+ # Return if available.
+- # Fall through to default case if absent.
+
+ echo "$CONFTEST_PREAMBLE
+ #include <linux/mm.h>
+@@ -2617,6 +2616,30 @@ compile_test() {
+ return
+ fi
+
++ # Conftest #4: Check if get_user_pages dropped vmas argument.
++ # Return if postive.
++ # Fall through to default case if absent.
++
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/mm.h>
++ long get_user_pages(unsigned long start,
++ unsigned long nr_pages,
++ unsigned int gup_flags,
++ struct page **pages) {
++ return 0;
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ echo "#undef NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
++ echo "#undef NV_GET_USER_PAGES_HAS_TASK_STRUCT" | append_conftest "functions"
++ echo "#define NV_GET_USER_PAGES_DROPPED_VMA" | append_conftest "functions"
++ rm -f conftest$$.o
++ return
++ fi
++
+ echo "#define NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
+ echo "#define NV_GET_USER_PAGES_HAS_TASK_STRUCT" | append_conftest "functions"
+
+diff --git a/nvidia-uvm/uvm_tools.c b/nvidia-uvm/uvm_tools.c
+index 5e4d112a..9728a228 100644
+--- a/nvidia-uvm/uvm_tools.c
++++ b/nvidia-uvm/uvm_tools.c
+@@ -269,6 +269,23 @@ static NV_STATUS map_user_pages(NvU64 user_va, NvU64 size, void **addr, struct p
+ goto fail;
+ }
+
++#if defined(NV_GET_USER_PAGES_DROPPED_VMA)
++ struct vm_area_struct *vma;
++ unsigned long start;
++
++ nv_mmap_read_lock(current->mm);
++ start = user_va;
++ for (i = 0; i < num_pages; i++) {
++ vma = find_vma(current->mm, start);
++ if (!vma) {
++ nv_mmap_read_unlock(current->mm);
++ status = NV_ERR_INVALID_ARGUMENT;
++ goto fail;
++ }
++ }
++ nv_mmap_read_unlock(current->mm);
++#endif
++
+ for (i = 0; i < num_pages; i++) {
+ if (page_count((*pages)[i]) > MAX_PAGE_COUNT || uvm_file_is_nvidia_uvm(vmas[i]->vm_file)) {
+ status = NV_ERR_INVALID_ARGUMENT;
+--
+2.40.1
+
diff --git a/buildfix_kernel_6.5-get_user_pages_remote-dropped-vmas-arg.patch b/buildfix_kernel_6.5-get_user_pages_remote-dropped-vmas-arg.patch
new file mode 100644
index 0000000..b82ca04
--- /dev/null
+++ b/buildfix_kernel_6.5-get_user_pages_remote-dropped-vmas-arg.patch
@@ -0,0 +1,65 @@
+From dc621d963825e09d9569058be2d046d8902853e8 Mon Sep 17 00:00:00 2001
+From: Paolo Pisati <paolo.pisati(a)canonical.com>
+Date: Fri, 21 Jul 2023 13:17:48 +0000
+Subject: [PATCH] Linux 6.5: get_user_pages_remote() dropped vmas arg
+
+Signed-off-by: Paolo Pisati <paolo.pisati(a)canonical.com>
+---
+ common/inc/nv-mm.h | 4 ++-
+ conftest.sh | 25 ++++++++++++++++++-
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/common/inc/nv-mm.h b/common/inc/nv-mm.h
+index be834b6f..0ce99fad 100644
+--- a/common/inc/nv-mm.h
++++ b/common/inc/nv-mm.h
+@@ -162,7 +162,9 @@ typedef int vm_fault_t;
+ return get_user_pages_remote(mm, start, nr_pages, flags,
+ pages, vmas, NULL);
+ #endif
+-
++ #elif defined(NV_GET_USER_PAGES_REMOTE_DROPPED_VMA)
++ return get_user_pages_remote(mm, start, nr_pages, flags,
++ pages, NULL);
+ #else
+
+ return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
+diff --git a/conftest.sh b/conftest.sh
+index 4e23a9e6..5fbf776a 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -2778,7 +2778,30 @@ compile_test() {
+ echo "#define NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
+ echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
+ fi
+- ;;
++
++ #
++ # conftest #5: check if get_user_pages_remote() does not take
++ # vmas argument.
++ #
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/mm.h>
++ long get_user_pages_remote(struct mm_struct *mm,
++ unsigned long start,
++ unsigned long nr_pages,
++ unsigned int gup_flags,
++ struct page **pages,
++ int *locked) {
++ return 0;
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ echo "#define NV_GET_USER_PAGES_REMOTE_DROPPED_VMA" | append_conftest "functions"
++ rm -f conftest$$.o
++ fi
++ ;;
+
+ usleep_range)
+ #
+--
+2.40.1
+
diff --git a/nvidia-470xx-kmod.spec b/nvidia-470xx-kmod.spec
index 93df26d..4e2cf9e 100644
--- a/nvidia-470xx-kmod.spec
+++ b/nvidia-470xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-470xx-kmod
Epoch: 3
Version: 470.199.02
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
License: Redistributable, no modification permitted
Summary: NVIDIA 470xx display driver kernel module
@@ -20,6 +20,11 @@ URL: https://www.nvidia.com/
Source11: nvidia-470xx-kmodtool-excludekernel-filterfile
+# Patches from ubuntu
+# https://git.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-470/tree...
+Patch0: buildfix_kernel_6.5-get_user_pages-dropped-vmas-arg.patch
+Patch1: buildfix_kernel_6.5-get_user_pages_remote-dropped-vmas-arg.patch
+
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: x86_64
@@ -42,6 +47,10 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterf
%setup -T -c
tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# patch loop
+pushd kernel
+%patch 0 -p1
+%patch 1 -p1
+popd
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -73,6 +82,9 @@ done
%{?akmod_install}
%changelog
+* Wed Sep 06 2023 orphan <orphan(a)rpmfusion.org> - 3:470.199.02-3
+- Fix for F39 branch
+
* Thu Aug 03 2023 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> - 3:470.199.02-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
1 year, 2 months