[PATCH] Evaluate syscall parameters on ARM LOAD_ARGS_x macros

Bernhard Fischer rep.dot.nop at gmail.com
Thu Mar 27 17:23:21 UTC 2008


On Thu, Mar 27, 2008 at 10:07:54AM -0700, Khem Raj wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Bernhard Fischer wrote:
> | On Thu, Mar 27, 2008 at 01:57:02AM -0700, Khem Raj wrote:
> |> -----BEGIN PGP SIGNED MESSAGE-----
> |> Hash: SHA1
> |>
> |> Hi
> |>
> |> While compiling uclibc on thumb and running LTP tests on it I noticed
> |> that the sched_setaffinity system calls were failing. The reason is that
> |> when the parameters to syscall macros on ARM contain function calls, gcc
> |> places the calls to evaluate the parameters at the very end just before
> |> the system call instruction (SVC) is called.
> |> This corrupts the registers that has been set up for the system call.
> |>
> |> This patch evaluates the arguments in LOAD_ARGS_x macros and also
> |> separates declaration to make it more PPC like. Thanks to Daniel
> |> Jacobowitz for this suggestion.
> |
> | Khem,
> |
> | Since you seem to use ARM, may i ask you to take a look and clean-up
> | syscalls.h? Specifically this one spot:
> |
> | The INTERNAL_SYSCALL macro is duplicated, apparently needlessly.
> | Search for "r7, v3" in libc/sysdeps/linux/arm/bits/syscalls.h
>
> There are 4 different variants of INTERNAL_SYSCALL

2 of them are identical, AFAICS.



More information about the uClibc mailing list