generated from deepin-community/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff3e489
commit bfa0489
Showing
10 changed files
with
144 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
liblol-dkms (0.1.1) unstable; urgency=low | ||
|
||
* Release 0.1.1 | ||
|
||
-- Miao Wang <[email protected]> Wed, 18 Sep 2024 23:32:00 +0800 | ||
|
||
liblol-dkms (0.1.1~pre1) unstable; urgency=low | ||
|
||
* Add support for kernel 6.11, where fstat and newfstat are introduced. | ||
|
||
-- Miao Wang <[email protected]> Sun, 01 Sep 2024 00:48:00 +0800 | ||
|
||
liblol-dkms (0.1.0) unstable; urgency=low | ||
|
||
* Initial build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
This file is used to test if the coresponding macro is defined in unistd.h | ||
If a macro is defined, the coresponding function will be defined, and | ||
the symbol will be shown in the .o file. Later, the Kbuild script will | ||
generate kernel_feature.h according to the existence of the symbols. | ||
*/ | ||
|
||
#include <asm/unistd.h> | ||
#ifdef __ARCH_WANT_NEW_STAT | ||
void kernel_have_new_stat(void); | ||
void kernel_have_new_stat(void){ } | ||
#endif | ||
#ifndef __SYSCALL | ||
void kernel_have_systbl(void); | ||
void kernel_have_systbl(void){ } | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#include <linux/stat.h> | ||
extern int (*p_vfs_fstatat)(int dfd, const char __user *filename, | ||
struct kstat *stat, int flags); | ||
extern int (*p_vfs_fstat)(int fd, struct kstat *stat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#include "systable.h" | ||
#include "kernel_feature.h" | ||
|
||
/* | ||
In 6.11 or newer, the asm-generic/unistd.h is not used by the loongarch | ||
asm/unistd.h. Instead, the definition of the syscall table and the syscall | ||
numbers is generated after commit 26a3b85bac08 ("loongarch: convert to | ||
generic syscall table"). As a result, we can no more get the definition of | ||
those syscalls that are not available on Loongarch. | ||
To solve this problem, we still use asm-generic/unistd.h to retrive the | ||
definitions. | ||
To avoid any possible conflicts, only syscall related data are defined here. | ||
No functions are implemented here, so the above hacks will not affect other | ||
parts of our module and will not introduce unexpected changes related to the | ||
syscall numbers, ensuring the consistence of our module with the kernel. | ||
*/ | ||
|
||
#include <asm-generic/unistd.h> | ||
|
||
/* | ||
And we also need those hacks to prevent including asm/unistd.h, which will | ||
cause redefinition of the syscall numbers. | ||
*/ | ||
|
||
#define _LINUX_UNISTD_H_ /* prevent loading uapi/linux/unistd.h */ | ||
#define __ASM_VDSO_H /* prevent loading asm/vdso.h */ | ||
#define _ASM_SECCOMP_H /* prevent loading asm/seccomp.h */ | ||
#include <linux/syscalls.h> | ||
|
||
#define __ARCH_WANT_SET_GET_RLIMIT | ||
#define __ARCH_WANT_NEW_STAT | ||
|
||
#undef __SYSCALL | ||
#define __SYSCALL(nr, call) [nr] = (#call), | ||
|
||
const char *sys_call_table_name[__NR_syscalls] = { | ||
[0 ... __NR_syscalls - 1] = "sys_ni_syscall", | ||
#include <asm-generic/unistd.h> | ||
}; | ||
|
||
struct syscall_replace_table syscall_to_replace[] = { | ||
#ifndef KERNEL_HAVE_NEW_STAT | ||
{ __NR_fstat, sys_newfstat }, | ||
{ __NR_newfstatat, sys_newfstatat }, | ||
#endif | ||
{ __NR_getrlimit, NULL }, | ||
{ __NR_setrlimit, NULL }, | ||
{ __NR_rt_sigprocmask, sys_rt_sigprocmask }, | ||
{ __NR_rt_sigpending, sys_rt_sigpending }, | ||
{ __NR_rt_sigtimedwait, sys_rt_sigtimedwait }, | ||
{ __NR_rt_sigaction, sys_rt_sigaction }, | ||
{ __NR_rt_sigsuspend, sys_rt_sigsuspend }, | ||
{ __NR_pselect6, sys_pselect6 }, | ||
{ __NR_ppoll, sys_ppoll }, | ||
#ifdef CONFIG_SIGNALFD | ||
{ __NR_signalfd4, sys_signalfd4 }, | ||
#endif | ||
#ifdef CONFIG_EPOLL | ||
{ __NR_epoll_pwait, sys_epoll_pwait }, | ||
{ __NR_epoll_pwait2, sys_epoll_pwait2 }, | ||
#endif | ||
{ -1, NULL }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
struct syscall_replace_table { | ||
long syscall_num; | ||
void *symbol_addr; | ||
void *orig; | ||
}; | ||
|
||
extern const char *sys_call_table_name[]; | ||
extern struct syscall_replace_table syscall_to_replace[]; |