Summary: | getrusage(2): getrusage fails to return EFAULT in 32-bit emulation | ||
---|---|---|---|
Product: | Base System | Reporter: | Alan Somers <asomers> |
Component: | kern | Assignee: | Alan Somers <asomers> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | Flags: | asomers:
mfc-stable11+
asomers: mfc-stable10+ |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Alan Somers
2018-07-29 17:01:05 UTC
A commit references this bug: Author: asomers Date: Sun Jul 29 18:22:26 UTC 2018 New revision: 336871 URL: https://svnweb.freebsd.org/changeset/base/336871 Log: 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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16500 Changes: head/sys/compat/freebsd32/freebsd32_misc.c A commit references this bug: Author: asomers Date: Sun Jul 29 19:20:13 UTC 2018 New revision: 336874 URL: https://svnweb.freebsd.org/changeset/base/336874 Log: freebsd32_getrusage(2): skip freebsd32_rusage_out on error PR: 230153 Reported by: kib MFC after: 2 weeks X-MFC-With: 336871 Differential Revision: https://reviews.freebsd.org/D16500 Changes: head/sys/compat/freebsd32/freebsd32_misc.c A commit references this bug: Author: asomers Date: Mon Oct 1 15:49:44 UTC 2018 New revision: 339052 URL: https://svnweb.freebsd.org/changeset/base/339052 Log: 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 Changes: _U stable/11/ stable/11/sys/compat/freebsd32/freebsd32_misc.c A commit references this bug: Author: asomers Date: Mon Oct 1 15:49:44 UTC 2018 New revision: 339052 URL: https://svnweb.freebsd.org/changeset/base/339052 Log: 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 Changes: _U stable/11/ stable/11/sys/compat/freebsd32/freebsd32_misc.c A commit references this bug: Author: asomers Date: Mon Oct 1 16:23:00 UTC 2018 New revision: 339065 URL: https://svnweb.freebsd.org/changeset/base/339065 Log: 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 Changes: _U stable/10/ stable/10/sys/compat/freebsd32/freebsd32_misc.c A commit references this bug: Author: asomers Date: Mon Oct 1 16:23:00 UTC 2018 New revision: 339065 URL: https://svnweb.freebsd.org/changeset/base/339065 Log: 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 Changes: _U stable/10/ stable/10/sys/compat/freebsd32/freebsd32_misc.c |