summaryrefslogtreecommitdiffstats
path: root/sys/amd64/linux32
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "MFC r319873:""Luiz Souza2018-02-231-1/+3
| | | | This reverts commit 4c9907d21517c211b27a3cf5b7a2a976623820cc.
* Revert "MFC r319873:"Luiz Souza2018-02-211-3/+1
| | | | This reverts commit 5dad0dd804a33b8a372d49fa342b24c67b1c2fb3.
* MFC r319873:kib2018-02-191-1/+3
| | | | | | | Move struct syscall_args syscall arguments parameters container into struct thread. (cherry picked from commit 985b26c6741218c134a15526fd32b736bd73fa8a)
* MFC 313564:jhb2017-05-104-4/+0
| | | | | | | | | | | | | Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Regenerate the affected files along with the MFC.
* MFC r315957:dchagin2017-04-291-1/+0
| | | | | Implement Linux mincore() system call. This is necessary for the upcoming drm-next.
* MFC r315505:dchagin2017-04-231-1/+0
| | | | | Implement getrandom() syscall. Note. GRND_RANDOM option is not supported for now.
* MFC r315501:dchagin2017-04-151-31/+0
| | | | To reduce code duplication move socket defines to the MI path.
* MFC r314866:dchagin2017-04-152-155/+0
| | | | | | | | | | | | | Reduce code duplication between MD Linux code by moving SYSV IPC 64-bit related struct definitions out into the MI path. Invert the native ipc structs to the Linux ipc structs convesion logic. Since 64-bit variant of ipc structs has more precision convert native ipc structs to the 64-bit Linux ipc structs and then truncate 64-bit values into the non 64-bit if needed. Unlike Linux, return EOVERFLOW if the values do not fit. Fix SYSV IPC for 64-bit Linuxulator which never sets IPC_64 bit.
* MFC 316644:avatar2017-04-151-1/+2
| | | | | | | | | | Trying to be more compatible with Linux if.h definitions: - renaming l_ifreq::ifru_metric to l_ifreq::ifru_ivalue; - adding a definition for ifr_ifindex which points to l_ifreq::ifru_ivalue. A quick search indicates that Linux already got the above changes since 2.1.14. Reviewed by: kib, marcel, dchagin
* MFC 314783:mmokhi2017-04-115-72/+8
| | | | | | Regenerated Linuxulator syscall tables for r314782 Approved by: trasz
* MFC r314782:mmokhi2017-04-112-8/+22
| | | | | | | | Add UNIMPLEMENTED() placeholder macro for the syscalls that are not implemented in Linux kernel itself. Cleanup DUMMY() macros. Approved by: trasz
* MFC r314312:dchagin2017-03-303-2/+8
| | | | | | | | | | | | Change Linux epoll_pwait syscall definition to match Linux actual one. MFC r314313: Regen for r314312 (Linux epoll_pwait). MFC r314314: Return EINVAL in case when an invalid size of signal mask specified.
* MFC r314295:dchagin2017-03-301-4/+0
| | | | Implement timerfd family syscalls.
* MFC r314292:dchagin2017-03-305-36/+97
| | | | Regen after r314291 (timerfd definition).
* MFC r314291:dchagin2017-03-301-3/+6
| | | | Change Linuxulator timerfd syscalls definition to match actual Linux one.
* MFC r312986:trasz2017-03-191-4/+1
| | | | | | Replace sys_ftruncate() with kern_ftruncate() in various compats. Sponsored by: DARPA, AFRL
* MFC r314282:trasz2017-03-191-1/+3
| | | | | Fix linux_fstatfs() to return proper value for f_frsize. Without it, linux df(1) binary from Xenial shows garbage.
* MFC r313940:dchagin2017-03-151-1/+0
| | | | Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3).
* MFC r303464 (by brooks@):dchagin2017-03-111-5/+0
| | | | | | | | Don't create pointless backups of generated files in "make sysent". Any sensible workflow will include a revision control system from which to restore the old files if required. In normal usage, developers just have to clean up the mess.
* MFC r314219mmokhi2017-03-083-4/+4
| | | | | | Add linux_preadv() and linux_pwritev() syscalls to Linuxulator. Approved by: dchagin
* MFC r313284:dchagin2017-02-227-43/+1805
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update syscall.master to 4.10-rc6. Also fix comments, a typo, and wrong numbering for a few unimplemented syscalls. For 32-bit Linuxulator, socketcall() syscall was historically the entry point for the sockets API. Starting in Linux 4.3, direct syscalls are provided for the sockets API. Enable it. The initial version of patch was provided by trasz@ and extended by me. MFC r313285: Regen after r313284. MFC r313684: Fix r313284. Members of the syscall argument structures are padded to a word size. So, for COMPAT_LINUX32 we should convert user supplied system call arguments which is 32-bit in that case to the array of register_t. MFC r313912: Finish r313684. Convert linux_recv(), linux_send() and linux_accept() system call arguments to the register_t type too.
* MFC r302517:dchagin2016-07-182-188/+3
| | | | | | | | | | | Fix a copy/paste bug introduced during X86_64 Linuxulator work. FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation use READ_IMPLIES_EXEC flag, introduced in r302515. While here move common part of mmap() and mprotect() code to the files in compat/linux to reduce code dupcliation between Linuxulator's Approved by: re (gjb)
* MFC r302516:dchagin2016-07-185-7/+14
| | | | | | Regen for r302515 (Linux personality). Approved by: re (gjb)
* MFC r302515:dchagin2016-07-181-1/+1
| | | | | | | | | | Implement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag. In Linux if this flag is set, PROT_READ implies PROT_EXEC for mmap(). Linux/i386 set this flag automatically if the binary requires executable stack. READ_IMPLIES_EXEC flag will be used in the next Linux mmap() commit. Approved by: re (gjb)
* Regen after r300359 (struct l_sched_param removal).dchagin2016-05-215-13/+13
| | | | MFC after: 1 week
* Correct an argument param of linux_sched_* system calls as a struct ↵dchagin2016-05-211-3/+3
| | | | | | | | l_sched_param does not defined due to it's nature. MFC after: 1 week
* sys/amd64: Small spelling fixes.pfg2016-05-031-1/+1
| | | | No functional change.
* Cleanup redundant parenthesis from existing howmany()/roundup() macro uses.pfg2016-04-221-1/+1
|
* X86: use our nitems() macro when it is avaliable through param.h.pfg2016-04-191-1/+1
| | | | | | No functional change, only trivial cases are done in this sweep, Discussed in: freebsd-current
* Add kern.features flags for linux and linux64 modulesbapt2016-04-051-0/+1
| | | | | | | | | | | | | kern.features.linux: 1 meaning linux 32 bits binaries are supported kern.features.linux64: 1 meaning linux 64 bits binaries are supported The goal here is to help 3rd party applications (including ports) to determine if the host do support linux emulation Reviewed by: dchagin MFC after: 1 week Relnotes: yes Differential Revision: D5830
* Revert r297310 as the SOL_XXX are equal to the IPPROTO_XX except SOL_SOCKET.dchagin2016-03-271-1/+0
| | | | Pointed out by: ae@
* iConvert Linux SOL_IPV6 level.dchagin2016-03-271-0/+1
| | | | MFC after: 1 week
* Regen for r297061 (fstatfs64 Linux syscall).dchagin2016-03-205-7/+29
| | | | MFC after: 1 week
* Implement fstatfs64 system call.dchagin2016-03-202-2/+1
| | | | | | PR: 181012 Submitted by: John Wehle MFC after: 1 week
* Convert ss_sp in stack_t and sigstack to void *.jhb2016-01-271-2/+2
| | | | | | | | | | | | POSIX requires these members to be of type void * rather than the char * inherited from 4BSD. NetBSD and OpenBSD both changed their fields to void * back in 1998. No new build failures were reported via an exp-run. PR: 206503 (exp-run) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5092
* Implement AT_SECURE properly.delphij2016-01-271-1/+3
| | | | | | | | | | | AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a boolean flag indicating whether secure mode should be enabled. 1 means that the program has changes its credentials during the execution. Being exported AT_SECURE used by glibc issetugid() call. Submitted by: imp, dchagin Security: FreeBSD-SA-16:10.linux Security: CVE-2016-1883
* Regen after r293907.glebius2016-01-145-7/+7
|
* Change linux get_robust_list system call to match actual linux one.glebius2016-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | The set_robust_list system call request the kernel to record the head of the list of robust futexes owned by the calling thread. The head argument is the list head to record. The get_robust_list system call should return the head of the robust list of the thread whose thread id is specified in pid argument. The list head should be stored in the location pointed to by head argument. In contrast, our implemenattion of get_robust_list system call copies the known portion of memory pointed by recorded in set_robust_list system call pointer to the head of the robust list to the location pointed by head argument. So, it is possible for a local attacker to read portions of kernel memory, which may result in a privilege escalation. Submitted by: mjg Security: SA-16:03.linux
* Implement vsyscall hack. Prior to 2.13 glibc uses vsyscalldchagin2016-01-091-0/+1
| | | | | | | | | instead of vdso. An upcoming linux_base-c6 needs it. Differential Revision: https://reviews.freebsd.org/D1090 Reviewed by: kib, trasz MFC after: 1 week
* Remove sv_prepsyscall, sv_sigsize and sv_sigtbl members of the structkib2015-11-281-3/+0
| | | | | | | | | | | | | | | | sysent. sv_prepsyscall is unused. sv_sigsize and sv_sigtbl translate signal number from the FreeBSD namespace into the ABI domain. It is only utilized on i386 for iBCS2 binaries. The issue with this approach is that signals for iBCS2 were delivered with the FreeBSD signal frame layout, which does not follow iBCS2. The same note is true for any other potential user if sv_sigtbl. In other words, if ABI needs signal number translation, it really needs custom sv_sendsig method instead. Sponsored by: The FreeBSD Foundation
* Update for LINUX32 rename. The assembler didn't complain about undefinedjhb2015-10-291-2/+2
| | | | symbols but just used 0 after the rename.
* Fix build with DEBUG defined.jhb2015-10-292-3/+3
| | | | Reported by: hselasky
* Regen for linux32 rename and linux64 systrace.jhb2015-10-224-602/+602
|
* Rename remaining linux32 symbols such as linux_sysent[] andjhb2015-10-223-8/+8
| | | | | | | | | | | | | | | | | linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D3954
* Merge r289055 to amd64/linux32:jhb2015-10-221-1/+1
| | | | | | | linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler.
* pcb_gs32sd is unused for long time, remove it. Keep the padding in pcb.kib2015-06-291-1/+0
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Implement lockless resource limits.mjg2015-06-101-1/+1
| | | | | | | | | | Use the same scheme implemented to manage credentials. Code needing to look at process's credentials (as opposed to thred's) is provided with *_proc variants of relevant functions. Places which possibly had to take the proc lock anyway still use the proc pointer to access limits.
* When I merged the lemul branch I missied kib@'s r282708 commit.dchagin2015-05-251-9/+0
| | | | | | | This is not the final fix as I need properly cleanup thread resources before other threads suicide. Tested by: Ruslan Makhmatkhanov
* Regen for r283492.dchagin2015-05-245-8/+20
|
* Implement Linux specific syncfs() system call.dchagin2015-05-242-2/+1
|
OpenPOWER on IntegriCloud