OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] diskquota: 32bit quota tools on 64bit architectures
Re: [PATCH] diskquota: 32bit quota tools on 64bit architectures [message #14141 is a reply to message #7646] Fri, 15 June 2007 10:43 Go to previous messageGo to previous message
Arnd Bergmann is currently offline  Arnd Bergmann
Messages: 10
Registered: February 2006
Junior Member
On Friday 15 June 2007, Mikael Pettersson wrote:
> > --- linux-2.6.22-rc4-fixed/fs/quota.c.orig    2007-06-14 15:55:26.000000000 +0400
> > +++ linux-2.6.22-rc4-fixed/fs/quota.c 2007-06-14 19:50:13.000000000 +0400
> ...
> > +#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
> > +/*
> > + * This code works only for 32 bit quota tools over 64 bit OS (x86_64, ia64)
> > + * and is necessary due to alignment problems.
> > + */
>
> The #ifdef looks way too arch-specific. And isn't there a shared
> compat.c module somewhere that this should go into?
>

Only x86_64 and ia64 have this particular problem, the other architectures,
and hopefully all future 64 bit platforms with 32 bit user space use
the same alignment rules in elf32 and elf64.

Still, the patch should be converted to use the compat_u64 type and not
add an 'attribute((packed))' so that you _can_ use the same code on all
architectures. See my 'Introduce compat_u64 and compat_s64 types' patch
that I just posted in another thread.

Arnd <><
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 16/17] Pid-NS(V3) Remove proc_mnts use for killing inodes
Next Topic: [PATCH 12/17] Pid-NS(V3) Terminate processes in a ns when reaper is exiting.
Goto Forum:
  


Current Time: Thu Aug 15 06:11:04 GMT 2024

Total time taken to generate the page: 0.02686 seconds