linux/arch/mips/kernel
David Howells afefdbb28a [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers
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-03 08:03:40 -07:00
..
Makefile [MIPS] lockdep: Add STACKTRACE_SUPPORT and enable LOCKDEP_SUPPORT 2006-10-01 23:16:57 +01:00
apm.c [MIPS] Don't include obsolete <linux/config.h>. 2006-07-13 21:25:58 +01:00
asm-offsets.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
binfmt_elfn32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
binfmt_elfo32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
branch.c [MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs. 2006-06-19 17:39:18 +01:00
cpu-bugs64.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu-probe.c [MIPS] Reduce race between cpu_wait() and need_resched() checking 2006-09-27 13:37:40 +01:00
dma-no-isa.c Dummy ISA DMA functions for systems that don't have ISA but share 2005-10-29 19:30:17 +01:00
entry.S [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
gdb-low.S [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
gdb-stub.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
genex.S [MIPS] Stacktrace build-fix and improvement 2006-10-01 23:16:58 +01:00
head.S [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
i8253.c Input: pcspkr - separate device and driver registration 2006-03-14 00:11:50 -05:00
i8259.c [MIPS] Update i8259 resources. 2006-10-01 23:16:59 +01:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
irix5sys.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irixelf.c [PATCH] FDPIC: Move roundup() into linux/kernel.h 2006-07-10 13:24:22 -07:00
irixinv.c Sparseify MIPS. 2005-10-29 19:30:50 +01:00
irixioctl.c Reformatting, remove debugging code. 2005-10-29 19:30:57 +01:00
irixsig.c [MIPS] Move definition of IRIX compat constant into IRIX compat code. 2006-09-27 13:37:45 +01:00
irq-msc01.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq-mv6434x.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq-rm7000.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq-rm9000.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq_cpu.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
kspd.c [MIPS] kpsd and other AP/SP improvements. 2006-04-19 04:14:27 +02:00
linux32.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
mips-mt.c [MIPS] MIPS MT: Fix build error. 2006-07-13 21:26:06 +01:00
mips_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
module.c [MIPS] Ignore unresolved weak symbols in modules. 2006-06-06 00:15:10 +01:00
proc.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
process.c [MIPS] Make unwind_stack() can dig into interrupted context 2006-10-01 23:16:59 +01:00
ptrace.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ptrace32.c [MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs. 2006-06-19 17:39:18 +01:00
r4k_fpu.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r4k_switch.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r2300_fpu.S kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
r2300_switch.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r6000_fpu.S kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
reset.c [MIPS] Rename _machine_power_off to pm_power_off so the kernel builds again. 2006-02-07 13:30:22 +00:00
rtlx.c [PATCH] irq-flags: MIPS: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
scall32-o32.S [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT 2006-10-01 23:16:57 +01:00
scall64-64.S [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT 2006-10-01 23:16:57 +01:00
scall64-n32.S [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT 2006-10-01 23:16:57 +01:00
scall64-o32.S [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT 2006-10-01 23:16:57 +01:00
semaphore.c Always use ".set mips3" rather than select between "mips2" or "mips3" 2005-10-29 19:31:31 +01:00
setup.c [MIPS] setup.c: use early_param() for early command line parsing 2006-09-27 13:38:04 +01:00
signal-common.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
signal.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
signal32.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
signal_n32.c [PATCH] BLOCK: Revert patch to hack around undeclared sigset_t in linux/compat.h 2006-10-02 08:03:31 -07:00
smp-mt.c [MIPS] MT: Initialise all writable bits in Cause register to zero. 2006-09-27 13:37:33 +01:00
smp.c [MIPS] Avoid interprocessor function calls. 2006-07-13 21:25:56 +01:00
smtc-asm.S [MIPS] SMTC Build fix. 2006-09-27 13:37:36 +01:00
smtc-proc.c [MIPS] MT: Improved multithreading support. 2006-04-19 04:14:28 +02:00
smtc.c [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
stacktrace.c [MIPS] Make unwind_stack() can dig into interrupted context 2006-10-01 23:16:59 +01:00
syscall.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
sysirix.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
time.c [PATCH] kill wall_jiffies 2006-10-01 00:39:27 -07:00
traps.c [MIPS] Make unwind_stack() can dig into interrupted context 2006-10-01 23:16:59 +01:00
unaligned.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vmlinux.lds.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vpe.c [MIPS] MT: Fix setting of XTC. 2006-09-27 13:37:36 +01:00