| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The sense of the test was reversed, so we were returning EISCONN, then 0.
Pointed out and tested by: Martin Blapp <mb@imp.ch>
|
|
|
|
|
|
|
|
| |
is to return EINPROGRESS, EALREADY, (so_error ONCE), EISCONN. Certain
linux applications rely on the so_error (normally 0) being returned in
order to operate properly.
Tested by: Thomas Moestl <tmoestl@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An initial tidyup of the mount() syscall and VFS mount code.
This code replaces the earlier work done by jlemon in an attempt to
make linux_mount() work.
* the guts of the mount work has been moved into vfs_mount().
* move `type', `path' and `flags' from being userland variables into being
kernel variables in vfs_mount(). `data' remains a pointer into
userspace.
* Attempt to verify the `type' and `path' strings passed to vfs_mount()
aren't too long.
* rework mount() and linux_mount() to take the userland parameters
(besides data, as mentioned) and pass kernel variables to vfs_mount().
(linux_mount() already did this, I've just tidied it up a little more.)
* remove the copyin*() stuff for `path'. `data' still requires copyin*()
since its a pointer into userland.
* set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each
filesystem. This variable is generally initialised with `path', and
each filesystem can override it if they want to.
* NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
credential structure, ucred (cr->cr_prison).
o Allow jail inheritence to be a function of credential inheritence.
o Abstract prison structure reference counting behind pr_hold() and
pr_free(), invoked by the similarly named credential reference
management functions, removing this code from per-ABI fork/exit code.
o Modify various jail() functions to use struct ucred arguments instead
of struct proc arguments.
o Introduce jailed() function to determine if a credential is jailed,
rather than directly checking pointers all over the place.
o Convert PRISON_CHECK() macro to prison_check() function.
o Move jail() function prototypes to jail.h.
o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the
flag in the process flags field itself.
o Eliminate that "const" qualifier from suser/p_can/etc to reflect
mutex use.
Notes:
o Some further cleanup of the linux/jail code is still required.
o It's now possible to consider resolving some of the process vs
credential based permission checking confusion in the socket code.
o Mutex protection of struct prison is still not present, and is
required to protect the reference count plus some fields in the
structure.
Reviewed by: freebsd-arch
Obtained from: TrustedBSD Project
|
|
|
|
|
|
| |
Also clean up debugging output in a slightly more uniform fashion.
The default behavior remains the same (all debugging output is turned on)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
similarily, for releasing a lock, we now have:
mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.
The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.
Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:
MTX_QUIET and MTX_NOSWITCH
The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:
mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.
Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.
Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.
Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.
Finally, caught up to the interface changes in all sys code.
Contributors: jake, jhb, jasone (in no particular order)
|
|
|
|
| |
Seperate does not exist in the english language.
|
|
|
|
| |
references along with the actual obtaining of additional references.
|
| |
|
|
|
|
| |
look in the device's cdevsw for the D_DISK flag.
|
|
|
|
| |
This fixes the problem with VMWARE not being able to use raw disks.
|
|
|
|
| |
Approved by: marcel
|
|
|
|
| |
Glanced over by: marcel
|
|
|
|
| |
to MALLOC.
|
| |
|
|
|
|
|
|
| |
allocated, 2 have been added to struct proc for setitimer and sleep.
Reviewed by: jhb, jlemon
|
|
|
|
|
|
|
|
|
|
| |
to our native connect(). This is required to deal with the differences
in the way linux handles connects on non-blocking sockets.
This gets the private beta of the Compaq Linux/alpha JDK working
on FreeBSD/alpha
Approved by: marcel
|
|
|
|
|
|
|
|
| |
signal. There's at least 1 program that is known to break.
Submitted patch has been edited to match current code.
MFC: yes
Submitted by: bde
|
|
|
|
| |
Syncing with it is wrong.
|
|
|
|
|
| |
Do not use sysent.c, proto.h and syscall.h in source tree;
use auto-generated versions.
|
|
|
|
|
|
|
|
|
|
| |
The offset field in struct dirent was set to the offset of
the next dirent in rev 1.36. The offset was calculated from
the current offset and the record length. This offset does
not necessarily match the real offset when we are using
cookies. Therefore, also use the cookies to set the offset
field in struct dirent if we're using cookies to iterate
through the dirents.
|
|
|
|
| |
Submitted by: Clive Lin <clive@CirX.ORG>
|
|
|
|
| |
pointed out by: obrien
|
|
|
|
|
|
|
|
| |
for a block device isn't that useful anymore.
Reported by: Wesley Morgan <morganw@chemicals.tacorp.com>
Submitted by: gallatin
Acknowledged by: phk
|
|
|
|
|
| |
its own syscall rather than going through a demux function like
linux_ipc() on i386
|
|
|
|
|
| |
are in the termios struct (probably because linux wants to be compatible
with the osf/1 termios struct), not the termio struct.
|
|
|
|
|
|
| |
AlphaLinux compat bits. This will be better cleaned up soon.
Agreed to what ever was necessary by: marcel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and associated user-level signal trampoline glue.
Without this patch, an SA_SIGINFO style handler can be installed by a linux
app, but if the handler accesses its sip argument, it will get a garbage
pointer and likely segfault.
We currently supply a valid pointer, but its contents are mainly
garbage. Filling this in properly is future work.
This is the second of 3 commits that will get IBM's JDK 1.3 working with
FreeBSD ...
|
|
|
|
|
|
|
|
|
| |
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.
Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.
|
| |
|
|
|
|
|
| |
the datatype (= long). Use ULONG_MAX and LONG_MAX to avoid
creating MD code.
|
|
|
|
|
| |
instead of the o{g|s}etrlimit so that the dependency on
COMPAT_43 is removed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Make linux_to_bsd_sigset and linux_do_sigaction non-static.
Move linux_sigaction. linux_sigsuspend, linux_rt_sigsuspend,
linux_pause and linux_sigaltstack to MD code.
|
|
|
|
|
|
|
|
| |
Move linux_select to MD code (i386 compat. syscall).
Move linux_fork, linux_vfork, linux_clone, linux_mmap,
linux_pipe, linux_ioperm, linux_iopl and linux_modify_ldt
to MD code.
|
| |
|
|
|
|
|
|
|
| |
Make the sem*, msg* and shm* function non-static as they are
called from MD code.
Move linux_ipc to MD code.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to construct a path that was long enough (ie longer than
SPARE_USRSPACE bytes) and trash the stack.
Note that SPARE_USRSPACE is much smaller than MAXPATHLEN so that
the Linuxulator will now return ENAMETOOLONG even if the path
is smaller than MAXPATHLEN.
PR: 12749
|
|
|
|
|
|
|
| |
issues.
Requested by: rwatson
Backed by: kris
|
|
|
|
|
| |
PR: 17991
Submitted by: Geoffrey Speicher <geoff@caribbean.sea-incorporated.com>
|
|
|
|
|
|
|
| |
in PR.
PR: 16993
Submitted by: Bjoern Groenvall <bg@sics.se>
|
|
|
|
|
|
|
|
| |
is not needed since the FreeBSD native implementation switched
from TIOC{G|S}PGRP to FIO{G|S}ETOWN (kern_descrip.c rev 1.55).
PR: 16946
Submitted by: Victor Salaman <salaman@teknos.com>
|
|
|
|
| |
Pointed out by: bde
|
|
|
|
|
|
|
|
| |
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:
-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
|
|
|
|
|
|
|
|
|
|
|
|
| |
doesn't. In the Linux emulation layer, ignore the fd passed when
MAP_ANON is specified.
Known application to be fixed: Xanalys/Harlequin Lispworks
Also improve debug output for mmap, now showing what the emulation
layer mapped to what (-DDEBUG).
Reviewed by: marcel
|