xfs
[Top] [All Lists]

ADD 808328 - xfs_support EXPORTs symbols with generic names

To: dxm@xxxxxxxxxxxxxxxxxxxx
Subject: ADD 808328 - xfs_support EXPORTs symbols with generic names
From: pv@xxxxxxxxxxxxxxxxxxxxxx (ak@xxxxxxxxxxxxxxx)
Date: Tue, 21 Nov 2000 04:05:04 -0800 (PST)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
 Submitter : dxm                       Status : open                        
 Assigned Engineer : dxm               Priority : 4                         
*Modified Date : 11/21/00             *Modified User : ak                   
*Modified User Domain : suse.de       *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: andi kleen <ak@xxxxxxx>
Date: Nov 21 2000 04:05:04AM
[pvnews version: 1.71]
==========================
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>