summaryrefslogtreecommitdiff
path: root/nongnu
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2026-04-13 16:54:27 +0800
committerHilton Chain <hako@ultrarare.space>2026-04-16 23:01:31 +0800
commit4f0a0c8956cba9f103071d3552f25f2e15e06612 (patch)
treed491e0472933d97cd1cdcf744bbd4942461facca /nongnu
parent5d8b56d6a07cdc1aa3022737c32ccb95f08aef08 (diff)
nongnu: nvidia-module-open: Add IBT support.
* nongnu/packages/patches/nvidia-module-open-add-ibt-support.patch: New file. * nongnu/packages/nvidia.scm (nvidia-module-open-580, nvidia-module-open-590) (nvidia-module-open-595, nvidia-module-open-beta): Apply patch.
Diffstat (limited to 'nongnu')
-rw-r--r--nongnu/packages/nvidia.scm17
-rw-r--r--nongnu/packages/patches/nvidia-module-open-add-ibt-support.patch26
2 files changed, 39 insertions, 4 deletions
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm
index 4036020..be59ec4 100644
--- a/nongnu/packages/nvidia.scm
+++ b/nongnu/packages/nvidia.scm
@@ -54,6 +54,7 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (nongnu packages)
#:use-module (nongnu packages game-client)
#:use-module (nongnu packages linux)
#:use-module (nongnu packages video)
@@ -1022,7 +1023,9 @@ driver.")))
(file-name (git-file-name name version))
(sha256
(base32
- "01nq1hmb0kcd7wx38z5a1ivc6r1z3vbwp1zcyz0wijvanhnvrpmz"))))
+ "01nq1hmb0kcd7wx38z5a1ivc6r1z3vbwp1zcyz0wijvanhnvrpmz"))
+ (patches
+ (nongnu-patches "nvidia-module-open-add-ibt-support.patch"))))
(build-system linux-module-build-system)
(arguments
(list
@@ -1069,7 +1072,9 @@ NVIDIA driver.")
(file-name (git-file-name name version))
(sha256
(base32
- "13izbl0npxc6mxaq7123sj7cqksqwcha8fgsgj2dphdk1dz8fh44"))))
+ "13izbl0npxc6mxaq7123sj7cqksqwcha8fgsgj2dphdk1dz8fh44"))
+ (patches
+ (nongnu-patches "nvidia-module-open-add-ibt-support.patch"))))
(synopsis "Proprietary NVIDIA driver (open source kernel modules), new feature branch")))
(define-public nvidia-module-open-595
@@ -1086,7 +1091,9 @@ NVIDIA driver.")
(file-name (git-file-name name version))
(sha256
(base32
- "0zz2297icklbjk4301vahsfkxdznbp48f0yxvf972c8w7p4wkfz8"))))
+ "0zz2297icklbjk4301vahsfkxdznbp48f0yxvf972c8w7p4wkfz8"))
+ (patches
+ (nongnu-patches "nvidia-module-open-add-ibt-support.patch"))))
(synopsis "Proprietary NVIDIA driver (open source kernel modules), production branch")))
(define-public nvidia-module-open-beta
@@ -1103,7 +1110,9 @@ NVIDIA driver.")
(file-name (git-file-name name version))
(sha256
(base32
- "108faqi446ck42gc9q10dbl0779yagyp853phay14ahkdhi5z8xs"))))
+ "108faqi446ck42gc9q10dbl0779yagyp853phay14ahkdhi5z8xs"))
+ (patches
+ (nongnu-patches "nvidia-module-open-add-ibt-support.patch"))))
(synopsis "Proprietary NVIDIA driver (open source kernel modules), beta")))
(define-public nvidia-module-open nvidia-module-open-580)
diff --git a/nongnu/packages/patches/nvidia-module-open-add-ibt-support.patch b/nongnu/packages/patches/nvidia-module-open-add-ibt-support.patch
new file mode 100644
index 0000000..3b30da8
--- /dev/null
+++ b/nongnu/packages/patches/nvidia-module-open-add-ibt-support.patch
@@ -0,0 +1,26 @@
+From ca238f1f305d5db05a3bde44ae275965765b2ab9 Mon Sep 17 00:00:00 2001
+From: Peter Jung <admin@ptr1337.dev>
+Date: Fri, 18 Oct 2024 22:40:58 +0200
+Subject: [PATCH 2/8] Add IBT support
+
+Source: https://github.com/CachyOS/kernel-patches/blob/master/6.18/misc/nvidia/0002-Add-IBT-support.patch
+
+Signed-off-by: Peter Jung <admin@ptr1337.dev>
+---
+ src/nvidia-modeset/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/nvidia-modeset/Makefile b/src/nvidia-modeset/Makefile
+index 8f24541d..195d0fcf 100644
+--- a/src/nvidia-modeset/Makefile
++++ b/src/nvidia-modeset/Makefile
+@@ -154,6 +154,7 @@ ifeq ($(TARGET_ARCH),x86_64)
+ CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -fno-jump-tables)
+ CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mindirect-branch=thunk-extern)
+ CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mindirect-branch-register)
++ CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mharden-sls=all)
+ endif
+
+ CFLAGS += $(CONDITIONAL_CFLAGS)
+--
+2.49.0.391.g4bbb303af6