summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Control the execution permission of the readable segments forkib2011-10-151-2/+2
| | | | | | | i386 binaries on the amd64 and ia64 with the sysctl, instead of unconditionally enabling it. Reviewed by: marcel
* Regen.jhb2011-10-145-12/+12
|
* Use PAIR32TO64() for the offset and length parameters tojhb2011-10-142-4/+4
| | | | | | | freebsd32_posix_fallocate() to properly handle big-endian platforms. Reviewed by: mdf MFC after: 1 week
* Use PTRIN().marcel2011-10-131-1/+1
|
* Wrap mprotect(2) so that we can add execute permissions when readmarcel2011-10-136-10/+32
| | | | | permissions are requested. This is needed on amd64 and ia64 for JDK 1.4.x
* Wrap mprotect(2)marcel2011-10-131-1/+1
|
* In freebsd32_mmap() and when compiling for amd64 or ia64, alsomarcel2011-10-131-0/+5
| | | | | ask for execute permissions when read permissions are wanted. This is needed for JDK 1.4.x on i386.
* Add curly braces missed in r226247.brueffer2011-10-111-1/+2
| | | | | | Pointy hat to: brueffer Submitted by: many MFC after: 1 week
* Properly free linux_gidset in case of an error.brueffer2011-10-111-0/+1
| | | | | | CID: 4136 Found with: Coverity Prevent(tm) MFC after: 1 week
* Use the caculated length instead of maximum length.jkim2011-10-061-2/+2
|
* Remove a now-defunct variable.jkim2011-10-061-16/+15
|
* Use uint32_t instead of u_int32_t. Fix style(9) nits.jkim2011-10-061-10/+9
|
* Make sure to ignore the leading NULL byte from Linux abstract namespace.jkim2011-10-061-2/+10
|
* Restore the original socket address length if it was not really AF_INET6.jkim2011-10-061-16/+19
|
* Retern more appropriate errno when Linux path name is too long.jkim2011-10-061-1/+1
|
* Inline do_sa_get() function and remove an unused return value.jkim2011-10-061-23/+9
|
* Unroll inlined strnlen(9) and make it easier to read. No functional change.jkim2011-10-061-10/+6
|
* Fix a bug in UNIX socket handling in the linux emulator which wascperciva2011-10-041-0/+15
| | | | | | | | | exposed by the security fix in FreeBSD-SA-11:05.unix. Approved by: so (cperciva) Approved by: re (kib) Security: Related to FreeBSD-SA-11:05.unix, but not actually a security fix.
* Auto-generated code from sys_ prefixing makesyscalls.sh changekmacy2011-09-165-297/+297
| | | | Approved by: re(bz)
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-1619-231/+240
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Add experimental support for process descriptorsjonathan2011-08-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | A "process descriptor" file descriptor is used to manage processes without using the PID namespace. This is required for Capsicum's Capability Mode, where the PID namespace is unavailable. New system calls pdfork(2) and pdkill(2) offer the functional equivalents of fork(2) and kill(2). pdgetpid(2) allows querying the PID of the remote process for debugging purposes. The currently-unimplemented pdwait(2) will, in the future, allow querying rusage/exit status. In the interim, poll(2) may be used to check (and wait for) process termination. When a process is referenced by a process descriptor, it does not issue SIGCHLD to the parent, making it suitable for use in libraries---a common scenario when using library compartmentalisation from within large applications (such as web browsers). Some observers may note a similarity to Mach task ports; process descriptors provide a subset of this behaviour, but in a UNIX style. This feature is enabled by "options PROCDESC", but as with several other Capsicum kernel features, is not enabled by default in GENERIC 9.0. Reviewed by: jhb, kib Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDrwatson2011-08-1110-37/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
* Implement the linprocfs swaps file, providing information about thekib2011-08-011-0/+29
| | | | | | | | | | configured swap devices in the Linux-compatible format. Based on the submission by: Robert Millan <rmh debian org> PR: kern/159281 Reviewed by: bde Approved by: re (kensmith) MFC after: 2 weeks
* Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.bz2011-07-181-1/+1
| | | | | | | | | Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib)
* Correct small typo in a do{}while(0) definemarck2011-07-171-1/+1
| | | | | Approved by: kib MFC after: 2 weeks
* Remove the 'either' from the comment as it'll be less obvious that webz2011-07-171-4/+4
| | | | | | removed semmap in a bit of time from now. Re-wrap. Suggested by: jhb
* Auto-generated system call code with cap_new(), cap_getrights().jonathan2011-07-155-8/+52
| | | | | Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
* Add cap_new() and cap_getrights() system calls.jonathan2011-07-151-2/+3
| | | | | | | | | Implement two previously-reserved Capsicum system calls: - cap_new() creates a capability to wrap an existing file descriptor - cap_getrights() queries the rights mask of a capability. Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
* Remove semaphore map entry count "semmap" field and its tuningbz2011-07-141-1/+9
| | | | | | | | | | | option that is highly recommended to be adjusted in too much documentation while doing nothing in FreeBSD since r2729 (rev 1.1). ipcs(1) needs to be recompiled as it is accessing _KERNEL private variables. Reviewed by: jhb (before comment change on linux code) Sponsored by: Sandvine Incorporated
* Return empty cmdline/environ string for processes with kernel addresspluknet2011-06-171-0/+18
| | | | | | | | | | space. This is consistent with the behavior in linux. PR: kern/157871 Reported by: Petr Salinger <Petr Salinger att seznam cz> Verified on: GNU/kFreeBSD debian 8.2-1-amd64 (by reporter) Reviewed by: kib (some time ago) MFC after: 2 weeks
* Regen.kib2011-06-164-7/+14
|
* Implement compat32 for old lseek, for the a.out binaries on amd64.kib2011-06-162-1/+15
|
* Commit the missing linux_videdev2_compat.h (lost somewhere betweennetchild2011-05-041-0/+137
| | | | | | commit tree patch generation -> successful compile tree build test -> commmit). Pointy hat to: netchild
* Add FEATURE macros for v4l and v4l2 to the linuxulator.netchild2011-05-041-0/+4
| | | | Suggested by: ae
* This is v4l2 support for the linuxulator. This allows to access FreeBSDnetchild2011-05-042-0/+403
| | | | | | | | | native devices which support the v4l2 API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd or multimedia/webcamd supplied drivers. Submitted by: nox MFC after: 1 month
* Fix typo in comment, improve comment.netchild2011-05-041-2/+2
|
* Add explanation about the use-permission and FreeBSDify it.netchild2011-05-041-0/+15
|
* Copy the v4l2 header unchanged from the vendor branch.netchild2011-05-041-0/+1164
|
* Regen.mdf2011-04-185-5/+52
|
* Add the posix_fallocate(2) syscall. The default implementation inmdf2011-04-182-0/+16
| | | | | | | | | | | | | | vop_stdallocate() is filesystem agnostic and will run as slow as a read/write loop in userspace; however, it serves to correctly implement the functionality for filesystems that do not implement a VOP_ALLOCATE. Note that __FreeBSD_version was already bumped today to 900036 for any ports which would like to use this function. Also reserve space in the syscall table for posix_fadvise(2). Reviewed by: -arch (previous version)
* Remove stray semicolon.trasz2011-04-101-1/+1
|
* Use atomic load & store for TSC frequency. It may be overkill for amd64 butjkim2011-04-071-3/+5
| | | | | | | | | safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now).
* Add accounting for most of the memory-related resources.trasz2011-04-052-2/+7
| | | | | Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
* Implement compat32 shims for PCIOCGETCONF.kib2011-04-021-0/+106
| | | | | | | | | | | | There is a generic problem with the shims for ioctls that receive pointers to the usermode data areas in the data argument. We either have to modify the handler to accept UIO_USERSPACE/UIO_SYSSPACE indicator, or allocate and fill a usermode memory for data buffer in the host format. The change goes the second route, in particular because we do not need to modify the handler. Submitted by: John Wehle <john feith com> MFC after: 2 weeks
* Provide the structures and ioctl number definition for handlingkib2011-04-022-0/+44
| | | | | | | PCIOCGETCONF compat32. Submitted by: John Wehle <john feith com> MFC after: 2 weeks
* Regenkib2011-04-014-20/+58
|
* Add support for executing the FreeBSD 1/i386 a.out binaries on amd64.kib2011-04-016-17/+124
| | | | | | | | | | | | | | | In particular: - implement compat shims for old stat(2) variants and ogetdirentries(2); - implement delivery of signals with ancient stack frame layout and corresponding sigreturn(2); - implement old getpagesize(2); - provide a user-mode trampoline and LDT call gate for lcall $7,$0; - port a.out image activator and connect it to the build as a module on amd64. The changes are hidden under COMPAT_43. MFC after: 1 month
* Revert r220032:linux compat: add SO_PASSCRED option with basic handlingavg2011-03-311-14/+0
| | | | | | | | | | I have not properly thought through the commit. After r220031 (linux compat: improve and fix sendmsg/recvmsg compatibility) the basic handling for SO_PASSCRED is not sufficient as it breaks recvmsg functionality for SCM_CREDS messages because now we would need to handle sockcred data in addition to cmsgcred. And that is not implemented yet. Pointyhat to: avg
* Regenerate.trasz2011-03-305-5/+165
|
* Add rctl. It's used by racct to take user-configurable actions basedtrasz2011-03-301-0/+15
| | | | | | | | on the set of rules it maintains and the current resource usage. It also privides userland API to manage that ruleset. Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
OpenPOWER on IntegriCloud