Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

chrubis
2013-08-23T11:39:26Z

Hi!
> Thank you for this point.
>
> At first sight it seems that this testcase is very specific for i386
> (maybe for other architectures also).
>
> In i386 I found two variants of setgroups syscall (from
> arch/x86/syscalls/syscall_32.tbl):
> 81 i386 setgroups sys_setgroups16
> 206 i386 setgroups32 sys_setgroups
>
> I guess in i386 glibc handler for setgroups() internally uses
> _setgroups32_ syscall.
>
> In x86_64 there is only one variant (from arch/x86/syscalls/syscall_64.tbl):
> 116 common setgroups sys_setgroups
>
> which points to 32-bit version.
>
> But It's just an assumption and I'll verify this.

The 16 variant is backward compatibility for old programs using this
binari ABI so it makes sense that it does not exist on architectures
that Linux were ported to after the 32 bit syscall was created.

--
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!