OpenCloudOS-Kernel/arch/alpha/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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
alpha_ksyms.c [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
asm-offsets.c [PATCH] alpha: Fix getxpid on alpha so it works for threads 2006-02-01 08:53:21 -08:00
console.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
core_apecs.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_cia.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_irongate.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_lca.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_marvel.c [PATCH] Don't pass boot parameters to argv_init[] 2006-03-31 12:18:53 -08:00
core_mcpcia.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_polaris.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_t2.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_titan.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_tsunami.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
core_wildfire.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
entry.S [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
err_common.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
err_ev6.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
err_ev7.c [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
err_impl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
err_marvel.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
err_titan.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
es1888.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gct.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.c [PATCH] irq-flags: ALPHA: Use the new IRQF_ constants 2006-07-02 13:58:46 -07:00
irq_alpha.c [PATCH] irq-flags: ALPHA: Use the new IRQF_ constants 2006-07-02 13:58:46 -07:00
irq_i8259.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irq_impl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq_pyxis.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
irq_srm.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
machvec_impl.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
module.c [PATCH] alpha: process_reloc_for_got confuses r_offset and r_addend 2005-09-09 13:57:30 -07:00
ns87312.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
osf_sys.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
pci-noop.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
pci.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pci_impl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci_iommu.c [PATCH] gfp_t: remaining bits of arch/* 2005-10-28 08:16:51 -07:00
process.c [PATCH] vt: Remove VT-specific declarations and definitions from tty.h 2006-07-10 13:24:16 -07:00
proto.h [PATCH] Generic ioremap_page_range: alpha conversion 2006-10-01 00:39:31 -07:00
ptrace.c [PATCH] alpha: task_pt_regs() 2006-01-12 09:08:50 -08:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
signal.c [PATCH] fix incorrect SA_ONSTACK behaviour for 64-bit processes 2006-06-23 07:43:05 -07:00
smc37c93x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
smc37c669.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smp.c [PATCH] alpha: SMP IRQ routing fix 2006-06-05 12:29:16 -07:00
srm_env.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
srmcons.c [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
sys_alcor.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_cabriolet.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_dp264.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_eb64p.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_eiger.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
sys_jensen.c [PATCH] irq-flags: ALPHA: Use the new IRQF_ constants 2006-07-02 13:58:46 -07:00
sys_marvel.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
sys_miata.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_mikasa.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_nautilus.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_noritake.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_rawhide.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
sys_ruffian.c [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
sys_rx164.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
sys_sable.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_sio.c [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
sys_sx164.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_takara.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
sys_titan.c [PATCH] irq-flags: ALPHA: Use the new IRQF_ constants 2006-07-02 13:58:46 -07:00
sys_wildfire.c [PATCH] genirq: rename desc->handler to desc->chip 2006-06-29 10:26:21 -07:00
systbls.S [PATCH] new alpha syscalls 2005-07-27 18:24:24 -07:00
time.c [PATCH] kill wall_jiffies 2006-10-01 00:39:27 -07:00
traps.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