Skip to content

support sys_get_thread_area api for mips #756

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions arch/mips/kernel/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
return 0;
}

SYSCALL_DEFINE1(get_thread_area,unsigned long __user*,u_info)
{
struct thread_info *ti = task_thread_info(current);
if(copy_to_user(u_info,&(ti->tp_value),sizeof(ti->tp_value))){
return -EFAULT;
}
return 0;
}

static inline int mips_atomic_set(unsigned long addr, unsigned long new)
{
unsigned long old, tmp;
Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/syscalls/syscall_n32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,4 @@
433 n32 fspick sys_fspick
434 n32 pidfd_open sys_pidfd_open
435 n32 clone3 __sys_clone3
436 n32 get_thread_area sys_get_thread_area
1 change: 1 addition & 0 deletions arch/mips/kernel/syscalls/syscall_n64.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,4 @@
433 n64 fspick sys_fspick
434 n64 pidfd_open sys_pidfd_open
435 n64 clone3 __sys_clone3
436 n64 get_thread_area sys_get_thread_area
2 changes: 2 additions & 0 deletions arch/mips/kernel/syscalls/syscall_o32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,5 @@
433 o32 fspick sys_fspick
434 o32 pidfd_open sys_pidfd_open
435 o32 clone3 __sys_clone3
436 o32 get_thread_area sys_get_thread_area