Lighten protection against violating GPL to be able to build e.g. anbox kernel modules

This commit is contained in:
Mikhail Novosyolov 2021-01-01 19:13:15 +03:00
parent be1690a0f7
commit 0714c02863
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,39 @@
From 48d6235433c8cffaeb3ede8a0173babf737addaa Mon Sep 17 00:00:00 2001
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Date: Fri, 1 Jan 2021 19:03:29 +0300
Subject: [PATCH] Revert "kallsyms: unexport kallsyms_lookup_name() and
kallsyms_on_each_symbol()"
This reverts commit 0bd476e6c67190b5eb7b6e105c8db8ff61103281.
https://lwn.net/Articles/813350/
anbox kernel modules require kallsyms_lookup_name(), they are not propietary stuff like e.g. Nvidia, I want it to work more than trying to fight with violations of GPL where I do not have enough power.
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
---
kernel/kallsyms.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index fe9de067771c..04b58bccbb0d 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -176,6 +176,7 @@ unsigned long kallsyms_lookup_name(const char *name)
}
return module_kallsyms_lookup_name(name);
}
+EXPORT_SYMBOL_GPL(kallsyms_lookup_name);
int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
unsigned long),
@@ -194,6 +195,7 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
}
return module_kallsyms_on_each_symbol(fn, data);
}
+EXPORT_SYMBOL_GPL(kallsyms_on_each_symbol);
static unsigned long get_symbol_pos(unsigned long addr,
unsigned long *symbolsize,
--
2.30.0

View file

@ -322,6 +322,7 @@ Patch306: 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch
# TODO: tune 50 and 100 MB to some not random and mathemetically explainable values # TODO: tune 50 and 100 MB to some not random and mathemetically explainable values
# https://www.linux.org.ru/news/kernel/16052362?cid=16075323 # https://www.linux.org.ru/news/kernel/16052362?cid=16075323
Patch307: le9pf.diff Patch307: le9pf.diff
Patch308: 0001-Revert-kallsyms-unexport-kallsyms_lookup_name-and-ka.patch
# Disable AutoReq # Disable AutoReq
AutoReq: 0 AutoReq: 0