Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28953
b: refs/heads/master
c: 1b2db9f
h: refs/heads/master
i:
  28951: 312cc2f
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jun 23, 2006
1 parent f261cb9 commit 9ffe17f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b63d64a324056cf3c2f7a1a1fe8134100edbb058
refs/heads/master: 1b2db9fb7adc4d67d9ce7d16ce79c41ee84730fe
1 change: 1 addition & 0 deletions trunk/arch/i386/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,4 @@ ENTRY(sys_call_table)
.long sys_sync_file_range
.long sys_tee /* 315 */
.long sys_vmsplice
.long sys_move_pages
1 change: 1 addition & 0 deletions trunk/arch/x86_64/ia32/ia32entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -696,4 +696,5 @@ ia32_sys_call_table:
.quad sys_sync_file_range
.quad sys_tee
.quad compat_sys_vmsplice
.quad compat_sys_move_pages
ia32_syscall_end:
3 changes: 2 additions & 1 deletion trunk/include/asm-i386/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,11 @@
#define __NR_sync_file_range 314
#define __NR_tee 315
#define __NR_vmsplice 316
#define __NR_move_pages 317

#ifdef __KERNEL__

#define NR_syscalls 317
#define NR_syscalls 318

/*
* user-visible error numbers are in the range -1 - -128: see
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
const int __user *nodes,
int __user *status,
int flags);
asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
void __user *pages,
const int __user *nodes,
int __user *status,
int flags);
asmlinkage long sys_mbind(unsigned long start, unsigned long len,
unsigned long mode,
unsigned long __user *nmask,
Expand Down
23 changes: 23 additions & 0 deletions trunk/kernel/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/unistd.h>
#include <linux/security.h>
#include <linux/timex.h>
#include <linux/migrate.h>

#include <asm/uaccess.h>

Expand Down Expand Up @@ -934,3 +935,25 @@ asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp)

return ret;
}

#ifdef CONFIG_NUMA
asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_pages,
void __user *pages32,
const int __user *nodes,
int __user *status,
int flags)
{
const void __user * __user *pages;
int i;

pages = compat_alloc_user_space(nr_pages * sizeof(void *));
for (i = 0; i < nr_pages; i++) {
compat_uptr_t p;

if (get_user(p, (compat_uptr_t *)(pages32 + i)) ||
put_user(compat_ptr(p), pages + i))
return -EFAULT;
}
return sys_move_pages(pid, nr_pages, pages, nodes, status, flags);
}
#endif
1 change: 1 addition & 0 deletions trunk/kernel/sys_ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ cond_syscall(sys_mincore);
cond_syscall(sys_madvise);
cond_syscall(sys_mremap);
cond_syscall(sys_remap_file_pages);
cond_syscall(compat_sys_move_pages);

0 comments on commit 9ffe17f

Please sign in to comment.