Partial MFp4 of 114977:
Whitespace commit: Fix grammar, spelling and punctuation. Submitted by: "Scot Hetzel" <swhetzel@gmail.com>
This commit is contained in:
parent
e2ae5821fe
commit
802e08a360
@ -783,7 +783,7 @@ struct l_desc_struct {
|
||||
|
||||
/*
|
||||
* macros which does the same thing as those in linux include/asm-um/ldt-i386.h
|
||||
* these convert linux user-space descriptor to machine one
|
||||
* these convert linux user space descriptor to machine one
|
||||
*/
|
||||
#define LDT_entry_a(info) \
|
||||
((((info)->base_addr & LINUX_LOWERWORD) << 16) | ((info)->limit & LINUX_LOWERWORD))
|
||||
|
@ -568,8 +568,8 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
||||
/*
|
||||
* XXX: in linux sharing of fs info (chroot/cwd/umask)
|
||||
* and open files is independant. in fbsd its in one
|
||||
* structure but in reality it doesnt make any problems
|
||||
* because both this flags are set at once usually.
|
||||
* structure but in reality it doesn't cause any problems
|
||||
* because both of these flags are usually set together.
|
||||
*/
|
||||
if (!(args->flags & (CLONE_FILES | CLONE_FS)))
|
||||
ff |= RFFDG;
|
||||
@ -579,7 +579,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
||||
* kernel threads. Unfortunately despite the existence of the
|
||||
* CLONE_THREAD flag, version of linuxthreads package used in
|
||||
* most popular distros as of beginning of 2005 doesn't make
|
||||
* any use of it. Therefore, this detection relay fully on
|
||||
* any use of it. Therefore, this detection relies on
|
||||
* empirical observation that linuxthreads sets certain
|
||||
* combination of flags, so that we can make more or less
|
||||
* precise detection and notify the FreeBSD kernel that several
|
||||
@ -833,7 +833,7 @@ linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
|
||||
* Our mmap with MAP_STACK takes addr as the maximum
|
||||
* downsize limit on BOS, and as len the max size of
|
||||
* the region. It them maps the top SGROWSIZ bytes,
|
||||
* and autgrows the region down, up to the limit
|
||||
* and auto grows the region down, up to the limit
|
||||
* in addr.
|
||||
*
|
||||
* If we don't use the MAP_STACK option, the effect
|
||||
|
@ -212,7 +212,7 @@ linux_proc_exit(void *arg __unused, struct proc *p)
|
||||
error = linux_sys_futex(FIRST_THREAD_IN_PROC(p), &cup);
|
||||
/*
|
||||
* this cannot happen at the moment and if this happens it
|
||||
* probably mean there is a userspace bug
|
||||
* probably means there is a user space bug
|
||||
*/
|
||||
if (error)
|
||||
printf(LMSG("futex stuff in proc_exit failed.\n"));
|
||||
|
@ -833,7 +833,7 @@ linux_waitpid(struct thread *td, struct linux_waitpid_args *args)
|
||||
args->pid, (void *)args->status, args->options);
|
||||
#endif
|
||||
/*
|
||||
* this is necessary because the test in kern_wait doesnt work
|
||||
* this is necessary because the test in kern_wait doesn't work
|
||||
* because we mess with the options here
|
||||
*/
|
||||
if (args->options & ~(WUNTRACED | WNOHANG | WCONTINUED | __WCLONE))
|
||||
@ -1418,10 +1418,9 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args)
|
||||
|
||||
/*
|
||||
* The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify
|
||||
* td->td_retval[1] when COMPAT_43 is defined. This
|
||||
* globbers registers that are assumed to be preserved. The following
|
||||
* lightweight syscalls fixes this. See also linux_getgid16() and
|
||||
* linux_getuid16() in linux_uid16.c.
|
||||
* td->td_retval[1] when COMPAT_43 is defined. This clobbers registers that
|
||||
* are assumed to be preserved. The following lightweight syscalls fixes
|
||||
* this. See also linux_getgid16() and linux_getuid16() in linux_uid16.c
|
||||
*
|
||||
* linux_getpid() - MP SAFE
|
||||
* linux_getgid() - MP SAFE
|
||||
|
@ -199,10 +199,9 @@ linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args)
|
||||
|
||||
/*
|
||||
* The FreeBSD native getgid(2) and getuid(2) also modify td->td_retval[1]
|
||||
* when COMPAT_43 is defined. This globbers registers that
|
||||
* are assumed to be preserved. The following lightweight syscalls fixes
|
||||
* this. See also linux_getpid(2), linux_getgid(2) and linux_getuid(2) in
|
||||
* linux_misc.c
|
||||
* when COMPAT_43 is defined. This clobbers registers that are assumed to
|
||||
* be preserved. The following lightweight syscalls fixes this. See also
|
||||
* linux_getpid(2), linux_getgid(2) and linux_getuid(2) in linux_misc.c
|
||||
*
|
||||
* linux_getgid16() - MP SAFE
|
||||
* linux_getuid16() - MP SAFE
|
||||
|
@ -58,12 +58,11 @@ __FBSDID("$FreeBSD$");
|
||||
const char linux_emul_path[] = "/compat/linux";
|
||||
|
||||
/*
|
||||
* Search an alternate path before passing pathname arguments on
|
||||
* to system calls. Useful for keeping a separate 'emulation tree'.
|
||||
* Search an alternate path before passing pathname arguments on to
|
||||
* system calls. Useful for keeping a separate 'emulation tree'.
|
||||
*
|
||||
* If cflag is set, we check if an attempt can be made to create
|
||||
* the named file, i.e. we check if the directory it should
|
||||
* be in exists.
|
||||
* If cflag is set, we check if an attempt can be made to create the
|
||||
* named file, i.e. we check if the directory it should be in exists.
|
||||
*/
|
||||
int
|
||||
linux_emul_convpath(td, path, pathseg, pbuf, cflag)
|
||||
|
@ -124,7 +124,7 @@ exec_linux_imgact(struct image_params *imgp)
|
||||
|
||||
/*
|
||||
* Check if file_offset page aligned,.
|
||||
* Currently we cannot handle misalinged file offsets,
|
||||
* Currently we cannot handle misaligned file offsets,
|
||||
* and so we read in the entire image (what a waste).
|
||||
*/
|
||||
if (file_offset & PAGE_MASK) {
|
||||
|
@ -743,7 +743,7 @@ struct l_desc_struct {
|
||||
|
||||
/*
|
||||
* macros which does the same thing as those in linux include/asm-um/ldt-i386.h
|
||||
* these convert linux user-space descriptor to machine one
|
||||
* these convert linux user space descriptor to machine one
|
||||
*/
|
||||
#define LDT_entry_a(info) \
|
||||
((((info)->base_addr & LINUX_LOWERWORD) << 16) | ((info)->limit & LINUX_LOWERWORD))
|
||||
|
@ -413,8 +413,8 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
||||
/*
|
||||
* XXX: in linux sharing of fs info (chroot/cwd/umask)
|
||||
* and open files is independant. in fbsd its in one
|
||||
* structure but in reality it doesnt make any problems
|
||||
* because both this flags are set at once usually.
|
||||
* structure but in reality it doesn't cause any problems
|
||||
* because both of these flags are usually set together.
|
||||
*/
|
||||
if (!(args->flags & (CLONE_FILES | CLONE_FS)))
|
||||
ff |= RFFDG;
|
||||
@ -424,7 +424,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
||||
* kernel threads. Unfortunately despite the existence of the
|
||||
* CLONE_THREAD flag, version of linuxthreads package used in
|
||||
* most popular distros as of beginning of 2005 doesn't make
|
||||
* any use of it. Therefore, this detection relay fully on
|
||||
* any use of it. Therefore, this detection relies on
|
||||
* empirical observation that linuxthreads sets certain
|
||||
* combination of flags, so that we can make more or less
|
||||
* precise detection and notify the FreeBSD kernel that several
|
||||
@ -724,7 +724,7 @@ linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
|
||||
* Our mmap with MAP_STACK takes addr as the maximum
|
||||
* downsize limit on BOS, and as len the max size of
|
||||
* the region. It them maps the top SGROWSIZ bytes,
|
||||
* and autgrows the region down, up to the limit
|
||||
* and auto grows the region down, up to the limit
|
||||
* in addr.
|
||||
*
|
||||
* If we don't use the MAP_STACK option, the effect
|
||||
@ -1108,18 +1108,21 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args
|
||||
|
||||
idx = info.entry_number;
|
||||
/*
|
||||
* Semantics of linux version: every thread in the system has array
|
||||
* of 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
|
||||
* syscall loads one of the selected tls decriptors with a value
|
||||
* and also loads GDT descriptors 6, 7 and 8 with the content of the per-thread
|
||||
* descriptors.
|
||||
* Semantics of linux version: every thread in the system has array of
|
||||
* 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
|
||||
* syscall loads one of the selected tls decriptors with a value and
|
||||
* also loads GDT descriptors 6, 7 and 8 with the content of the
|
||||
* per-thread descriptors.
|
||||
*
|
||||
* Semantics of fbsd version: I think we can ignore that linux has 3 per-thread
|
||||
* descriptors and use just the 1st one. The tls_array[] is used only in
|
||||
* set/get-thread_area() syscalls and for loading the GDT descriptors. In fbsd
|
||||
* we use just one GDT descriptor for TLS so we will load just one.
|
||||
* XXX: this doesnt work when user-space process tries to use more then 1 TLS segment
|
||||
* comment in the linux sources says wine might do that.
|
||||
* Semantics of fbsd version: I think we can ignore that linux has 3
|
||||
* per-thread descriptors and use just the 1st one. The tls_array[]
|
||||
* is used only in set/get-thread_area() syscalls and for loading the
|
||||
* GDT descriptors. In fbsd we use just one GDT descriptor for TLS so
|
||||
* we will load just one.
|
||||
*
|
||||
* XXX: this doesn't work when a user space process tries to use more
|
||||
* than 1 TLS segment. Comment in the linux sources says wine might do
|
||||
* this.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1132,8 +1135,9 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args
|
||||
|
||||
/*
|
||||
* we have to copy out the GDT entry we use
|
||||
* FreeBSD uses GDT entry #3 for storing %gs so load that
|
||||
* XXX: what if userspace program doesnt check this value and tries
|
||||
* FreeBSD uses GDT entry #3 for storing %gs so load that
|
||||
*
|
||||
* XXX: what if a user space program doesn't check this value and tries
|
||||
* to use 6, 7 or 8?
|
||||
*/
|
||||
idx = info.entry_number = 3;
|
||||
|
Loading…
Reference in New Issue
Block a user