On 4/26/20 10:26 AM, Randy Dunlap wrote: > On 4/26/20 12:16 AM, akpm@xxxxxxxxxxxxxxxxxxxx wrote: >> The mm-of-the-moment snapshot 2020-04-26-00-15 has been uploaded to >> >> http://www.ozlabs.org/~akpm/mmotm/ >> >> mmotm-readme.txt says >> >> README for mm-of-the-moment: >> >> http://www.ozlabs.org/~akpm/mmotm/ >> >> This is a snapshot of my -mm patch queue. Uploaded at random hopefully >> more than once a week. >> >> You will need quilt to apply these patches to the latest Linus release (5.x >> or 5.x-rcY). The series file is in broken-out.tar.gz and is duplicated in >> http://ozlabs.org/~akpm/mmotm/series >> >> The file broken-out.tar.gz contains two datestamp files: .DATE and >> .DATE-yyyy-mm-dd-hh-mm-ss. Both contain the string yyyy-mm-dd-hh-mm-ss, >> followed by the base kernel version against which this patch series is to >> be applied. > > Hi, > I'm seeing lots of build failures in mm/madvise.c. > > Is Minchin's patch only partially applied or is it just missing some pieces? > > a. mm/madvise.c needs to #include <linux/uio.h> > > b. looks like the sys_process_madvise() prototype in <linux/syscalls.h> > has not been updated: > > In file included from ../mm/madvise.c:11:0: > ../include/linux/syscalls.h:239:18: error: conflicting types for ‘sys_process_madvise’ > asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ > ^ > ../include/linux/syscalls.h:225:2: note: in expansion of macro ‘__SYSCALL_DEFINEx’ > __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~ > ../include/linux/syscalls.h:219:36: note: in expansion of macro ‘SYSCALL_DEFINEx’ > #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~ > ../mm/madvise.c:1295:1: note: in expansion of macro ‘SYSCALL_DEFINE6’ > SYSCALL_DEFINE6(process_madvise, int, which, pid_t, upid, > ^~~~~~~~~~~~~~~ > In file included from ../mm/madvise.c:11:0: > ../include/linux/syscalls.h:880:17: note: previous declaration of ‘sys_process_madvise’ was here > asmlinkage long sys_process_madvise(int which, pid_t pid, unsigned long start, > ^~~~~~~~~~~~~~~~~~~ I had to add 2 small patches to have clean madvise.c builds: --- include/linux/syscalls.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- mmotm-2020-0426-0015.orig/include/linux/syscalls.h +++ mmotm-2020-0426-0015/include/linux/syscalls.h @@ -876,9 +876,9 @@ asmlinkage long sys_munlockall(void); asmlinkage long sys_mincore(unsigned long start, size_t len, unsigned char __user * vec); asmlinkage long sys_madvise(unsigned long start, size_t len, int behavior); - -asmlinkage long sys_process_madvise(int which, pid_t pid, unsigned long start, - size_t len, int behavior, unsigned long flags); +asmlinkage long sys_process_madvise(int which, pid_t upid, + const struct iovec __user *vec, unsigned long vlen, + int behavior, unsigned long flags); asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long flags); --- and --- mm/madvise.c | 2 ++ 1 file changed, 2 insertions(+) --- mmotm-2020-0426-0015.orig/mm/madvise.c +++ mmotm-2020-0426-0015/mm/madvise.c @@ -23,12 +23,14 @@ #include <linux/file.h> #include <linux/blkdev.h> #include <linux/backing-dev.h> +#include <linux/compat.h> #include <linux/pagewalk.h> #include <linux/swap.h> #include <linux/swapops.h> #include <linux/shmem_fs.h> #include <linux/mmu_notifier.h> #include <linux/sched/mm.h> +#include <linux/uio.h> #include <asm/tlb.h>