| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/stable/11/; revision=303007
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/stable/11/; revision=303005
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[1] Remove unneeded sockaddr conversion before kern_recvit() call as the from
argument is used to record result (the source address of the received message) only.
[2] In Linux the type of msg_namelen member of struct msghdr is signed but native
msg_namelen has a unsigned type (socklen_t). So use the proper storage to fetch fromlen
from userspace and than check the user supplied value and return EINVAL if it is less
than 0 as a Linux do.
Reported by: Thomas Mueller <tmueller at sysgo dot com> [1]
Reviewed by: kib@
Approved by: re (gjb, kib)
MFC after: 3 days
Notes:
svn path=/head/; revision=302213
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads, to make it less confusing and using modern kernel terms.
Rename the functions to reflect current use of the functions, instead
of the historic KSE conventions:
cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads)
cpu_set_upcall -> cpu_copy_thread (for forks)
cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation)
Reviewed by: jhb (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
Differential revision: https://reviews.freebsd.org/D6731
Notes:
svn path=/head/; revision=301961
|
| |
|
|
|
|
|
|
|
| |
Submitted by: CTurt
Security: SA-16:20
Security: SA-16:21
Notes:
svn path=/head/; revision=301053
|
| |
|
|
|
|
|
|
| |
Reported by: C Turt <ecturt@gmail.com>
MFC after: 1 week
Notes:
svn path=/head/; revision=300569
|
| |
|
|
|
|
|
|
|
|
|
| |
local and inet are identical, but for inet6 values differ.
PR: 155040
Reported by: Simon Walton
MFC after: 2 week
Notes:
svn path=/head/; revision=300431
|
| |
|
|
|
|
|
|
|
| |
PR: 135458
Reported by: Stefan Schmidt @ stadtbuch.de
MFC after: 1 week
Notes:
svn path=/head/; revision=300416
|
| |
|
|
|
|
|
|
|
| |
switch to the high resolution sbintime_t.
MFC after: 1 week
Notes:
svn path=/head/; revision=300414
|
| |
|
|
|
|
|
|
|
| |
commit NPTL tests are ends in 1 minute faster.
MFC after: 1 week
Notes:
svn path=/head/; revision=300413
|
| |
|
|
|
|
|
|
|
| |
while here.
MFC after: 1 week
Notes:
svn path=/head/; revision=300412
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=300411
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intention of the POSIX IEEE Std 1003.1TM-2008/Cor 1-2013.
A robust mutex is guaranteed to be cleared by the system upon either
thread or process owner termination while the mutex is held. The next
mutex locker is then notified about inconsistent mutex state and can
execute (or abandon) corrective actions.
The patch mostly consists of small changes here and there, adding
neccessary checks for the inconsistent and abandoned conditions into
existing paths. Additionally, the thread exit handler was extended to
iterate over the userspace-maintained list of owned robust mutexes,
unlocking and marking as terminated each of them.
The list of owned robust mutexes cannot be maintained atomically
synchronous with the mutex lock state (it is possible in kernel, but
is too expensive). Instead, for the duration of lock or unlock
operation, the current mutex is remembered in a special slot that is
also checked by the kernel at thread termination.
Kernel must be aware about the per-thread location of the heads of
robust mutex lists and the current active mutex slot. When a thread
touches a robust mutex for the first time, a new umtx op syscall is
issued which informs about location of lists heads.
The umtx sleep queues for PP and PI mutexes are split between
non-robust and robust.
Somewhat unrelated changes in the patch:
1. Style.
2. The fix for proper tdfind() call use in umtxq_sleep_pi() for shared
pi mutexes.
3. Removal of the userspace struct pthread_mutex m_owner field.
4. The sysctl kern.ipc.umtx_vnode_persistent is added, which controls
the lifetime of the shared mutex associated with a vnode' page.
Reviewed by: jilles (previous version, supposedly the objection was fixed)
Discussed with: brooks, Martin Simmons <martin@lispworks.com> (some aspects)
Tested by: pho
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=300043
|
| |
|
|
|
|
|
|
|
| |
Mostly on comments but there are some user-visible messages as well.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=298829
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a minor follow-up to r297422, prompted by a Coverity warning. (It's
not a real defect, just a code smell.) OSD slot array reservations are an
array of pointers (void **) but were cast to void* and back unnecessarily.
Keep the correct type from reservation to use.
osd.9 is updated to match, along with a few trivial igor fixes.
Reported by: Coverity
CID: 1353811
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=298661
|
| |
|
|
|
|
|
| |
since it already was in linux_prison_check.
Notes:
svn path=/head/; revision=298573
|
| |
|
|
| |
Notes:
svn path=/head/; revision=298482
|
| |
|
|
|
|
|
|
|
| |
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
Notes:
svn path=/head/; revision=298310
|
| |
|
|
|
|
|
|
|
| |
plvc is a pointer, no functional change.
Found with devel/coccinelle.
Notes:
svn path=/head/; revision=298071
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix the way the code accesses process limits struct - pointed out by mjg@.
PR: 207386
Reviewed by: no objection form des@
MFC after: 3 weeks
Notes:
svn path=/head/; revision=297781
|
| |
|
|
| |
Notes:
svn path=/head/; revision=297525
|
| |
|
|
|
|
|
|
|
| |
CID: 1305178
Submitted by: pfg@
MFC after: 1 week
Notes:
svn path=/head/; revision=297519
|
| |
|
|
|
|
|
| |
Also don't work around nonexistent osd_register failure.
Notes:
svn path=/head/; revision=297424
|
| |
|
|
|
|
|
| |
Pointed out by: ae@
Notes:
svn path=/head/; revision=297313
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=297310
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=297309
|
| |
|
|
|
|
|
|
|
| |
the number of bytes written.
MFC after: 1 week
Notes:
svn path=/head/; revision=297297
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=297296
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=297072
|
| |
|
|
|
|
|
|
|
|
| |
not fit into 32 bit fileds of a Linux struct statfs.
PR: 181012
MFC after: 1 week
Notes:
svn path=/head/; revision=297070
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=297063
|
| |
|
|
|
|
|
|
|
| |
PR: 181012
Submitted by: John Wehle
MFC after: 1 week
Notes:
svn path=/head/; revision=297061
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer().
Assert that kern_setitimer() returns 0.
Remove bogus cast of secs.
Fix style(9) issues.
2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does.
Pointed out by: [1] Bruce Evans
MFC after: 1 week
Notes:
svn path=/head/; revision=297060
|
| |
|
|
|
|
|
|
|
|
|
| |
Also add mapping for several options from RFC 3493 and 3542.
Reviewed by: dchagin
Tested by: Joe Love <joe at getsomwhere dot net>
MFC after: 2 weeks
Notes:
svn path=/head/; revision=296557
|
| |
|
|
|
|
|
|
| |
Submitted by: Kevin P. Neal
MFC after: 1 week
Notes:
svn path=/head/; revision=296546
|
| |
|
|
|
|
|
|
|
|
|
| |
behaviour to the source.
Suggested by: emaste@
MFC after: 1 week
Notes:
svn path=/head/; revision=296543
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=296504
|
| |
|
|
|
|
|
|
|
| |
for UDP sockets.
MFC after: 1 week
Notes:
svn path=/head/; revision=296503
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
is always successfull.
So, ignore any errors and return 0 as a Linux do.
XXX. Unlike POSIX, Linux in case when the invalid seconds value specified
always return 0, so in that case Linux does not return proper remining time.
MFC after: 1 week
Notes:
svn path=/head/; revision=296502
|
| |
|
|
|
|
|
|
|
|
| |
if CLONE_PARENT is set, then the parent of the new process will
be the same as that of the calling process.
MFC after: 1 week
Notes:
svn path=/head/; revision=296501
|
| |
|
|
|
|
|
|
|
|
|
| |
need to include it explicitly when <vm/vm_param.h> is already included.
Suggested by: alc
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D5379
Notes:
svn path=/head/; revision=295882
|
| |
|
|
|
|
|
| |
Suggested by: kib
Notes:
svn path=/head/; revision=295232
|
| |
|
|
|
|
|
| |
already freeing it.
Notes:
svn path=/head/; revision=294233
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and replace crcopysafe by crcopy as crcopysafe is is not intended to be
safe in a threaded environment, it drops PROC_LOCK() in while() that
can lead to unexpected results, such as overwrite kernel memory.
In my POV crcopysafe() needs special attention. For now I do not see
any problems with this function, but who knows.
Submitted by: dchagin
Found by: trinity
Security: SA-16:04.linux
Notes:
svn path=/head/; revision=293909
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=293907
|
| |
|
|
|
|
|
|
|
|
| |
an forgotten dtrace probe when return the same error.
MFC after: 3 days
XMFC with: r292743
Notes:
svn path=/head/; revision=293627
|
| |
|
|
|
|
|
| |
panicing.
Notes:
svn path=/head/; revision=292744
|
| |
|
|
|
|
|
|
| |
Pointed out by: mjg@
Security: https://admbugs.freebsd.org/show_bug.cgi?id=679
Notes:
svn path=/head/; revision=292743
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Use SDT_PROBE<N>() instead of SDT_PROBE(). This has no functional effect
at the moment, but will be needed for some future changes.
- Don't hardcode the module component of the probe identifier. This is
set automatically by the SDT framework.
MFC after: 1 week
Notes:
svn path=/head/; revision=292384
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=289822
|