| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add back in a scheme to emulate old type major/minor numbers via hooks into
stat, linprocfs to return major/minors that Linux app's expect. Currently
only /dev/null is always registered. Drivers can register via the Linux
type shim similar to the ioctl shim but by using
linux_device_register_handler/linux_device_unregister_handler functions.
The structure is:
struct linux_device_handler {
char *bsd_driver_name;
char *linux_driver_name;
char *bsd_device_name;
char *linux_device_name;
int linux_major;
int linux_minor;
int linux_char_device;
};
Linprocfs uses this to display the major number of the driver. The
soon to be available linsysfs will use it to fill in the driver name.
Linux_stat uses it to translate the major/minor into Linux type values.
Note major numbers are dynamically assigned via passing in a -1 for
the major number so we don't need to keep track of them.
This is somewhat needed due to us switching to our devfs. MegaCli
will not run until I add in the linsysfs and mfi Linux compat changes.
Sponsored by: IronPort Systems
|
| |
|
| |
|
|
|
|
| |
Tested by: cross-compile
|
| |
|
|
|
|
| |
Pointyhat to: netchild
|
| |
|
|
|
|
|
| |
Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Obtained from: DragonFly (some parts)
|
|
|
|
|
|
| |
the callers if the exec either succeeds or fails early.
- Move the code to call exit1() if the exec fails after the vmspace is
gone to the bottom of kern_execve() to cut down on some code duplication.
|
| |
|
|
|
|
|
|
| |
linux system call table.
Obtained from: TrustedBSD Project
|
|
|
|
|
|
| |
be audited.
Obtained from: TrustedBSD Project
|
|
|
|
|
|
|
|
|
|
| |
with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually
allow executing elf dynamic binaries (aka shared libraries). When it is
requested to execute ET_DYN elf image check if this flag is on after we
know the elf brand allowing execution if so.
PR: kern/87615
Submitted by: Marcin Koziej <creep@desk.pl>
|
|
|
|
|
|
|
|
|
| |
which existed to cleanup the linux_osname mutex. Now that MTX_SYSINIT()
has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here
was redundant and resulted in panics in debug kernels.
MFC after: 1 week
Reported by: Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
changes in MD code are trivial, before this change, trapsignal and
sendsig use discrete parameters, now they uses member fields of
ksiginfo_t structure. For sendsig, this change allows us to pass
POSIX realtime signal value to user code.
2. Remove cpu_thread_siginfo, it is no longer needed because we now always
generate ksiginfo_t data and feed it to libpthread.
3. Add p_sigqueue to proc structure to hold shared signals which were
blocked by all threads in the proc.
4. Add td_sigqueue to thread structure to hold all signals delivered to
thread.
5. i386 and amd64 now return POSIX standard si_code, other arches will
be fixed.
6. In this sigqueue implementation, pending signal set is kept as before,
an extra siginfo list holds additional siginfo_t data for signals.
kernel code uses psignal() still behavior as before, it won't be failed
even under memory pressure, only exception is when deleting a signal,
we should call sigqueue_delete to remove signal from sigqueue but
not SIGDELSET. Current there is no kernel code will deliver a signal
with additional data, so kernel should be as stable as before,
a ksiginfo can carry more information, for example, allow signal to
be delivered but throw away siginfo data if memory is not enough.
SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can
not be caught or masked.
The sigqueue() syscall allows user code to queue a signal to target
process, if resource is unavailable, EAGAIN will be returned as
specification said.
Just before thread exits, signal queue memory will be freed by
sigqueue_flush.
Current, all signals are allowed to be queued, not only realtime signals.
Earlier patch reviewed by: jhb, deischen
Tested on: i386, amd64
|
|
|
|
|
| |
so that they aren't duplicated 3 times and are also in the same file as
the code that depends on the SYSVIPC modules.
|
| |
|
|
|
|
|
|
|
| |
with the master syscall table as well as marking several ABI wrapper
functions safe.
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/81951
Submitted by: Andriy Gapon <avg@icyb.net.ua>
MFC after: 1 week
|
|
|
|
|
|
|
| |
getpriority(2) syscall.
PR: kern/81951
Submitted by: Andriy Gapon <avg@icyb.net.ua>
|
|
|
|
|
|
|
| |
the audit event field to the syscalls.master file format.
Submitted by: wsalamon
Obtained from: TrustedBSD Project
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
audit event identifier associated with each system call, which will
be stored by makesyscalls.sh in the sy_auevent field of struct sysent.
For now, default the audit identifier on all system calls to AUE_NULL,
but in the near future, other BSM event identifiers will be used. The
mapping of system calls to event identifiers is many:one due to
multiple system calls that map to the same end functionality across
compatibility wrappers, ABI wrappers, etc.
Submitted by: wsalamon
Obtained from: TrustedBSD Project
|
|
|
|
| |
the system call type field.
|
| |
|
|
|
|
|
|
|
| |
signal first and only then returning ENOSYS to match what real linux does.
PR: kern/74302
Submitted by: Travis Poppe <tlp@LiquidX.org>
|
|
|
|
|
|
|
| |
exec_copyin_args(), kern_execve(), and exec_free_args() rather than
execve() to eliminate stackgap use from Alpha's linux_execve().
Silence on: alpha@
|
|
|
|
|
|
|
|
|
|
|
| |
copies arguments into the kernel space and one that operates
completely in the kernel space;
o use kernel-only version of execve(2) to kill another stackgap in
linuxlator/i386.
Obtained from: DragonFlyBSD (partially)
MFC after: 2 weeks
|
|
|
|
| |
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.
|