|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
24403315 |
| 22-Jan-2019 |
Mark Johnston <[email protected]> |
MFC r342864: Specify the correct option level when emulating SO_PEERCRED.
PR: 234722
|
|
Revision tags: release/12.0.0 |
|
| #
b720fbf3 |
| 22-Nov-2018 |
Tijl Coosemans <[email protected]> |
MFC r340674:
Fix another user address dereference in linux_sendmsg syscall.
This was hidden behind the LINUX_CMSG_NXTHDR macro which dereferences its second argument. Stop using the macro as well
MFC r340674:
Fix another user address dereference in linux_sendmsg syscall.
This was hidden behind the LINUX_CMSG_NXTHDR macro which dereferences its second argument. Stop using the macro as well as LINUX_CMSG_FIRSTHDR. Use the size field of the kernel copy of the control message header to obtain the next control message.
PR: 217901
show more ...
|
| #
edf16b7a |
| 22-Nov-2018 |
Tijl Coosemans <[email protected]> |
MFC r340631:
Do proper copyin of control message data in the Linux sendmsg syscall.
Instead of calling m_append with a user address, allocate an mbuf cluster and copy data into it using copyin. Fo
MFC r340631:
Do proper copyin of control message data in the Linux sendmsg syscall.
Instead of calling m_append with a user address, allocate an mbuf cluster and copy data into it using copyin. For the SCM_CREDS case, instead of zeroing a stack variable and appending that to the mbuf, zero part of the mbuf cluster directly. One mbuf cluster is also the size limit used by the FreeBSD sendmsg syscall (uipc_syscalls.c:sockargs()).
PR: 217901 Reviewed by: kib
show more ...
|
| #
c7902fbe |
| 07-Aug-2018 |
Mark Johnston <[email protected]> |
Improve handling of control message truncation.
If a recvmsg(2) or recvmmsg(2) caller doesn't provide sufficient space for all control messages, the kernel sets MSG_CTRUNC in the message flags to in
Improve handling of control message truncation.
If a recvmsg(2) or recvmmsg(2) caller doesn't provide sufficient space for all control messages, the kernel sets MSG_CTRUNC in the message flags to indicate truncation of the control messages. In the case of SCM_RIGHTS messages, however, we were failing to dispose of the rights that had already been externalized into the recipient's file descriptor table. Add a new function and mbuf type to handle this cleanup task, and use it any time we fail to copy control messages out to the recipient. To simplify cleanup, control message truncation is now only performed at control message boundaries.
The change also fixes a few related bugs: - Rights could be leaked to the recipient process if an error occurred while copying out a message's contents. - We failed to set MSG_CTRUNC if the truncation occurred on a control message boundary, e.g., if the caller received two control messages and provided only the exact amount of buffer space needed for the first.
PR: 131876 Reviewed by: ed (previous version) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16561
show more ...
|
| #
6040822c |
| 30-Jul-2018 |
Alan Somers <[email protected]> |
Make timespecadd(3) and friends public
The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have
Make timespecadd(3) and friends public
The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public.
Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version.
Bump _FreeBSD_version due to the breaking KPI change.
Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
cbd92ce6 |
| 09-May-2018 |
Matt Macy <[email protected]> |
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized c
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized cap_rights_t. A 3.6% speedup in fstat was measured with this change.
Reported by: mjg Reviewed by: oshogbo Approved by: sbruno MFC after: 1 month
show more ...
|
| #
eae594f7 |
| 22-Feb-2018 |
Ed Maste <[email protected]> |
Correct proper nouns in the Linuxulator
- Capitalize Linux - Spell FreeBSD out in full - Address some style(9) on changed lines
Sponsored by: Turing Robotic Industries Inc.
|
| #
0ba1b365 |
| 16-Feb-2018 |
Ed Maste <[email protected]> |
Rationalize license text on Linuxolator files
Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the stan
Rationalize license text on Linuxolator files
Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the standard 2-clause FreeBSD license for those files where I have permission from each of the listed copyright holders. Additional files waiting on permission from others are listed in review D14210.
Approved by: kan, marcel, sos, rdivacky MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
| #
132f90c6 |
| 05-Feb-2018 |
Ed Maste <[email protected]> |
Linuxolator whitespace cleanup
A version of each of the MD files by necessity exists for each CPU architecture supported by the Linuxolator. Clean these up so that new architectures do not inherit
Linuxolator whitespace cleanup
A version of each of the MD files by necessity exists for each CPU architecture supported by the Linuxolator. Clean these up so that new architectures do not inherit whitespace issues.
Clean up shared Linuxolator files while here.
Sponsored by: Turing Robotic Industries Inc.
show more ...
|
| #
7f2d13d6 |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/compat: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - er
sys/compat: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
cd92d27e |
| 18-Mar-2017 |
Dmitry Chagin <[email protected]> |
As noted by Roel Bouwman Linux allows a large buffer size than the struct ucred size. Fix this.
PR: 102956 Reported by: Roel Bouwman <roel at qsp nl> MFC after: 1 week
|
| #
54ec725b |
| 18-Mar-2017 |
Dmitry Chagin <[email protected]> |
Remove superflous break statment.
MFC after: 1 week
|
| #
dddb7e7f |
| 18-Feb-2017 |
Dmitry Chagin <[email protected]> |
Style(9), some XXX comments fix. No functional changes.
MFC after: 1 week
|
| #
fa580e65 |
| 18-Feb-2017 |
Dmitry Chagin <[email protected]> |
Initialize cap_rights before use.
MFC after: 1 week
|
| #
56fba8e6 |
| 18-Feb-2017 |
Dmitry Chagin <[email protected]> |
Finich r313684.
Convert linux_recv(), linux_send() and linux_accept() system call arguments to the register_t type too.
PR: 217161 MFC after: 3 days xMFC with: r313284,r313285,r313684
|
| #
abf20e93 |
| 12-Feb-2017 |
Dmitry Chagin <[email protected]> |
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 ar
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.
Reported by: Oleg V. Nauman MFC after: 1 week
show more ...
|
| #
d293f35c |
| 30-Jan-2017 |
Edward Tomasz Napierala <[email protected]> |
Add kern_listen(), kern_shutdown(), and kern_socket(), and use them instead of their sys_*() counterparts in various compats. The svr4 is left untouched, because there's no point.
Reviewed by: ed@,
Add kern_listen(), kern_shutdown(), and kern_socket(), and use them instead of their sys_*() counterparts in various compats. The svr4 is left untouched, because there's no point.
Reviewed by: ed@, kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9367
show more ...
|
| #
95653579 |
| 06-Jan-2017 |
Gleb Smirnoff <[email protected]> |
Use getsock_cap() instead of fgetsock().
Reviewed by: dchagin
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
85b0f9de |
| 22-Sep-2016 |
Mariusz Zaborski <[email protected]> |
capsicum: propagate rights on accept(2)
Descriptor returned by accept(2) should inherits capabilities rights from the listening socket.
PR: 201052 Reviewed by: emaste, jonathan Discussed with: man
capsicum: propagate rights on accept(2)
Descriptor returned by accept(2) should inherits capabilities rights from the listening socket.
PR: 201052 Reviewed by: emaste, jonathan Discussed with: many Differential Revision: https://reviews.freebsd.org/D7724
show more ...
|
| #
3a49978f |
| 26-Jun-2016 |
Dmitry Chagin <[email protected]> |
Fix a bug introduced in r283433.
[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.
[
Fix a bug introduced in r283433.
[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
show more ...
|
| #
df964aa4 |
| 22-May-2016 |
Dmitry Chagin <[email protected]> |
Convert proto family in both directions. The linux and native values for local and inet are identical, but for inet6 values differ.
PR: 155040 Reported by: Simon Walton MFC after: 2 week
|
| #
d56e689e |
| 22-May-2016 |
Dmitry Chagin <[email protected]> |
Add a missing errno translation for SO_ERROR optname.
PR: 135458 Reported by: Stefan Schmidt @ stadtbuch.de MFC after: 1 week
|
| #
02abd400 |
| 19-Apr-2016 |
Pedro F. Giffuni <[email protected]> |
kernel: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
|
| #
7c598200 |
| 27-Mar-2016 |
Dmitry Chagin <[email protected]> |
Revert r297310 as the SOL_XXX are equal to the IPPROTO_XX except SOL_SOCKET.
Pointed out by: ae@
|
| #
c826fcfe |
| 27-Mar-2016 |
Dmitry Chagin <[email protected]> |
iConvert Linux SOL_IPV6 level.
MFC after: 1 week
|