tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: syscall stub



On Thu, Sep 25, 2014 at 08:43:04AM +0000, Emmanuel Dreyfus wrote:
> How can I do it? My problem is that the system call and the libc
> function have the same name. Do I need to rename the system call,
> to something like _posix_fallocate ? Or is there a trick to do
> it otherwise.

Yes, see src/lib/libc/sys/mknodat.c for an unversioned one and
posix_fadvise.c for a versioned variant.

Since you need to allow old binaries (and 64bit architectures were
not affected by the bug, so there are valid, working ones) you need
to rename the old syscall to a compat one, create a new syscall with
proper padding and use the same sheme as posix_fadvise.c (but it should
be 70 instead of 50 now, I guess).

Martin


Home | Main Index | Thread Index | Old Index