summarylogtreecommitdiffstats
path: root/disable-objtool-override.patch
blob: 6d626c61eeb77a118a73de507f8064e00817cc75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 77af76b80b3dea6df69af616d45e4c6a1d26bf4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
Date: Mon, 16 Feb 2026 01:07:18 +0000
Subject: [PATCH] Disable final processing of .o files with binary blobs

Due to the fact that the driver is unmaintained, and can't be adapted
to the current Linux kernel security standards (e.g. IBT), as it has a
proprietary blob; as this is likely to be an ever-growing security risk:
Use at your own risk; no warranty of any kind is provided.
---
 Kbuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Kbuild b/Kbuild
index f333e0b..9381ab1 100644
--- a/Kbuild
+++ b/Kbuild
@@ -55,6 +55,20 @@ ifeq ($(NV_UNDEF_BEHAVIOR_SANITIZER),1)
  UBSAN_SANITIZE := y
 endif
 
+# This is an *ugly* hack to disable objtool during the final processing of the
+# objects that embed the proprietary blobs. Objtool can't process them, as they
+# do not follow the requirements of current kernels, including support for
+# critical security features. In Ubuntu 26.04+, this causes a build error.
+# Disable it at your own risk. Note that the MIT license applies:
+# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+nvidia.o nvidia-modeset.o: override objtool-enabled =
+
 $(foreach _module, $(NV_KERNEL_MODULES), \
  $(eval include $(src)/$(_module)/$(_module).Kbuild))
 
-- 
2.53.0