Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ubuntu 24.04 LTS #42

Open
geekjy opened this issue May 1, 2024 · 0 comments
Open

Support Ubuntu 24.04 LTS #42

geekjy opened this issue May 1, 2024 · 0 comments

Comments

@geekjy
Copy link

geekjy commented May 1, 2024

linux-headers-6.8.0-31-generic dont'work.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/kernel/trace/trace_syscalls.c?id=v6.8.8&id2=v6.6.1

diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index de753403cdafbd..9c581d6da843a3 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -556,7 +556,7 @@ static int perf_call_bpf_enter(struct trace_event_call *call, struct pt_regs *re
{
struct syscall_tp_t {
struct trace_entry ent;

  •   unsigned long syscall_nr;
    
  •   int syscall_nr;
      unsigned long args[SYSCALL_DEFINE_MAXARGS];
    
    } __aligned(8) param;
    int i;
    @@ -661,7 +661,7 @@ static int perf_call_bpf_exit(struct trace_event_call *call, struct pt_regs *reg
    {
    struct syscall_tp_t {
    struct trace_entry ent;
  •   unsigned long syscall_nr;
    
  •   int syscall_nr;
      unsigned long ret;
    
    } __aligned(8) param;

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/entry/syscall_32.c?id=v6.8.8&id2=v6.3.1

diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c
index 8cfc9bc73e7f8b..c2235bae17ef66 100644
--- a/arch/x86/entry/syscall_32.c
+++ b/arch/x86/entry/syscall_32.c
@@ -18,8 +18,25 @@
#include <asm/syscalls_32.h>
#undef __SYSCALL

+/*

    • The sys_call_table[] is no longer used for system calls, but
    • kernel/trace/trace_syscalls.c still wants to know the system
    • call address.
  • */
    +#ifdef CONFIG_X86_32
    #define __SYSCALL(nr, sym) _ia32##sym,

-__visible const sys_call_ptr_t ia32_sys_call_table[] = {
+const sys_call_ptr_t sys_call_table[] = {
#include <asm/syscalls_32.h>
};
+#undef __SYSCALL
+#endif
+
+#define __SYSCALL(nr, sym) case nr: return _ia32##sym(regs);
+
+long ia32_sys_call(const struct pt_regs *regs, unsigned int nr)
+{

  • switch (nr) {
  • #include <asm/syscalls_32.h>
  • default: return __ia32_sys_ni_syscall(regs);
  • }
    +};

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/entry/syscall_64.c?id=v6.8.8&id2=v6.6.1

diff --git a/arch/x86/entry/syscall_64.c b/arch/x86/entry/syscall_64.c
index be120eec1fc9f9..33b3f09e6f151e 100644
--- a/arch/x86/entry/syscall_64.c
+++ b/arch/x86/entry/syscall_64.c
@@ -11,8 +11,23 @@
#include <asm/syscalls_64.h>
#undef __SYSCALL

+/*

    • The sys_call_table[] is no longer used for system calls, but
    • kernel/trace/trace_syscalls.c still wants to know the system
    • call address.
  • */
    #define __SYSCALL(nr, sym) _x64##sym,

-asmlinkage const sys_call_ptr_t sys_call_table[] = {
+const sys_call_ptr_t sys_call_table[] = {
#include <asm/syscalls_64.h>
};
+#undef __SYSCALL
+
+#define __SYSCALL(nr, sym) case nr: return _x64##sym(regs);
+
+long x64_sys_call(const struct pt_regs *regs, unsigned int nr)
+{

  • switch (nr) {
  • #include <asm/syscalls_64.h>
  • default: return __x64_sys_ni_syscall(regs);
  • }
    +};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant