xfs
[Top] [All Lists]

Re: ADD 808328 - xfs_support EXPORTs symbols with generic names

To: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Subject: Re: ADD 808328 - xfs_support EXPORTs symbols with generic names
From: Andi Kleen <ak@xxxxxxx>
Date: Tue, 21 Nov 2000 12:59:50 +0100
Cc: dxm@xxxxxxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <200011210055.QAA83099@feature.engr.sgi.com>; from pv@fddi-odin.corp.sgi.com on Mon, Nov 20, 2000 at 04:55:03PM -0800
References: <200011210055.QAA83099@feature.engr.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Mon, Nov 20, 2000 at 04:55:03PM -0800, cattelan@xxxxxxxxxxx wrote:
>  Submitter : dxm                       Status : open                        
>  Assigned Engineer : dxm               Priority : 4                         
> *Modified Date : 11/20/00             *Modified User : cattelan             
> *Modified User Domain : thebarn.com   *Description :
> xfs_support uses EXPORT_SYMBOL to export a bunch of symbols
> into the kernel global symbol namespace. Some of the symbol
> names are quite generic and hence potentially clash with other
> exports.
> 
> Case in point is "copyin" and "copyout".
> 
> we can:
>       - move code back into XFS
>       - make simple functions static inline
> 
> .....
> 
> 
> ==========================
> ADDITIONAL INFORMATION (ADD)
> From: russell cattelan <cattelan@xxxxxxxxxxx>
> Date: Nov 20 2000 04:55:03PM
> [pvnews version: 1.71]
> ==========================
> "dxm@xxxxxxxxxxxx" wrote:
> 
> > View Incident: 
> > http://co-op.engr.sgi.com/BugWorks/code/bwxquery.cgi?search=Search&wlong=1&view_type=Bug&wi=808328
> >
> > Submitter : dxm                       Submitter Domain : engr
> > Assigned Engineer : dxm               Assigned Domain : engr
> > Assigned Group : xfs-linux            Category : software
> > Customer Reported : F                 Priority : 4
> > Project : xfs-linux                   Status : open
> > Description :
> > xfs_support uses EXPORT_SYMBOL to export a bunch of symbols
> > into the kernel global symbol namespace. Some of the symbol
> > names are quite generic and hence potentially clash with other
> > exports.
> >
> > Case in point is "copyin" and "copyout".
> >
> > we can:
> >         - move code back into XFS
> >         - make simple functions static inline
> >         - prefix symbols and use macro aliasing to avoid
> >                 changing all references to them
> 
> This seems like the easiest.
> 
> Actually is there any reason we shouldn't just define copyin -> 
> copy_from_user and
> copyout -> copy_to_user?

When you do that you have to fix a few error checks though: 

% grep copyin fs/xfs/*.c
...
fs/xfs/xfs_qm_syscalls.c:       if (copyin(uflagsp, &uflags, sizeof(uint)) < 0) 
{
fs/xfs/xfs_qm_syscalls.c:       if (copyin(uflagsp, &uflags, sizeof(uint)) < 0) 

copy_*_user return a positive value on error (number of uncopied bytes) 
It seems to be wrong even without any changes right now, because the copyin 
wrapper
do not do the ? -EFAULT : 0. 



-Andi


<Prev in Thread] Current Thread [Next in Thread>