aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/linux32.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-06-06[MIPS] Fix some system calls with long long argumentsAtsushi Nemoto1-0/+10
* O32 fadvise64() pass long long arguments by register pairs. Add sys32 version for 64 bit kernel. * N32 readahead() can pass a long long argument by one register. No need to use sys32_readahead. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.Ralf Baechle1-0/+12
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-08[PATCH] Add epoll compat_ code to fs/compat.cDavide Libenzi1-46/+0
IA64 and ARM-OABI are currently using their own version of epoll compat_ code. An architecture needs epoll_event translation if alignof(u64) in 32 bit mode is different from alignof(u64) in 64 bit mode. If an architecture needs epoll_event translation, it must define struct compat_epoll_event in asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use compat_sys_epoll_ctl and compat_sys_epoll_wait. All 64 bit architecture should use compat_sys_epoll_pwait. [sfr: restructure and move to fs/compat.c, remove MIPS version of compat_sys_epoll_pwait, use __put_user_unaligned] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-04[MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.Ralf Baechle1-31/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.Ralf Baechle1-114/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] N32 waitid is the same as o32.Ralf Baechle1-28/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Ralf Baechle1-0/+47
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-11[PATCH] Common compat_sys_sysinfoKyle McMartin1-44/+0
I noticed that almost all architectures implemented exactly the same sys32_sysinfo... except parisc, where a bug was to be found in handling of the uptime. So let's remove a whole whack of code for fun and profit. Cribbed compat_sys_sysinfo from x86_64's implementation, since I figured it would be the best tested. This patch incorporates Arnd's suggestion of not using set_fs/get_fs, but instead extracting out the common code from sys_sysinfo. Cc: Christoph Hellwig <hch@infradead.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-06[MIPS] Whitespace cleanups.Ralf Baechle1-14/+14
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-01-10[MIPS] Fix N32 SysV IPC routinesAtsushi Nemoto1-2/+14
Add wrappers for N32 msg{snd,rcv}. compat_sys_msg{snd,rcv} can not not be used as system call entries as is. This fix is based on Kaz Kylheku's patch. Also change a type of last argument of sysn32_semctl to match its true size. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-12-04[MIPS] Use SYSVIPC_COMPAT to fix various problems on N32Atsushi Nemoto1-555/+23
N32 SysV IPC system calls should use 32-bit compatible code. arch/mips/kernel/linux32.c have similar compatible code for O32, but ipc/compat.c seems more complete. We can use it for both N32 and O32. This patch should fix these problems (and other possible problems): http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=1149188824.6986.6.camel%40diimka-laptop http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=44C6B829.8050508%40caviumnetworks.com Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-10-19[MIPS] Fix O32 personality(2) call with 0xffffffff argument.Thiemo Seufer1-1/+3
A sign extension bug did result in sys_personality being invoked with a 0xffffffffffffffffUL argument, so querying the current personality didn't work. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-10-03[PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbersDavid Howells1-0/+2
These patches make the kernel pass 64-bit inode numbers internally when communicating to userspace, even on a 32-bit system. They are required because some filesystems have intrinsic 64-bit inode numbers: NFS3+ and XFS for example. The 64-bit inode numbers are then propagated to userspace automatically where the arch supports it. Problems have been seen with userspace (eg: ld.so) using the 64-bit inode number returned by stat64() or getdents64() to differentiate files, and failing because the 64-bit inode number space was compressed to 32-bits, and so overlaps occur. This patch: Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit inode number so that 64-bit inode numbers can be passed back to userspace. The stat functions then returns the full 64-bit inode number where available and where possible. If it is not possible to represent the inode number supplied by the filesystem in the field provided by userspace, then error EOVERFLOW will be issued. Similarly, the getdents/readdir functions now pass the full 64-bit inode number to userspace where possible, returning EOVERFLOW instead when a directory entry is encountered that can't be properly represented. Note that this means that some inodes will not be stat'able on a 32-bit system with old libraries where they were before - but it does mean that there will be no ambiguity over what a 32-bit inode number refers to. Note similarly that directory scans may be cut short with an error on a 32-bit system with old libraries where the scan would work before for the same reasons. It is judged unlikely that this situation will occur because modern glibc uses 64-bit capable versions of stat and getdents class functions exclusively, and that older systems are unlikely to encounter unrepresentable inode numbers anyway. [akpm: alpha build fix] Signed-off-by: David Howells <dhowells@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02[PATCH] namespaces: utsname: switch to using uts namespacesSerge E. Hallyn1-1/+1
Replace references to system_utsname to the per-process uts namespace where appropriate. This includes things like uname. Changes: Per Eric Biederman's comments, use the per-process uts namespace for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c [jdike@addtoit.com: UML fix] [clg@fr.ibm.com: cleanup] [akpm@osdl.org: build fix] Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Kirill Korotaev <dev@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Andrey Savochkin <saw@sw.ru> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27[PATCH] sysctl: Allow /proc/sys without sys_sysctlEric W. Biederman1-2/+2
Since sys_sysctl is deprecated start allow it to be compiled out. This should catch any remaining user space code that cares, and paves the way for further sysctl cleanups. [akpm@osdl.org: If sys_sysctl() is not compiled-in, emit a warning] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27[MIPS] TLS: Delete unused sys32_set_thread_areaRalf Baechle1-6/+0
There is no need for a compat version. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-04-26[PATCH] fix mips sys32_p{read,write}Al Viro1-62/+2
Switched to use of sys_pread64()/sys_pwrite64() rather than keep duplicating their guts; among the little things that had been missing there were such as ret = security_file_permission (file, MAY_READ); Gotta love the LSM robustness, right? Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19[MIPS] Wire up sync_file_range(2).Ralf Baechle1-0/+10
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-03-26[PATCH] consolidate sys32/compat_adjtimexStephen Rothwell1-61/+0
Create compat_sys_adjtimex and use it an all appropriate places. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26[PATCH] create struct compat_timex and use it everywhereStephen Rothwell1-14/+1
We had a copy of the compatibility version of struct timex in each 64 bit architecture. This patch just creates a global one and replaces all the usages of the old ones. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Kyle McMartin <kyle@parisc-linux.org> Acked-by: Tony Luck <tony.luck@intel.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-21[MIPS] sys_mmap2 offset argument should always be shifted 12, not PAGE_SHIFT.H. Peter Anvin1-0/+4
This patch adjusts the offset argument passed into sys_mmap2 to be always shifted 12, even when the native page size isn't 4K. This is what all existing userspace libraries expect. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---
2006-03-21[MIPS] Further sparsification for 32-bit compat code.Atsushi Nemoto1-83/+87
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-03-21[MIPS] Delete unused sys32_waitpid.Ralf Baechle1-6/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-27[MIPS] Use generic compat routines for readdir, getdentsAtsushi Nemoto1-54/+0
Not just cleanup but also fixes O32 readdir(2) emulation. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-21[MIPS] N32: Make sure pointer is good before passing it to sys_waitid().Ralf Baechle1-0/+3
After all we're calling sys_waitid() with fs set to KERNEL_DS ... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-21[MIPS] N32: Fix N32 rt_sigtimedwait and rt_sigsuspend breakage.Ralf Baechle1-19/+0
Originally found through an oops in the Gentoo N32 userland build; patch based on original patch by Daniel Jacobwitz. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-01-04Relax the rw_verify_area() error checking.Linus Torvalds1-2/+2
In particular, allow over-large read- or write-requests to be downgraded to a more reasonable range, rather than considering them outright errors. We want to protect lower layers from (the sadly all too common) overflow conditions, but prefer to do so by chopping the requests up, rather than just refusing them outright. Cc: Peter Anvin <hpa@zytor.com> Cc: Ulrich Drepper <drepper@redhat.com> Cc: Andi Kleen <ak@suse.de> Cc: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29NPTL, round one.Ralf Baechle1-0/+27
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-2932-bit compatibility for various timer-related system calls.Ralf Baechle1-0/+50
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29Implement 32-bit compatibility for waitid(2).Ralf Baechle1-0/+22
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29Use generic compat_sys_wait4 to implement 32-bit wait4(2).Ralf Baechle1-72/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-09-07[PATCH] compat: be more consistent about [ug]id_tStephen Rothwell1-8/+8
When I first wrote the compat layer patches, I was somewhat cavalier about the definition of compat_uid_t and compat_gid_t (or maybe I just misunderstood :-)). This patch makes the compat types much more consistent with the types we are being compatible with and hopefully will fix a few bugs along the way. compat type type in compat arch __compat_[ug]id_t __kernel_[ug]id_t __compat_[ug]id32_t __kernel_[ug]id32_t compat_[ug]id_t [ug]id_t The difference is that compat_uid_t is always 32 bits (for the archs we care about) but __compat_uid_t may be 16 bits on some. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05[PATCH] mips: nuke trailing whitespaceRalf Baechle1-11/+11
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1469
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!