aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:13:54 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:14 -0500
commit2ed7c03ec17779afb4fcfa3b8c61df61bd4879ba (patch)
tree4e0fefd574bab5470a02edf439727f472a9663c6
parent4c696ba7982501d43dea11dbbaabd2aa8a19cc42 (diff)
[CVE-2009-0029] Convert all system calls to return a long
Convert all system calls to return a long. This should be a NOP since all converted types should have the same size anyway. With the exception of sys_exit_group which returned void. But that doesn't matter since the system call doesn't return. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--fs/read_write.c18
-rw-r--r--fs/xattr.c12
-rw-r--r--include/linux/syscalls.h79
-rw-r--r--ipc/mqueue.c2
-rw-r--r--kernel/exit.c4
-rw-r--r--kernel/signal.c2
-rw-r--r--kernel/timer.c2
-rw-r--r--mm/filemap.c2
-rw-r--r--mm/mmap.c2
-rw-r--r--mm/mremap.c2
-rw-r--r--mm/nommu.c2
11 files changed, 64 insertions, 63 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 5cc6924eb158..940367f51f2a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -147,7 +147,7 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin)
147} 147}
148EXPORT_SYMBOL(vfs_llseek); 148EXPORT_SYMBOL(vfs_llseek);
149 149
150asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) 150asmlinkage long sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
151{ 151{
152 off_t retval; 152 off_t retval;
153 struct file * file; 153 struct file * file;
@@ -369,7 +369,7 @@ static inline void file_pos_write(struct file *file, loff_t pos)
369 file->f_pos = pos; 369 file->f_pos = pos;
370} 370}
371 371
372asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) 372asmlinkage long sys_read(unsigned int fd, char __user * buf, size_t count)
373{ 373{
374 struct file *file; 374 struct file *file;
375 ssize_t ret = -EBADF; 375 ssize_t ret = -EBADF;
@@ -386,7 +386,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
386 return ret; 386 return ret;
387} 387}
388 388
389asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) 389asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count)
390{ 390{
391 struct file *file; 391 struct file *file;
392 ssize_t ret = -EBADF; 392 ssize_t ret = -EBADF;
@@ -403,7 +403,7 @@ asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t co
403 return ret; 403 return ret;
404} 404}
405 405
406asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, 406asmlinkage long sys_pread64(unsigned int fd, char __user *buf,
407 size_t count, loff_t pos) 407 size_t count, loff_t pos)
408{ 408{
409 struct file *file; 409 struct file *file;
@@ -424,7 +424,7 @@ asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf,
424 return ret; 424 return ret;
425} 425}
426 426
427asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, 427asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
428 size_t count, loff_t pos) 428 size_t count, loff_t pos)
429{ 429{
430 struct file *file; 430 struct file *file;
@@ -672,7 +672,7 @@ ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
672 672
673EXPORT_SYMBOL(vfs_writev); 673EXPORT_SYMBOL(vfs_writev);
674 674
675asmlinkage ssize_t 675asmlinkage long
676sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) 676sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
677{ 677{
678 struct file *file; 678 struct file *file;
@@ -693,7 +693,7 @@ sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
693 return ret; 693 return ret;
694} 694}
695 695
696asmlinkage ssize_t 696asmlinkage long
697sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) 697sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
698{ 698{
699 struct file *file; 699 struct file *file;
@@ -812,7 +812,7 @@ out:
812 return retval; 812 return retval;
813} 813}
814 814
815asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count) 815asmlinkage long sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count)
816{ 816{
817 loff_t pos; 817 loff_t pos;
818 off_t off; 818 off_t off;
@@ -831,7 +831,7 @@ asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, siz
831 return do_sendfile(out_fd, in_fd, NULL, count, 0); 831 return do_sendfile(out_fd, in_fd, NULL, count, 0);
832} 832}
833 833
834asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count) 834asmlinkage long sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count)
835{ 835{
836 loff_t pos; 836 loff_t pos;
837 ssize_t ret; 837 ssize_t ret;
diff --git a/fs/xattr.c b/fs/xattr.c
index 237804cd6b56..d049ae27aae7 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -349,7 +349,7 @@ getxattr(struct dentry *d, const char __user *name, void __user *value,
349 return error; 349 return error;
350} 350}
351 351
352asmlinkage ssize_t 352asmlinkage long
353sys_getxattr(const char __user *pathname, const char __user *name, 353sys_getxattr(const char __user *pathname, const char __user *name,
354 void __user *value, size_t size) 354 void __user *value, size_t size)
355{ 355{
@@ -364,7 +364,7 @@ sys_getxattr(const char __user *pathname, const char __user *name,
364 return error; 364 return error;
365} 365}
366 366
367asmlinkage ssize_t 367asmlinkage long
368sys_lgetxattr(const char __user *pathname, const char __user *name, void __user *value, 368sys_lgetxattr(const char __user *pathname, const char __user *name, void __user *value,
369 size_t size) 369 size_t size)
370{ 370{
@@ -379,7 +379,7 @@ sys_lgetxattr(const char __user *pathname, const char __user *name, void __user
379 return error; 379 return error;
380} 380}
381 381
382asmlinkage ssize_t 382asmlinkage long
383sys_fgetxattr(int fd, const char __user *name, void __user *value, size_t size) 383sys_fgetxattr(int fd, const char __user *name, void __user *value, size_t size)
384{ 384{
385 struct file *f; 385 struct file *f;
@@ -424,7 +424,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
424 return error; 424 return error;
425} 425}
426 426
427asmlinkage ssize_t 427asmlinkage long
428sys_listxattr(const char __user *pathname, char __user *list, size_t size) 428sys_listxattr(const char __user *pathname, char __user *list, size_t size)
429{ 429{
430 struct path path; 430 struct path path;
@@ -438,7 +438,7 @@ sys_listxattr(const char __user *pathname, char __user *list, size_t size)
438 return error; 438 return error;
439} 439}
440 440
441asmlinkage ssize_t 441asmlinkage long
442sys_llistxattr(const char __user *pathname, char __user *list, size_t size) 442sys_llistxattr(const char __user *pathname, char __user *list, size_t size)
443{ 443{
444 struct path path; 444 struct path path;
@@ -452,7 +452,7 @@ sys_llistxattr(const char __user *pathname, char __user *list, size_t size)
452 return error; 452 return error;
453} 453}
454 454
455asmlinkage ssize_t 455asmlinkage long
456sys_flistxattr(int fd, char __user *list, size_t size) 456sys_flistxattr(int fd, char __user *list, size_t size)
457{ 457{
458 struct file *f; 458 struct file *f;
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index a7593f670ca6..22290eeaf553 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -77,7 +77,7 @@ asmlinkage long sys_times(struct tms __user *tbuf);
77 77
78asmlinkage long sys_gettid(void); 78asmlinkage long sys_gettid(void);
79asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); 79asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
80asmlinkage unsigned long sys_alarm(unsigned int seconds); 80asmlinkage long sys_alarm(unsigned int seconds);
81asmlinkage long sys_getpid(void); 81asmlinkage long sys_getpid(void);
82asmlinkage long sys_getppid(void); 82asmlinkage long sys_getppid(void);
83asmlinkage long sys_getuid(void); 83asmlinkage long sys_getuid(void);
@@ -166,7 +166,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
166 unsigned long flags); 166 unsigned long flags);
167 167
168asmlinkage long sys_exit(int error_code); 168asmlinkage long sys_exit(int error_code);
169asmlinkage void sys_exit_group(int error_code); 169asmlinkage long sys_exit_group(int error_code);
170asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, 170asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
171 int options, struct rusage __user *ru); 171 int options, struct rusage __user *ru);
172asmlinkage long sys_waitid(int which, pid_t pid, 172asmlinkage long sys_waitid(int which, pid_t pid,
@@ -196,7 +196,7 @@ asmlinkage long sys_tkill(int pid, int sig);
196asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); 196asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
197asmlinkage long sys_sgetmask(void); 197asmlinkage long sys_sgetmask(void);
198asmlinkage long sys_ssetmask(int newmask); 198asmlinkage long sys_ssetmask(int newmask);
199asmlinkage unsigned long sys_signal(int sig, __sighandler_t handler); 199asmlinkage long sys_signal(int sig, __sighandler_t handler);
200asmlinkage long sys_pause(void); 200asmlinkage long sys_pause(void);
201 201
202asmlinkage long sys_sync(void); 202asmlinkage long sys_sync(void);
@@ -246,29 +246,29 @@ asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name,
246 const void __user *value, size_t size, int flags); 246 const void __user *value, size_t size, int flags);
247asmlinkage long sys_fsetxattr(int fd, const char __user *name, 247asmlinkage long sys_fsetxattr(int fd, const char __user *name,
248 const void __user *value, size_t size, int flags); 248 const void __user *value, size_t size, int flags);
249asmlinkage ssize_t sys_getxattr(const char __user *path, const char __user *name, 249asmlinkage long sys_getxattr(const char __user *path, const char __user *name,
250 void __user *value, size_t size); 250 void __user *value, size_t size);
251asmlinkage ssize_t sys_lgetxattr(const char __user *path, const char __user *name, 251asmlinkage long sys_lgetxattr(const char __user *path, const char __user *name,
252 void __user *value, size_t size); 252 void __user *value, size_t size);
253asmlinkage ssize_t sys_fgetxattr(int fd, const char __user *name, 253asmlinkage long sys_fgetxattr(int fd, const char __user *name,
254 void __user *value, size_t size); 254 void __user *value, size_t size);
255asmlinkage ssize_t sys_listxattr(const char __user *path, char __user *list, 255asmlinkage long sys_listxattr(const char __user *path, char __user *list,
256 size_t size); 256 size_t size);
257asmlinkage ssize_t sys_llistxattr(const char __user *path, char __user *list, 257asmlinkage long sys_llistxattr(const char __user *path, char __user *list,
258 size_t size); 258 size_t size);
259asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); 259asmlinkage long sys_flistxattr(int fd, char __user *list, size_t size);
260asmlinkage long sys_removexattr(const char __user *path, 260asmlinkage long sys_removexattr(const char __user *path,
261 const char __user *name); 261 const char __user *name);
262asmlinkage long sys_lremovexattr(const char __user *path, 262asmlinkage long sys_lremovexattr(const char __user *path,
263 const char __user *name); 263 const char __user *name);
264asmlinkage long sys_fremovexattr(int fd, const char __user *name); 264asmlinkage long sys_fremovexattr(int fd, const char __user *name);
265 265
266asmlinkage unsigned long sys_brk(unsigned long brk); 266asmlinkage long sys_brk(unsigned long brk);
267asmlinkage long sys_mprotect(unsigned long start, size_t len, 267asmlinkage long sys_mprotect(unsigned long start, size_t len,
268 unsigned long prot); 268 unsigned long prot);
269asmlinkage unsigned long sys_mremap(unsigned long addr, 269asmlinkage long sys_mremap(unsigned long addr,
270 unsigned long old_len, unsigned long new_len, 270 unsigned long old_len, unsigned long new_len,
271 unsigned long flags, unsigned long new_addr); 271 unsigned long flags, unsigned long new_addr);
272asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, 272asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
273 unsigned long prot, unsigned long pgoff, 273 unsigned long prot, unsigned long pgoff,
274 unsigned long flags); 274 unsigned long flags);
@@ -321,10 +321,10 @@ asmlinkage long sys_io_submit(aio_context_t, long,
321 struct iocb __user * __user *); 321 struct iocb __user * __user *);
322asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, 322asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
323 struct io_event __user *result); 323 struct io_event __user *result);
324asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, 324asmlinkage long sys_sendfile(int out_fd, int in_fd,
325 off_t __user *offset, size_t count); 325 off_t __user *offset, size_t count);
326asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, 326asmlinkage long sys_sendfile64(int out_fd, int in_fd,
327 loff_t __user *offset, size_t count); 327 loff_t __user *offset, size_t count);
328asmlinkage long sys_readlink(const char __user *path, 328asmlinkage long sys_readlink(const char __user *path,
329 char __user *buf, int bufsiz); 329 char __user *buf, int bufsiz);
330asmlinkage long sys_creat(const char __user *pathname, int mode); 330asmlinkage long sys_creat(const char __user *pathname, int mode);
@@ -368,26 +368,25 @@ asmlinkage long sys_utime(char __user *filename,
368 struct utimbuf __user *times); 368 struct utimbuf __user *times);
369asmlinkage long sys_utimes(char __user *filename, 369asmlinkage long sys_utimes(char __user *filename,
370 struct timeval __user *utimes); 370 struct timeval __user *utimes);
371asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, 371asmlinkage long sys_lseek(unsigned int fd, off_t offset,
372 unsigned int origin); 372 unsigned int origin);
373asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, 373asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
374 unsigned long offset_low, loff_t __user *result, 374 unsigned long offset_low, loff_t __user *result,
375 unsigned int origin); 375 unsigned int origin);
376asmlinkage ssize_t sys_read(unsigned int fd, char __user *buf, 376asmlinkage long sys_read(unsigned int fd, char __user *buf, size_t count);
377 size_t count); 377asmlinkage long sys_readahead(int fd, loff_t offset, size_t count);
378asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count); 378asmlinkage long sys_readv(unsigned long fd,
379asmlinkage ssize_t sys_readv(unsigned long fd, 379 const struct iovec __user *vec,
380 const struct iovec __user *vec, 380 unsigned long vlen);
381 unsigned long vlen); 381asmlinkage long sys_write(unsigned int fd, const char __user *buf,
382asmlinkage ssize_t sys_write(unsigned int fd, const char __user *buf, 382 size_t count);
383 size_t count); 383asmlinkage long sys_writev(unsigned long fd,
384asmlinkage ssize_t sys_writev(unsigned long fd, 384 const struct iovec __user *vec,
385 const struct iovec __user *vec, 385 unsigned long vlen);
386 unsigned long vlen); 386asmlinkage long sys_pread64(unsigned int fd, char __user *buf,
387asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, 387 size_t count, loff_t pos);
388 size_t count, loff_t pos); 388asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
389asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, 389 size_t count, loff_t pos);
390 size_t count, loff_t pos);
391asmlinkage long sys_getcwd(char __user *buf, unsigned long size); 390asmlinkage long sys_getcwd(char __user *buf, unsigned long size);
392asmlinkage long sys_mkdir(const char __user *pathname, int mode); 391asmlinkage long sys_mkdir(const char __user *pathname, int mode);
393asmlinkage long sys_chdir(const char __user *filename); 392asmlinkage long sys_chdir(const char __user *filename);
@@ -476,7 +475,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
476asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); 475asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
477asmlinkage long sys_mq_unlink(const char __user *name); 476asmlinkage long sys_mq_unlink(const char __user *name);
478asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); 477asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout);
479asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); 478asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout);
480asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); 479asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
481asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); 480asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
482 481
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 23fdb8492b8e..6df028b70543 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -907,7 +907,7 @@ out:
907 return ret; 907 return ret;
908} 908}
909 909
910asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, 910asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr,
911 size_t msg_len, unsigned int __user *u_msg_prio, 911 size_t msg_len, unsigned int __user *u_msg_prio,
912 const struct timespec __user *u_abs_timeout) 912 const struct timespec __user *u_abs_timeout)
913{ 913{
diff --git a/kernel/exit.c b/kernel/exit.c
index c7740fa3252c..fac9b040af2c 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1182,9 +1182,11 @@ do_group_exit(int exit_code)
1182 * wait4()-ing process will get the correct exit code - even if this 1182 * wait4()-ing process will get the correct exit code - even if this
1183 * thread is not the thread group leader. 1183 * thread is not the thread group leader.
1184 */ 1184 */
1185asmlinkage void sys_exit_group(int error_code) 1185asmlinkage long sys_exit_group(int error_code)
1186{ 1186{
1187 do_group_exit((error_code & 0xff) << 8); 1187 do_group_exit((error_code & 0xff) << 8);
1188 /* NOTREACHED */
1189 return 0;
1188} 1190}
1189 1191
1190static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) 1192static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
diff --git a/kernel/signal.c b/kernel/signal.c
index 3152ac3b62e2..856a5479d49d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2559,7 +2559,7 @@ sys_ssetmask(int newmask)
2559/* 2559/*
2560 * For backwards compatibility. Functionality superseded by sigaction. 2560 * For backwards compatibility. Functionality superseded by sigaction.
2561 */ 2561 */
2562asmlinkage unsigned long 2562asmlinkage long
2563sys_signal(int sig, __sighandler_t handler) 2563sys_signal(int sig, __sighandler_t handler)
2564{ 2564{
2565 struct k_sigaction new_sa, old_sa; 2565 struct k_sigaction new_sa, old_sa;
diff --git a/kernel/timer.c b/kernel/timer.c
index dee3f641a7a7..7b8697d7f04d 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1129,7 +1129,7 @@ void do_timer(unsigned long ticks)
1129 * For backwards compatibility? This can be done in libc so Alpha 1129 * For backwards compatibility? This can be done in libc so Alpha
1130 * and all newer ports shouldn't need it. 1130 * and all newer ports shouldn't need it.
1131 */ 1131 */
1132asmlinkage unsigned long sys_alarm(unsigned int seconds) 1132asmlinkage long sys_alarm(unsigned int seconds)
1133{ 1133{
1134 return alarm_setitimer(seconds); 1134 return alarm_setitimer(seconds);
1135} 1135}
diff --git a/mm/filemap.c b/mm/filemap.c
index ceba0bd03662..538b75ed6236 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1374,7 +1374,7 @@ do_readahead(struct address_space *mapping, struct file *filp,
1374 return 0; 1374 return 0;
1375} 1375}
1376 1376
1377asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count) 1377asmlinkage long sys_readahead(int fd, loff_t offset, size_t count)
1378{ 1378{
1379 ssize_t ret; 1379 ssize_t ret;
1380 struct file *file; 1380 struct file *file;
diff --git a/mm/mmap.c b/mm/mmap.c
index 749623196cb9..a970d890cb21 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -245,7 +245,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
245 return next; 245 return next;
246} 246}
247 247
248asmlinkage unsigned long sys_brk(unsigned long brk) 248asmlinkage long sys_brk(unsigned long brk)
249{ 249{
250 unsigned long rlim, retval; 250 unsigned long rlim, retval;
251 unsigned long newbrk, oldbrk; 251 unsigned long newbrk, oldbrk;
diff --git a/mm/mremap.c b/mm/mremap.c
index 646de959aa58..5572e0825d80 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -420,7 +420,7 @@ out_nc:
420 return ret; 420 return ret;
421} 421}
422 422
423asmlinkage unsigned long sys_mremap(unsigned long addr, 423asmlinkage long sys_mremap(unsigned long addr,
424 unsigned long old_len, unsigned long new_len, 424 unsigned long old_len, unsigned long new_len,
425 unsigned long flags, unsigned long new_addr) 425 unsigned long flags, unsigned long new_addr)
426{ 426{
diff --git a/mm/nommu.c b/mm/nommu.c
index 60ed8375c986..ee3e78927739 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -416,7 +416,7 @@ EXPORT_SYMBOL(vm_insert_page);
416 * to a regular file. in this case, the unmapping will need 416 * to a regular file. in this case, the unmapping will need
417 * to invoke file system routines that need the global lock. 417 * to invoke file system routines that need the global lock.
418 */ 418 */
419asmlinkage unsigned long sys_brk(unsigned long brk) 419asmlinkage long sys_brk(unsigned long brk)
420{ 420{
421 struct mm_struct *mm = current->mm; 421 struct mm_struct *mm = current->mm;
422 422