cvs commit: src/sys/compat/linux linux_file.c linux_util.h src/sys/i386/linux linux.h linux_dummy.c linux_proto.h linux_syscall.h linux_sysent.c syscalls.master src/sys/amd64/linux32 linux.h linux32_dummy.c linux32_proto.h ...

Robert Watson rwatson at FreeBSD.org
Sun Apr 1 15:51:08 UTC 2007


On Sun, 1 Apr 2007, Robert Watson wrote:

> On Thu, 29 Mar 2007, Julian Elischer wrote:
>
>> julian      2007-03-29 02:11:46 UTC
>>
>>  FreeBSD src repository
>>
>>  Modified files:
>>    sys/compat/linux     linux_file.c linux_util.h
>>    sys/i386/linux       linux.h linux_dummy.c linux_proto.h
>>                         linux_syscall.h linux_sysent.c
>>                         syscalls.master
>>    sys/amd64/linux32    linux.h linux32_dummy.c linux32_proto.h
>>                         linux32_syscall.h linux32_sysent.c
>>                         syscalls.master
>>  Log:
>>  Implement the openat() linux syscall
>>  Submitted by:   Roman Divacky (rdivacky@)
>>  MFC after:      2 weeks
>
> The locking and reference counting in this patch is highly dubious; also, 
> vn_fullpath() should really not be used this way, as it fails whenever 
> vnodes fall out of the name cache or a file system doesn't use the namecache 
> (i.e., it is purely advisory).  If we're going to do openat() in the Linux 
> emulation layer, let's instead implement it properly in the FreeBSD system 
> call code as a first class service and then wrap it the way we wrap other 
> system calls. Please do not MFC this patch as-is.

Looking at the code again, there's another serious bug in it: linux_at() fails 
to validate that the passed file descriptor is actually a vnode file 
descriptor type before dereferencing its f_vnode field and treating it as a 
vnode.

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the cvs-src mailing list