WSL2-Linux-Kernel/arch/ia64/ia32
Vasily Tarasov b716395e2b diskquota: 32bit quota tools on 64bit architectures
OpenVZ Linux kernel team has discovered the problem with 32bit quota tools
working on 64bit architectures.  In 2.6.10 kernel sys32_quotactl() function
was replaced by sys_quotactl() with the comment "sys_quotactl seems to be
32/64bit clean, enable it for 32bit" However this isn't right.  Look at
if_dqblk structure:

struct if_dqblk {
        __u64 dqb_bhardlimit;
        __u64 dqb_bsoftlimit;
        __u64 dqb_curspace;
        __u64 dqb_ihardlimit;
        __u64 dqb_isoftlimit;
        __u64 dqb_curinodes;
        __u64 dqb_btime;
        __u64 dqb_itime;
        __u32 dqb_valid;
};

For 32 bit quota tools sizeof(if_dqblk) == 0x44.
But for 64 bit kernel its size is 0x48, 'cause of alignment!
Thus we got a problem. Attached patch reintroduce sys32_quotactl() function,
that handles this and related situations.

[michal.k.k.piotrowski@gmail.com: build fix]
[akpm@linux-foundation.org: Make it link with CONFIG_QUOTA=n]
Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Cc: Andi Kleen <ak@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:48 -07:00
..
Makefile [PATCH] audit syscall classes 2006-07-01 07:44:10 -04:00
audit.c [PATCH] add SIGNAL syscall class (v3) 2007-05-11 05:38:25 -04:00
binfmt_elf32.c PIE randomization 2007-07-16 09:05:42 -07:00
elfcore32.h [PATCH] ia64: task_pt_regs() 2006-01-12 09:08:58 -08:00
ia32_entry.S diskquota: 32bit quota tools on 64bit architectures 2007-07-16 09:05:48 -07:00
ia32_ldt.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
ia32_signal.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-05-09 13:38:45 -07:00
ia32_support.c use SLAB_PANIC flag cleanup 2007-05-08 11:14:57 -07:00
ia32_traps.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ia32priv.h [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
sys_ia32.c [IA64] sync compat getdents 2007-03-06 14:49:24 -08:00