Re: Syscall interface



What I'm looking for is the mechanism for accessing the system calls. I've been using the old Int0x80 method for years but Linus said this in the discussion about the cross-platform virus:

'To make it even harder to hit - it probably also only happens with the old "int 0x80" system call mechanism, not with the modern "syscall" entrypoint.'

There have been various hints over the years that 0x80 is no longer the prefered method, for performance reasons, but I've not seen any documentation on what assembly language programmers need to do to access the "modern" entrypoint.

But I can't find any examples or documentation for assembly language programmers. I could wade through the kernel source but I was hoping someone would have an easier document somewhere.

TWW


On Tue, 25 Apr 2006 02:32:31 +0100, Rod Pemberton <spamtrap@xxxxxxxxxx> wrote:


"Thomas Worthington" <spamtrap@xxxxxxxxxx> wrote in message
news:op.s8jbbmz1e6av7m@xxxxxxxxxxxx
Sorry for forgetting to mention it was Linux.

Unfortunately the two links you gave are many years out of date now and
deal with Linux 1.2 and 2.2 which only included the old int 0x80 method.

Thanks anyway.

TWW


Well, I'm interested in the syscall interface, but I didn't feel like
downloading 51Mb of Linux 2.6.16 to find them. So I went looking elsewhere,
and found 'strace'. The strace package has files which list the syscalls by
name (not the register args). There appears to be a master syscall file
called 'syscallent.h' and also additional 'syscallent.h' for each
architecture that strace supports. The names of the calls in the master
'syscallent.h', dated 2006/01/12, correspond to the syscalls on the first
link I gave. The sub architecture 'x86_64' 'syscallent.h' has a very
different sequence of syscalls.

http://www.liacs.nl/~wichert/strace/


HTH,

Rod Pemberton



.



Relevant Pages

  • Re: Syscall interface
    ... deal with Linux 1.2 and 2.2 which only included the old int 0x80 method. ... The strace package has files which list the syscalls by ... The sub architecture 'x86_64' 'syscallent.h' has a very ...
    (comp.lang.asm.x86)
  • Re: microblaze syscall list
    ... I have never found any documentation about. ... still relevant syscalls, plus a per-architecture range that you can ... and a new architecture only needs one of the ... Since we have all the new sys_*at calls like openat, ...
    (Linux-Kernel)
  • Re: Serial I/O troubles re: VTIME
    ... port read. ... I have read a lot of documentation but I can't figure out ... You are not checking return values from any of your syscalls, ... Try without CRTSCTS and see if that works. ...
    (comp.unix.programmer)
  • Looking for syscalls documentation pointers.
    ... specifications used to write the syscalls. ... I was reading the syscalls.master and it only says the number and name ... Any idea who could have that kind of documentation? ...
    (freebsd-hackers)
  • looking for syscalls especifications
    ... specifications used to write the syscalls. ... I was reading the syscalls.master and it only says the number and name ... Any idea who could have that kind of documentation? ...
    (freebsd-questions)