History log of /netbsd/sys/compat/netbsd32/netbsd32_socket.c (Results 1 – 25 of 56)
Revision Date Author Comments
# 85bf8307 19-Jan-2021 simonb <simonb@NetBSD.org>

The read/write/send/recv system calls return ssize_t because -1 is
returned on error. Therefore we must restrict the lengths of any
buffers to NETBSD32_SSIZE_MAX with compat32 to avoid garbage retur

The read/write/send/recv system calls return ssize_t because -1 is
returned on error. Therefore we must restrict the lengths of any
buffers to NETBSD32_SSIZE_MAX with compat32 to avoid garbage return
values.

Fixes ATF lib/libc/sys/t_write:write_err.

show more ...


# 4e7ce818 19-Jan-2021 simonb <simonb@NetBSD.org>

KNF consistency: No parentheses are needed around the return value.


# 82c16600 18-Jan-2021 simonb <simonb@NetBSD.org>

s/u_intN_t/uintN_t/


# 8068b68d 28-Sep-2019 mlelstv <mlelstv@NetBSD.org>

signed/unsigned comparison.


# 671eaecd 27-Sep-2019 mlelstv <mlelstv@NetBSD.org>

Ensure failure if resid goes negative.


# a070e8dd 27-Sep-2019 mlelstv <mlelstv@NetBSD.org>

signed/unsigned mismatch.


# ca54082e 26-Sep-2019 christos <christos@NetBSD.org>

use size_t for counters (which are compared and set with unsigneds)


# d3e070b3 14-Nov-2018 hannken <hannken@NetBSD.org>

Apply the recent fixes to {send,recv}mmsg() to their compat variants.


# 5e68e104 12-Nov-2018 maxv <maxv@NetBSD.org>

Fix inverted logic, which leads to buffer overflow. Detected by kASan.


# d92e5812 13-May-2018 christos <christos@NetBSD.org>

PR/53280: Andreas Gustafsson: Fix panic in the fdpass test. This is probably
the only 32 bit binary in the tests...


# 6ea9b395 10-May-2018 christos <christos@NetBSD.org>

add {send,recv}mmsg


# 05ad0199 03-May-2018 christos <christos@NetBSD.org>

Fix COMPAT_NETBSD32 cmsg handling:

1. alignment was wrong for > 1 message
2. macros were doing incorrect pointer comparisons, fortunately ending
the iteration early after the fists cmsg instead o

Fix COMPAT_NETBSD32 cmsg handling:

1. alignment was wrong for > 1 message
2. macros were doing incorrect pointer comparisons, fortunately ending
the iteration early after the fists cmsg instead of crashing.
3. don't output 32 bit ktrace records for cmsg. 32 bit programs running
under emulation on 64 bit systems should produce 64 bit ktrace records
so that the native ktrace can handle the records; remove extra arguments
that are now not needed (the 32 bit msghdr).
4. output the correct type for cmsg trace records.
5. output all the cmsg records in traces instead of just the first one.

Welcome to 8.99.15 because of the argument removal.

XXX: Really all the code should be changed to use the CMSG_{FIRST,NXT}HDR
macros...

show more ...


# 19422264 13-Sep-2016 martin <martin@NetBSD.org>

Make the ktrace record written by do_sys_sendmsg/do_sys_recvmsg overridable
by the caller. Use this in compat_netbsd32 to log the 32bit version, so
the 32bit userland kdump is happy.


# ee1f2766 08-Sep-2016 martin <martin@NetBSD.org>

recvmsg: ktrace the 32bit message header, not the native (64bit) version.


# c0236f54 22-Jul-2015 maxv <maxv@NetBSD.org>

Memory leak, triggerable from an unprivileged user.


# 1c4b841c 18-Aug-2012 martin <martin@NetBSD.org>

Do not use a userland pointer, but the copied-in kernel version instead.
While there, reorder loop end condition for efficency.
Fixes net/fdpass tests on all archs with separate kernel/userland VA.


# ffa03a81 30-Jul-2012 matt <matt@NetBSD.org>

Make SCM_RIGHTS work correctly. (make sure to advance m if we've completely
dealt with, the next mbuf (if any) comes into play).


# c6039432 20-Jan-2012 joerg <joerg@NetBSD.org>

Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI

Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.

show more ...


# 0db1f69c 13-Jan-2012 joerg <joerg@NetBSD.org>

Reduce difference between recvfrom/recvmsg for netbsd32 and the native
version. This fixes the bug of lost file descriptors when the control
space is not large enough.


# d00df284 23-Apr-2010 rmind <rmind@NetBSD.org>

Replace M_IOV and some malloc(9)s with kmem(9), and while there:
- Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@.
Also, same fix in osf1_sys_sendmsg_xopen().
- Fix at

Replace M_IOV and some malloc(9)s with kmem(9), and while there:
- Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@.
Also, same fix in osf1_sys_sendmsg_xopen().
- Fix attempt to free non-allocated memory in error path in netbsd32___getfh30().
- Plug a memory leak in compat_43_netbsd32_orecvmsg().

show more ...


# 9e069687 22-Jul-2009 njoly <njoly@NetBSD.org>

Make compat netbsd32 sendmsg follow the native version by allowing
empty messages. This let unfdpass regression test work as expected.


# 21489570 15-Jun-2009 njoly <njoly@NetBSD.org>

Make netbsd32 sendmsg(2), do not use an uninitialised value for
fetching iovec structures.
While here, sync recvmsg(2) to avoid some unneeded casts.


# 9b87d582 17-Dec-2008 cegger <cegger@NetBSD.org>

kill MALLOC and FREE macros.


# a00bd89d 24-Jun-2008 ad <ad@NetBSD.org>

Replace references to getsock/getvnode.


# c2b95373 29-May-2008 mrg <mrg@NetBSD.org>

remove clause #3 from my license where there are no other
copyright holders involved.


123