summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2020-03-19 09:19:58 -0400
committergraysky2020-03-19 09:19:58 -0400
commit9ae3a28fa19b416e5e8cc972c1da824bcc00893a (patch)
tree7cb3385e67dcc487d23d018e6c34f16a3b689f6a
parent2f3739c8173183d9ed3c415e74d1d7f8c1e74031 (diff)
downloadaur-9ae3a28fa19b416e5e8cc972c1da824bcc00893a.tar.gz
Update to 340.108-6
-rw-r--r--.SRCINFO12
-rw-r--r--01-fix_multi_core_build.patch (renamed from fix_multi_core_build.patch)0
-rw-r--r--02-unfuck-for-340.108-build-fix.patch (renamed from 01-unfuck-for-340.108-build-fix.patch)0
-rw-r--r--03-unfuck-for-5.5.x.patch (renamed from 02-unfuck-for-5.5.x.patch)0
-rw-r--r--04-fix_message_in_dmesg.patch51
-rw-r--r--PKGBUILD12
6 files changed, 65 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 352dcb4a7595..14b7c44662d3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
pkgver = 340.108
- pkgrel = 5
+ pkgrel = 6
url = https://www.nvidia.com/
arch = x86_64
license = custom
@@ -11,13 +11,15 @@ pkgbase = nvidia-340xx
conflicts = nvidia
options = !strip
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run
- source = 01-unfuck-for-340.108-build-fix.patch
- source = 02-unfuck-for-5.5.x.patch
- source = fix_multi_core_build.patch
+ source = 01-fix_multi_core_build.patch
+ source = 02-unfuck-for-340.108-build-fix.patch
+ source = 03-unfuck-for-5.5.x.patch
+ source = 04-fix_message_in_dmesg.patch
sha256sums = 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77
+ sha256sums = 82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890
sha256sums = 2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57
sha256sums = c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765
- sha256sums = 82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890
+ sha256sums = 7f90e80be6338f6fc902d257d8ceb09e89b40d008f7a3ad9fe82833cd5b89316
pkgname = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
diff --git a/fix_multi_core_build.patch b/01-fix_multi_core_build.patch
index 0f5f687ff927..0f5f687ff927 100644
--- a/fix_multi_core_build.patch
+++ b/01-fix_multi_core_build.patch
diff --git a/01-unfuck-for-340.108-build-fix.patch b/02-unfuck-for-340.108-build-fix.patch
index 7a786de0f392..7a786de0f392 100644
--- a/01-unfuck-for-340.108-build-fix.patch
+++ b/02-unfuck-for-340.108-build-fix.patch
diff --git a/02-unfuck-for-5.5.x.patch b/03-unfuck-for-5.5.x.patch
index 90f257815422..90f257815422 100644
--- a/02-unfuck-for-5.5.x.patch
+++ b/03-unfuck-for-5.5.x.patch
diff --git a/04-fix_message_in_dmesg.patch b/04-fix_message_in_dmesg.patch
new file mode 100644
index 000000000000..f3d70900690d
--- /dev/null
+++ b/04-fix_message_in_dmesg.patch
@@ -0,0 +1,51 @@
+Patch by vova7890
+> vova7890 commented on 2020-03-19 01:01
+> I'm facing this message in dmesg: Bad or missing usercopy whitelist?
+> Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'
+> A little search and I had portback this patch to 340xx.
+> Can you please add this? https://zvova7890.com.ua/s/ed9JJG8KyQKQQBx
+--
+vova7890 commented on 2020-03-19 01:01
+diff -Naur a/nv.c b/nv.c
+--- a/nv.c 2019-12-12 00:04:24.000000000 +0200
++++ b/nv.c 2020-03-19 04:21:13.923750900 +0200
+@@ -752,7 +752,7 @@
+ NV_SPIN_LOCK_INIT(&km_lock);
+ #endif
+
+- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);
++ NV_KMEM_CACHE_CREATE_USERCOPY(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);
+ if (nv_stack_t_cache == NULL)
+ {
+ nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
+diff -Naur a/nv-linux.h b/nv-linux.h
+--- a/nv-linux.h 2019-12-12 00:04:24.000000000 +0200
++++ b/nv-linux.h 2020-03-19 04:21:13.927084233 +0200
+@@ -762,9 +762,27 @@
+ kmem_cache = kmem_cache_create(name, sizeof(type), \
+ 0, 0, NULL); \
+ }
++#define NV_KMEM_CACHE_CREATE_FULL(name, size, align, flags, ctor) \
++ kmem_cache_create(name, size, align, flags, ctor)
+ #else
+ #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
+ #endif
++
++#define NV_KMEM_CACHE_CREATE_FULL_USERCOPY(name, size, align, flags, useroffset, usersize, ctor) \
++ kmem_cache_create_usercopy(name, size, align, flags, useroffset, usersize, ctor);
++
++#ifdef SLAB_USERCOPY
++#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type) \
++ { \
++ kmem_cache = NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL); \
++ }
++#else
++#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type) \
++ { \
++ kmem_cache = NV_KMEM_CACHE_CREATE_FULL_USERCOPY(name, sizeof(type), 0, 0, 0, sizeof(type), NULL); \
++ }
++#endif
++
+ #define NV_KMEM_CACHE_DESTROY(kmem_cache) \
+ { \
+ kmem_cache_destroy(kmem_cache); \
diff --git a/PKGBUILD b/PKGBUILD
index f0099bd7cd36..061ec50202dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgbase=nvidia-340xx
pkgname=(nvidia-340xx nvidia-340xx-dkms)
pkgver=340.108
-pkgrel=5
+pkgrel=6
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
@@ -17,14 +17,16 @@ options=(!strip)
# seems manjaro is keeping this current
# https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
- 01-unfuck-for-340.108-build-fix.patch
- 02-unfuck-for-5.5.x.patch
- fix_multi_core_build.patch
+ 01-fix_multi_core_build.patch
+ 02-unfuck-for-340.108-build-fix.patch
+ 03-unfuck-for-5.5.x.patch
+ 04-fix_message_in_dmesg.patch
)
sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77'
+ '82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890'
'2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57'
'c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765'
- '82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890')
+ '7f90e80be6338f6fc902d257d8ceb09e89b40d008f7a3ad9fe82833cd5b89316')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
# default is 'linux' substitute custom name here