this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update darlingserver and libkqueue

+27 -24
+7 -4
src/kernel/emulation/linux/misc/proc_info.c
··· 20 20 #include "../vchroot_expand.h" 21 21 #include <stdbool.h> 22 22 #include <sys/proc.h> 23 - #include <lkm/api.h> 24 - #include "../mach/lkm.h" 25 23 #include "sysctl_proc.h" 26 24 #include <stddef.h> 27 25 #include "../elfcalls_wrapper.h" 26 + #include <darlingserver/rpc.h> 28 27 29 28 #define LINUX_PR_SET_NAME 15 30 29 ··· 419 418 info->pbsi_gid = info->pbsi_rgid = info->pbsi_svgid = gid; 420 419 421 420 // 32/64 bit detection 422 - if (lkm_call(NR_task_64bit, (void*)(long)pid) > 0) 421 + bool is_64_bit; 422 + if (dserver_rpc_task_is_64_bit(pid, &is_64_bit) < 0) { 423 + is_64_bit = false; 424 + } 425 + if (is_64_bit) 423 426 info->pbsi_flags |= P_LP64; 424 427 425 428 return 1; ··· 810 813 bail: 811 814 close_internal(fd); 812 815 return count * sizeof(uint64_t); 813 - } 816 + }
+7 -3
src/kernel/emulation/linux/misc/sysctl_proc.c
··· 9 9 #include "../fcntl/open.h" 10 10 #include "../simple.h" 11 11 #include "sysctl_proc.h" 12 - #include <lkm/api.h> 13 - #include "../mach/lkm.h" 12 + #include <darlingserver/rpc.h> 14 13 15 14 #ifndef isdigit 16 15 # define isdigit(c) (c >= '0' && c <= '9') ··· 193 192 memset(kinfo, 0, sizeof(*kinfo)); 194 193 195 194 kinfo->kinfo.kp_proc.p_pid = __simple_atoi(name, NULL); 196 - if (lkm_call(NR_task_64bit, (void*)(long)kinfo->kinfo.kp_proc.p_pid) > 0) 195 + 196 + bool is_64_bit; 197 + if (dserver_rpc_task_is_64_bit(kinfo->kinfo.kp_proc.p_pid, &is_64_bit) < 0) { 198 + is_64_bit = false; 199 + } 200 + if (is_64_bit) 197 201 kinfo->kinfo.kp_proc.p_flag |= P_LP64; 198 202 199 203 if (!read_string(path, stat, sizeof(stat)))
+13 -17
src/kernel/emulation/linux/misc/sysctl_sysctl.c
··· 1 1 #include "sysctl_sysctl.h" 2 - #include <lkm/api.h> 3 2 #include <mach/machine.h> 4 3 #include <sys/errno.h> 5 - 6 - extern int lkm_call(int call, void*); 4 + #include <darlingserver/rpc.h> 7 5 8 6 enum { 9 7 _PROC_CPUTYPE = 1000, ··· 21 19 if (nlen < 3) 22 20 return -ENOENT; 23 21 24 - int pid = name[2]; 25 - int is64bit = lkm_call(NR_task_64bit, (void*)(long)pid); 26 - 27 - if (is64bit < 0) 22 + bool is64bit; 23 + if (dserver_rpc_task_is_64_bit(name[2], &is64bit) < 0) { 28 24 return -ENOENT; 29 - else 30 - { 31 - if (*oldlen < sizeof(int)) 32 - return -EINVAL; 25 + } 26 + 27 + if (*oldlen < sizeof(int)) 28 + return -EINVAL; 33 29 34 30 #if defined(__i386__) || defined(__x86_64__) 35 - *((unsigned int*) old) = CPU_TYPE_I386; 31 + *((unsigned int*) old) = CPU_TYPE_I386; 36 32 #elif defined(__arm__) || defined(__aarch64__) 37 - *((unsigned int*) old) = CPU_TYPE_ARM; 33 + *((unsigned int*) old) = CPU_TYPE_ARM; 38 34 #else 39 35 # warning Missing code for this arch! 40 - *((unsigned int*) old) = 0; 36 + *((unsigned int*) old) = 0; 41 37 #endif 42 38 43 - if (is64bit) 44 - *((unsigned int*) old) |= CPU_ARCH_ABI64; 45 - } 39 + if (is64bit) 40 + *((unsigned int*) old) |= CPU_ARCH_ABI64; 41 + 46 42 47 43 return 0; 48 44 }