#
9d4a08d1 |
| 29-Mar-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
linux: use sa_family_t for address family conversions
Express "conversion failed" with maximum possible value. This allows to reduce number of size/signedness conversion in the code that utilizes t
linux: use sa_family_t for address family conversions
Express "conversion failed" with maximum possible value. This allows to reduce number of size/signedness conversion in the code that utilizes the functions.
PR: 274536 Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D44375
show more ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0 |
|
#
5c32488d |
| 04-Mar-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Add a counterpart to linux_ifflags
For further use in linux_ioctl_socket add bsd_to_linux_ifflags() which accepts FreeBSD interface flags and translate it to Linux if flags.
Reviewed by:
linux(4): Add a counterpart to linux_ifflags
For further use in linux_ioctl_socket add bsd_to_linux_ifflags() which accepts FreeBSD interface flags and translate it to Linux if flags.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D38873
show more ...
|
#
f9b0675b |
| 04-Mar-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Refactor socket ioctl path to avoid referencing an unstable interfaces
Split the linux_ioctl_socket() function on two counterparts, where the linux_ioctl_socket_ifreq() intended to use in
linux(4): Refactor socket ioctl path to avoid referencing an unstable interfaces
Split the linux_ioctl_socket() function on two counterparts, where the linux_ioctl_socket_ifreq() intended to use in a code path which requires the struct ifreq manipulation, i.e., translating in/out values of the struct, while the linux_ioctl_socket() function is left as is, it calls sys_ioctl() without touching in/out values.
Due to structures ifreq, sockaddr difference between FreeBSD and Linux the linux_ioctl_socket_ifreq() calls kern_ioctl() directly, converting in and out values to FreeBSD and to Linux accordingly.
Finally, modify the ifname_linux_to_bsd() to return error code, not an unstable reference to the interface.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D38794
show more ...
|
#
5d5b633d |
| 04-Mar-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linsysfs(4): Refactor to avoid referencing an unstable interfaces
Enter the net epoch when traversing a list of interfaces. For that split the ifname_linux_to_bsd() function on two counterparts, whe
linsysfs(4): Refactor to avoid referencing an unstable interfaces
Enter the net epoch when traversing a list of interfaces. For that split the ifname_linux_to_bsd() function on two counterparts, where the ifname_linux_to_ifp() intended to use in epoch, while the ifname_linux_to_bsd() intended to be a self-contained. Until the linux_ioctl_coket() function is refactored, the ifname_linux_to_bsd() temporarily returns interface outside of the net epoch.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D38790
show more ...
|
#
130383f2 |
| 04-Mar-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Make linux_ifflags return a value
To simplify the use of the function in the printf-like statements.
Differential Revision: https://reviews.freebsd.org/D38830
|
#
3ab3c9c2 |
| 23-Feb-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Consolidate a FreeBSD interface names translation code
We have some amount of interface names translation functions which are differs by bugs implementation. Consolidates it in a one place
linux(4): Consolidate a FreeBSD interface names translation code
We have some amount of interface names translation functions which are differs by bugs implementation. Consolidates it in a one place.
Fixup loopback interface names translation and use ifnet methods and accessors, where possible.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D38714 MFC after: 3 days X-MFC with: 32fdc75fe7
show more ...
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
09d60bfa |
| 31-Mar-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Cleanup empty lines.
MFC after: 2 weeks
|
Revision tags: release/12.3.0 |
|
#
1ca6b15b |
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Drop "All rights reserved" from my copyright statements.
Add email and fixup years while here.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30912 MFC after: 2 weeks
|
#
26795a03 |
| 22-Jun-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Rework Linux ppoll system call.
For now the Linux emulation layer uses in kernel ppoll(2) without conversion of user supplied fd 'events', and does not convert the kernel supplied fd 'reve
linux(4): Rework Linux ppoll system call.
For now the Linux emulation layer uses in kernel ppoll(2) without conversion of user supplied fd 'events', and does not convert the kernel supplied fd 'revents'.
At least POLLRDHUP is handled by FreeBSD differently than by Linux. Seems that Linux silencly ignores POLLRDHUP on non socket fd's unlike FreeBSD, which does more strictly check and fails.
Rework the Linux ppoll, using kern_poll and converting 'events' and 'revents' values. While here, move poll events defines to the MI part of code as they mostly identical on all arches except arm.
Differential Revision: https://reviews.freebsd.org/D30716 MFC after: 2 weeks
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
d5368bf3 |
| 13-May-2019 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions alter the userspace sockaddr to convert the format between linux and BSD versions. That's the minimum 3 of copyin/copyout operations
Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions alter the userspace sockaddr to convert the format between linux and BSD versions. That's the minimum 3 of copyin/copyout operations for one syscall.
Also some syscall uses linux_sa_put() and linux_getsockaddr() when load sockaddr to userspace or from userspace accordingly.
To avoid this chaos, especially converting sockaddr in the userspace, rewrite these 4 functions to convert sockaddr only in kernel and leave only 2 of this functions.
Also in order to reduce duplication between MD parts of the Linuxulator put struct sockaddr conversion functions that are MI out into linux_common module.
PR: 232920 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20157
show more ...
|
#
d151344d |
| 03-May-2019 |
Dmitry Chagin <dchagin@FreeBSD.org> |
In order to reduce duplication between MD parts of the Linuxulator move bits that are MI out into the headers in compat/linux. For that remove bogus _packed attribute from struct l_sockaddr and use M
In order to reduce duplication between MD parts of the Linuxulator move bits that are MI out into the headers in compat/linux. For that remove bogus _packed attribute from struct l_sockaddr and use MI types for struct members.
And continue to move into the linux_common module a code that is intended for both Linuxulator modules (both instruction set - 32 & 64 bit) or for external modules like linsysfs or linprocfs.
To avoid header pollution introduce new sys/compat/linux_common.h header.
Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20137
show more ...
|