File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed
Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 1616 boot . kernelParams = [ "compat_uts_machine=armv7l" ] ;
1717
1818 boot . kernelPatches = [
19+ # https://lists.ubuntu.com/archives/kernel-team/2016-January/068203.html
20+ # https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/patch/?id=c1da50fa6eddad313360249cadcd4905ac9f82ea
1921 {
2022 name = "compat_uts_machine" ;
21- patch = pkgs . fetchpatch {
22- name = "compat_uts_machine.patch" ;
23- url = "https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/patch/?id=c1da50fa6eddad313360249cadcd4905ac9f82ea" ;
24- hash = "sha256-357+EzMLLt7IINdH0ENE+VcDXwXJMo4qiF/Dorp2Eyw=" ;
25- } ;
23+ patch = ./compat_uts_machine.patch ;
2624 }
2725 ] ;
2826
Original file line number Diff line number Diff line change 1+ diff --git a/kernel/sys.c b/kernel/sys.c
2+ index 259fda2..a2a48f0 100644
3+ --- a/kernel/sys.c
4+ +++ b/kernel/sys.c
5+ @@ -1099,6 +1099,21 @@ out:
6+ DECLARE_RWSEM(uts_sem);
7+
8+ #ifdef COMPAT_UTS_MACHINE
9+ + static char compat_uts_machine[__OLD_UTS_LEN+1] = COMPAT_UTS_MACHINE;
10+ +
11+ + static int __init parse_compat_uts_machine(char *arg)
12+ + {
13+ + strncpy(compat_uts_machine, arg, __OLD_UTS_LEN);
14+ + compat_uts_machine[__OLD_UTS_LEN] = 0;
15+ + return 0;
16+ + }
17+ + early_param("compat_uts_machine", parse_compat_uts_machine);
18+ +
19+ + #undef COMPAT_UTS_MACHINE
20+ + #define COMPAT_UTS_MACHINE compat_uts_machine
21+ + #endif
22+ +
23+ + #ifdef COMPAT_UTS_MACHINE
24+ #define override_architecture(name) \
25+ (personality(current->personality) == PER_LINUX32 && \
26+ copy_to_user(name->machine, COMPAT_UTS_MACHINE, \
You can’t perform that action at this time.
0 commit comments