mcctrl: remove in-kernel calls to syscalls

Since 4.17.0, kernel cannot call syscalls directly because the calling
convention can be different on x86_64, as explained in this email:
https://lore.kernel.org/lkml/20180325162527.GA17492@light.dominikbrodowski.net

Use the ksys_* alternatives instead when possible, or for readlink use
do_readlinkat (and use readlinkat all the time to simplify ifdefs)

It might be possible to change some of these without ifdefs, but for
example ksys_unshare only got introduced in 4.17 so we need to keep some
syscall calling...

Change-Id: Ic47e184b29ef8b21731b2eae6193b0af2548b872
This commit is contained in:
Dominique Martinet
2018-11-19 17:27:26 +09:00
parent db4d19e419
commit 583cb94667
3 changed files with 25 additions and 9 deletions

View File

@@ -422,7 +422,7 @@ extern long (*mcctrl_sched_setaffinity)(pid_t pid,
extern int (*mcctrl_sched_setscheduler_nocheck)(struct task_struct *p,
int policy,
const struct sched_param *param);
extern ssize_t (*mcctrl_sys_readlink)(const char *path, char *buf,
extern ssize_t (*mcctrl_sys_readlinkat)(int dfd, const char *path, char *buf,
size_t bufsiz);
extern void (*mcctrl_zap_page_range)(struct vm_area_struct *vma,
unsigned long start,