| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
including other headers.
|
|
|
|
|
|
| |
where they are coming from and what is expected from them.
MFC after: 2 days
|
| |
|
|
|
|
|
|
|
|
| |
directly. This removes a few more users of the stackgap and also marks
the syscalls using these wrappers MP safe where appropriate.
Tested on: i386 with linux acroread5
Compiled on: i386, alpha LINT
|
|
|
|
|
| |
same width as a pointer under Linux. Add two new macros, PTRIN and PTROUT,
which convert between l_uintptr_t and native pointers.
|
|
|
|
|
|
|
|
| |
for unknown events.
A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
|
| |
|
|
|
|
|
|
|
| |
kern_wait() trips an assert that Giant is not held in thread_wait().
PR: 67538
Submitted by: Nikos Ntarmos ntarmos at ceid dot upatras dot gr
|
|
|
|
|
|
| |
emulation, instead of treating it as an unimplemented syscall.
Requested by: marcel
|
| |
|
|
|
|
|
|
| |
the kernel wait4() made these all panic() implementations otherwise.
- The i386 linux_ptrace() syscall is MP safe. Alpha was already marked
MP safe.
|
| |
|
|
|
|
|
|
|
| |
linux_setrlimit(), linux_old_getrlimit(), osf1_getrlimit(),
osf1_setrlimit(), svr4_sys_ulimit(), svr4_sys_setrlimit(),
svr4_sys_getrlimit(), svr4_sys_setrlimit64(), svr4_sys_getrlimit64(),
ibcs2_sysconf(), and ibcs2_ulimit().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- struct plimit includes a mutex to protect a reference count. The plimit
structure is treated similarly to struct ucred in that is is always copy
on write, so having a reference to a structure is sufficient to read from
it without needing a further lock.
- The proc lock protects the p_limit pointer and must be held while reading
limits from a process to keep the limit structure from changing out from
under you while reading from it.
- Various global limits that are ints are not protected by a lock since
int writes are atomic on all the archs we support and thus a lock
wouldn't buy us anything.
- All accesses to individual resource limits from a process are abstracted
behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return
either an rlimit, or the current or max individual limit of the specified
resource from a process.
- dosetrlimit() was renamed to kern_setrlimit() to match existing style of
other similar syscall helper functions.
- The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit()
(it didn't used the stackgap when it should have) but uses lim_rlimit()
and kern_setrlimit() instead.
- The svr4 compat no longer uses the stackgap for resource limits calls,
but uses lim_rlimit() and kern_setrlimit() instead.
- The ibcs2 compat no longer uses the stackgap for resource limits. It
also no longer uses the stackgap for accessing sysctl's for the
ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result,
ibcs2_sysconf() no longer needs Giant.
- The p_rlimit macro no longer exists.
Submitted by: mtm (mostly, I only did a few cleanups and catchups)
Tested on: i386
Compiled on: alpha, amd64
|
|
|
|
|
| |
the output of the namespc column. Its functionality was removed some time
ago, but the overrides and the namespc column remained.
|
| |
|
| |
|
|
|
|
|
| |
quicker exec-time replacement of the elf interpreter on an emulation
environment where an entire /compat/* tree isn't really warranted.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
includes read(), write(), close(), setuid(), getuid(), linux_ptrace(),
linux_kill(), setpgid(), dup(), pipe(), getgid(), osf1_sigprocmask(),
umask(), getpgrp(), linux_setgroups(), linux_getgroups(), dup2(),
setpriority(), osf1_sigreturn(), osf1_sigsuspend(), osf1_gettimeofday(),
setreuid(), setregid(), setgid(), setsid(), osf1_sigaction(), getpgid(),
linux_getsid(), osf1_sysinfo(), linux_clone(), mlock(), munlock(),
mlockall(), munlockall(), sched_setparam(), sched_getparam(),
linux_sched_setscheduler(), linux_sched_getscheduler(),
linux_sched_get_priority_max(), linux_sched_get_priority_min(),
setresuid(), getresuid(), linux_rt_sigaction(), linux_rt_sigprocmask(),
linux_rt_sigsuspend(), gettimeofday(), linux_getitimer(),
linux_setitimer(), getrusage(), setresgid(), getresgid().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
systems where the data/stack/etc limits are too big for a 32 bit process.
Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c.
Supply an ia32_fixlimits function. Export the clip/default values to
sysctl under the compat.ia32 heirarchy.
Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max
value rather than the sysctl tweakable variable. This allows mmap to
place mappings at sensible locations when limits have been reduced.
Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same
method as mmap(0, ...) now does.
Note that we cannot remove all references to the sysctl tweakable
maxdsiz etc variables because /etc/login.conf specifies a datasize
of 'unlimited'. And that causes exec etc to fail since it can no
longer find space to mmap things.
|
|
|
|
| |
activations.
|
| |
|
|
|
|
|
|
|
| |
kern_sigprocmask() in the various binary compatibility emulators.
- Replace calls to sigsuspend(), sigaltstack(), sigaction(), and
sigprocmask() that used the stackgap with calls to the corresponding
kern_sig*() functions instead without using the stackgap.
|
|
|
|
| |
minor cleanups in both.
|
| |
|
|
|
|
| |
printf macros.
|
|
|
|
| |
wrong place.
|
|
|
|
| |
Reported by: des
|
|
|
|
|
|
|
| |
unload.
Submitted by: gallatin
Reported by: Martin Karlsson <mk-freebsd@bredband.net>
|
|
|
|
|
|
|
|
|
| |
functions are now all basically identical except that alpha linux uses
Elf64 arguments and svr4 and i386 linux use Elf32. The fixups include
changing the first argument to be a register_t ** to match the prototype
for fixup functions, asserting that the process in the image_params struct
is always curproc and removing unnecessary locking to read credentials as a
result, and a few style fixes.
|
| |
|
|
|
|
| |
Also clean up some egregious casts and incorrect use of sizeof.
|
| |
|
| |
|
|
|
|
|
| |
Reviewed by: dwmalone
MFC after: 10 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add wrappers for mmap2(2) and ftruncate64(2) system calls;
- don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked;
- add support for SOUND_MIXER_READ_STEREODEVS ioctl(2);
- make msgctl(IPC_STAT) and IPC_SET actually working by converting from
BSD msqid_ds to Linux and vice versa;
- properly return EINVAL if semget(2) is called with nsems being negative.
Reviewed by: marcel
Approved by: marcel
Tested with: LSB runtime test
|
|
|
|
| |
Forgotten by: scottl
|
|
|
|
|
|
| |
from the kernel build. This broke linux_genassym on the alpha. For the
kernel, the correct place to get offsetof() is not in /usr/include/stddef.h
but rather <sys/types.h>
|
|
|
|
| |
Reviewed by: davidxu@freebsd.org
|
|
|
|
|
|
| |
sysentvec. Initialized all fields of all sysentvecs, which will allow
them to be used instead of constants in more places. Provided stack
fixup routines for emulations that previously used the default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handler in the kernel at the same time. Also, allow for the
exec_new_vmspace() code to build a different sized vmspace depending on
the executable environment. This is a big help for execing i386 binaries
on ia64. The ELF exec code grows the ability to map partial pages when
there is a page size difference, eg: emulating 4K pages on 8K or 16K
hardware pages.
Flesh out the i386 emulation support for ia64. At this point, the only
binary that I know of that fails is cvsup, because the cvsup runtime
tries to execute code in pages not marked executable.
Obtained from: dfr (mostly, many tweaks from me).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)
Reviewed by: Almost everyone who counts
(at various times, peter, jhb, matt, alfred, mini, bernd,
and a cast of thousands)
NOTE: this is still Beta code, and contains lots of debugging stuff.
expect slight instability in signals..
|
|
|
|
|
| |
Spotted and suggested by: des
MFC after: 3 weeks
|
| |
|
|
|
|
| |
variable declarations. :-( Definately not my day today.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.
Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
|
| |
|
|
|
|
|
|
|
|
| |
getpid, getuid, getgid and pipe, since they bootstrapped from
OSF/1 and never cleaned up. Switch to the native syscalls
on alpha so that the above functions work
MFC after: 7 days
|