2006-12-13 19:25:20

by Teunis Peters

[permalink] [raw]
Subject: Question: removal of syscall macros?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Now that syscall macros have been pulled from the -mm tree, what method
is recommended to use syscalls?

(I've wasted a day grubbing through sources before giving up and copying
the old syscall macros into one key driver)

_syscall macros are used by:
ATI driver (no choice. I'm working with laptops)
vmware (I'm trying to phase this out for qemu, but it's a slow process)
(and others I suspect)

I realize that these are "closed source" but my work is rather dependant
on them remaining operational - and as the 2.6.19 kernel series is the
only one that works on most of the hardware provided by my workplace,
I'm kind of stuck patching things myself.

There doesn't seem to be any documentation on this so I ask about how to
replace the _syscallX calls.

Thank you!
- Teunis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFgEuYbFT/SAfwLKMRAqYoAJ4xiJGcoJ6EB6kKX1VGALib1NrQyQCeNUzv
AgYtPKfC6SpwBY6PgyLbZeI=
=jN5z
-----END PGP SIGNATURE-----


2006-12-13 19:46:23

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Question: removal of syscall macros?

On Wed, 2006-12-13 at 10:51 -0800, Teunis Peters wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Now that syscall macros have been pulled from the -mm tree, what method
> is recommended to use syscalls?
>
> (I've wasted a day grubbing through sources before giving up and copying
> the old syscall macros into one key driver)
>
> _syscall macros are used by:
> ATI driver (no choice. I'm working with laptops)

.. which uses it to call mprotect() from inside the driver. That's a
nice security hole right there... better ask ATI to fix it urgently :)


2006-12-13 20:01:19

by Ulrich Drepper

[permalink] [raw]
Subject: Re: Question: removal of syscall macros?

On 12/13/06, Teunis Peters <[email protected]> wrote:
> Now that syscall macros have been pulled from the -mm tree, what method
> is recommended to use syscalls?

glibc forever had a syscall() function for just that purpose. It was
never a good idea to use the macros since they didn't work in PIC.

2006-12-13 20:46:13

by Teunis Peters

[permalink] [raw]
Subject: Re: Question: removal of syscall macros?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ulrich Drepper wrote:
> On 12/13/06, Teunis Peters <[email protected]> wrote:
>> Now that syscall macros have been pulled from the -mm tree, what method
>> is recommended to use syscalls?
>
> glibc forever had a syscall() function for just that purpose. It was
> never a good idea to use the macros since they didn't work in PIC.

sorry - I should be a little more context specific.

for KERNEL modules that used the _syscallX macros - what mechanism should be used?
I'm aware that the drivers I'm having a problem with (ATI, vmware) are closed source - but my own work machine's dependant on it and I'm not going to waste another 3 months to get
a response from either company.

and since the macros were pulled... and I'm kind of stuck with bleeding edge until some of the other hardware I'm working with is supported... *frustrated sigh*
At the moment my workaround is just to copy the macros from released kernel in. I don't like that solution - but it DOES work.

Unless someone can suggest a low-price but recent - and still sold - laptop model that works well with linux. (rhetorical - if anyone DOES answer, keep it off the list - thanks *g*)
- - Teunis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFgGZBbFT/SAfwLKMRAvAWAJ91BZCCIFrcGTkPaahf+Vd+tPvtewCfee/g
6BAirwLkefSqJbqGruk3L3o=
=Mr7+
-----END PGP SIGNATURE-----