History log of /freebsd-10-stable/sys/compat/freebsd32/freebsd32_misc.c
Revision Date Author Comments
# 339065 01-Oct-2018 asomers

MFC r336871, r336874

r336871:
getrusage(2): fix return value under 32-bit emulation

According to the man page, getrusage(2) should return EFAULT if the rusage
argument lies outside of the process's address space. But due to an
oversight in r100384, that's never been the case during 32-bit emulation.
Fix it.

PR: 230153
Reported by: tests(7)
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D16500

r336874:
freebsd32_getrusage(2): skip freebsd32_rusage_out on error

PR: 230153
Reported by: kib
X-MFC-With: 336871
Differential Revision: https://reviews.freebsd.org/D16500


# 325867 15-Nov-2017 gordon

MFC r325865

Properly bzero kldstat structure to prevent kernel information leak.

Security: FreeBSD-SA-17:10.kldstat
Security: CVE-2017-1088


# 318323 15-May-2017 brooks

MFC r317845-r317846

r317845:
Provide a freebsd32 implementation of sigqueue()

The previous misuse of sys_sigqueue() was sending random register or
stack garbage to 64-bit targets. The freebsd32 implementation preserves
the sival_int member of value when signaling a 64-bit process.

Document the mixed ABI implementation of union sigval and the
incompability of sival_ptr with pointer integrity schemes.

Reviewed by: kib, wblock
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10605

r317846:
Regen post r317845.

MFC with: r317845
Sponsored by: DARPA, AFRL


# 315658 21-Mar-2017 vangyzen

MFC r315510

nanosleep: plug a kernel memory disclosure

nanosleep() updates rmtp on EINVAL. In that case, kern_nanosleep()
has not updated rmt, so sys_nanosleep() updates the user-space rmtp
by copying garbage from its stack frame. This is not only a kernel
memory disclosure, it's also not POSIX-compliant. Fix it to update
rmtp only on EINTR.

Security: possibly
Sponsored by: Dell EMC


# 313794 16-Feb-2017 kib

MFC r313692:
Style: wrap long line.


# 311959 12-Jan-2017 kib

MFC r311447:
Some style fixes for getfstat(2)-related code.


# 293474 09-Jan-2016 dchagin

MFC r277610 (by jillies):

Add futimens and utimensat system calls.


# 283359 24-May-2015 kib

MFC r282708:
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.


# 280258 19-Mar-2015 rwatson

Merge r263233 from HEAD to stable/10:

Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.

Sponsored by: Google, Inc.


# 277698 25-Jan-2015 kib

MFC r277322:
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.


# 277525 22-Jan-2015 kib

MFC r277211:
fcntl F_O{GET,SET}LK take pointer as the arg, handle them properly for
compat32.


# 276686 05-Jan-2015 kib

Merge reaper facility.

MFC r270443 (by mjg):
Properly reparent traced processes when the tracer dies.

MFC r273452 (by mjg):
Plug unnecessary PRS_NEW check in kern_procctl.

MFC 275800:
Add a facility for non-init process to declare itself the reaper of
the orphaned descendants.

MFC r275821:
Add missed break.

MFC r275846 (by mckusick):
Add some additional clarification and fix a few gammer nits.

MFC r275847 (by bdrewery):
Bump Dd for r275846.


# 275986 21-Dec-2014 dchagin

MFC r274462: Add the ppoll() system call.


# 274648 18-Nov-2014 kib

Merge the fueword(9) and casueword(9). In particular,

MFC r273783:
Add fueword(9) and casueword(9) functions.
MFC note: ia64 is handled like arm, with NO_FUEWORD define.

MFC r273784:
Replace some calls to fuword() by fueword() with proper error checking.

MFC r273785:
Convert kern_umtx.c to use fueword() and casueword().
MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not
converted, they are removed from HEAD, and not used. The do_sem2*()
family is not yet merged to stable/10, corresponding chunk will be
merged after do_sem2* are committed.

MFC r273788 (by jkim):
Actually install casuword(9) to fix build.

MFC r273911:
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).


# 272246 28-Sep-2014 kib

MFC r272132:
Fix fcntl(2) compat32 after r270691.

Approved by: re (glebius)


# 271010 03-Sep-2014 kib

MFC r270691:
Fix handling of the third argument for fcntl(2). The native syscall
uses long for arg, which needs translation.


# 269455 03-Aug-2014 marcel

MFC 264164: Convert while copying in control messages.

Obtained from: Juniper Networks, Inc.


# 263770 26-Mar-2014 kib

MFC r263349:
Make the array pointed to by AT_PAGESIZES auxv properly aligned.


# 261560 06-Feb-2014 kib

MFC r261080:
The posix_fallocate(2) syscall should return error number on error,
without modifying errno.

MFC r261290:
The posix_madvise(3) and posix_fadvise(2) should return error on
failure, same as posix_fallocate(2).


# 258929 04-Dec-2013 peter

MFC: r258718: fix emulated jail_v0 byte order

Approved by: re (gjb)


# 283359 24-May-2015 kib

MFC r282708:
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.


# 280258 19-Mar-2015 rwatson

Merge r263233 from HEAD to stable/10:

Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.

Sponsored by: Google, Inc.


# 277698 25-Jan-2015 kib

MFC r277322:
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.


# 277525 22-Jan-2015 kib

MFC r277211:
fcntl F_O{GET,SET}LK take pointer as the arg, handle them properly for
compat32.


# 276686 05-Jan-2015 kib

Merge reaper facility.

MFC r270443 (by mjg):
Properly reparent traced processes when the tracer dies.

MFC r273452 (by mjg):
Plug unnecessary PRS_NEW check in kern_procctl.

MFC 275800:
Add a facility for non-init process to declare itself the reaper of
the orphaned descendants.

MFC r275821:
Add missed break.

MFC r275846 (by mckusick):
Add some additional clarification and fix a few gammer nits.

MFC r275847 (by bdrewery):
Bump Dd for r275846.


# 275986 21-Dec-2014 dchagin

MFC r274462: Add the ppoll() system call.


# 274648 18-Nov-2014 kib

Merge the fueword(9) and casueword(9). In particular,

MFC r273783:
Add fueword(9) and casueword(9) functions.
MFC note: ia64 is handled like arm, with NO_FUEWORD define.

MFC r273784:
Replace some calls to fuword() by fueword() with proper error checking.

MFC r273785:
Convert kern_umtx.c to use fueword() and casueword().
MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not
converted, they are removed from HEAD, and not used. The do_sem2*()
family is not yet merged to stable/10, corresponding chunk will be
merged after do_sem2* are committed.

MFC r273788 (by jkim):
Actually install casuword(9) to fix build.

MFC r273911:
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).


# 272246 28-Sep-2014 kib

MFC r272132:
Fix fcntl(2) compat32 after r270691.

Approved by: re (glebius)


# 271010 03-Sep-2014 kib

MFC r270691:
Fix handling of the third argument for fcntl(2). The native syscall
uses long for arg, which needs translation.


# 269455 03-Aug-2014 marcel

MFC 264164: Convert while copying in control messages.

Obtained from: Juniper Networks, Inc.


# 263770 26-Mar-2014 kib

MFC r263349:
Make the array pointed to by AT_PAGESIZES auxv properly aligned.


# 261560 06-Feb-2014 kib

MFC r261080:
The posix_fallocate(2) syscall should return error number on error,
without modifying errno.

MFC r261290:
The posix_madvise(3) and posix_fadvise(2) should return error on
failure, same as posix_fallocate(2).


# 258929 04-Dec-2013 peter

MFC: r258718: fix emulated jail_v0 byte order

Approved by: re (gjb)