Revision tags: release/12.2.0 |
|
#
6fed89b1 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
kern: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
618a20d4 |
| 14-Apr-2020 |
Brooks Davis <brooks@FreeBSD.org> |
Remove bogus use of useracc() in (clock_)nanosleep.
There's no point in pre-checking that we can access the user's rmtp pointer before we do it in copyout().
While here, improve style(9) compliance
Remove bogus use of useracc() in (clock_)nanosleep.
There's no point in pre-checking that we can access the user's rmtp pointer before we do it in copyout().
While here, improve style(9) compliance.
Reviewed by: imp MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24409
show more ...
|
#
bc02c18c |
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
#
0783b709 |
| 04-Feb-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove unneeded assert for curproc. Simplify.
Reported by: syzkaller by markj Sponsored by: The FreeBSD Foundation
|
#
cbc10891 |
| 04-Feb-2020 |
Dmitry Chagin <dchagin@FreeBSD.org> |
For code reuse in Linuxulator rename get_proccess_cputime() and get_thread_cputime() and add prototypes for it to <sys/syscallsubr.h>.
As both functions become a public interface add process lock as
For code reuse in Linuxulator rename get_proccess_cputime() and get_thread_cputime() and add prototypes for it to <sys/syscallsubr.h>.
As both functions become a public interface add process lock assert to ensure that the process is not exiting under it.
Fix whitespace nit while here.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23340 MFC after 2 weeks
show more ...
|
#
59abbffa |
| 31-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357270 through r357349.
|
#
3ff65f71 |
| 30-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Remove duplicated empty lines from kern/*.c
No functional changes.
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
bc79b41c |
| 03-May-2019 |
Mark Johnston <markj@FreeBSD.org> |
Disallow excessively small times of day in clock_settime(2).
Reported by: syzkaller Reviewed by: cem, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://review
Disallow excessively small times of day in clock_settime(2).
Reported by: syzkaller Reviewed by: cem, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20151
show more ...
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
329f0aa9 |
| 12-Mar-2019 |
Warner Losh <imp@FreeBSD.org> |
Kill tz_minuteswest and tz_dsttime.
Research Unix, 7th Edition introduced TIMEZONE and DSTFLAG compile-time constants in sys/param.h to communicate these values for the machine. 4.2BSD moved from th
Kill tz_minuteswest and tz_dsttime.
Research Unix, 7th Edition introduced TIMEZONE and DSTFLAG compile-time constants in sys/param.h to communicate these values for the machine. 4.2BSD moved from the compile-time to run-time and introduced these variables and used for localtime() to return the right offset from UTC (sometimes referred to as GMT, for this purpose is the same). 4.4BSD migrated to using the tzdata code/database and these variables were basically unused.
FreeBSD removed the real need for these with adjkerntz in 1995. However, some RTC clocks continued to use these variables, though they were largely unused otherwise. Later, phk centeralized most of the uses in utc_offset, but left it using both tz_minuteswest and adjkerntz.
POSIX (IEEE Std 1003.1-2017) states in the gettimeofday specification "If tzp is not a null pointer, the behavior is unspecified" so there's no standards reason to retain it anymore. In fact, gettimeofday has been marked as obsolecent, meaning it could be removed from a future release of the standard. It is the only interface defined in POSIX that references these two values. All other references come from the tzdata database via tzset().
These were used to more faithfully implement early unix ABIs which have been removed from FreeBSD. NetBSD has completely eliminated these variables years ago. Linux has migrated to tzdata as well, though these variables technically still exist for compatibility with unspecified older programs.
So, there's no real reason to have them these days. They are a historical vestige that's no longer used in any meaningful way.
Reviewed By: jhb@, brooks@ Differential Revision: https://reviews.freebsd.org/D19550
show more ...
|
Revision tags: release/12.0.0 |
|
#
14b841d4 |
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
#
bbd7a929 |
| 04-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r336870 through r337285, and resolve conflicts.
|
#
6040822c |
| 30-Jul-2018 |
Alan Somers <asomers@FreeBSD.org> |
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 ...
|
#
7e8db781 |
| 22-Jun-2018 |
Colin Percival <cperciva@FreeBSD.org> |
Improve the accuracy of the POSIX "process CPU-time" clocks by adding the used portion of the current thread's time slice if the current thread belongs to the process being queried (i.e., if clock_ge
Improve the accuracy of the POSIX "process CPU-time" clocks by adding the used portion of the current thread's time slice if the current thread belongs to the process being queried (i.e., if clock_gettime is invoked with a clock ID of CLOCK_PROCESS_CPUTIME_ID or the value provided by passing getpid(2) to clock_getcpuclockid(3)).
The CLOCK_VIRTUAL and CLOCK_PROF timers already make this adjustment via long-standing code in calcru(), but since those timers are not specified by POSIX it seems useful to add it here so that the higher accuracy is available to code which aims to be portable.
PR: 228669 Reported by: Graham Percival Reviewed by: kib MFC after: 1 week
show more ...
|
Revision tags: release/11.2.0 |
|
#
70c144dc |
| 14-Feb-2018 |
Bryan Drewery <bdrewery@FreeBSD.org> |
nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR].
sbt is the time in the future that the tsleep_sbt() is expected to be completed at. sbtt is the current time. Depending on t
nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR].
sbt is the time in the future that the tsleep_sbt() is expected to be completed at. sbtt is the current time. Depending on the precision with sysctl kern.timecounter.alloweddeviation the start time may be incremented by tc_tick_sbt. The same increment is needed for the current time of sbtt before calculating the difference. The impact of missing this increment is that rmtp may increase by one tc_tick_sbt on every early [EINTR] return. If the same struct is passed in for rqtp as rmtp this can result in rqtp effectively incrementing by tc_tick_sbt and sleeping longer than originally intended.
This problem was introduced in r247797.
Reviewed by: kib, markj, vangyzen (all on an older version of the test) MFC after: 2 weeks Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14362
show more ...
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|
#
51369649 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
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.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
#
55b1c6e7 |
| 15-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325663 through r325841.
|
#
81d606f5 |
| 14-Nov-2017 |
Ed Maste <emaste@FreeBSD.org> |
disallow clock_settime too far in the future to avoid panic
clock_ts_to_ct has a KASSERT that the converted year fits into four digits. By default (sysctl debug.allow_insane_settime is 0) the kerne
disallow clock_settime too far in the future to avoid panic
clock_ts_to_ct has a KASSERT that the converted year fits into four digits. By default (sysctl debug.allow_insane_settime is 0) the kernel disallows a time too far in the future, using a value of 9999 366-day years. However, clock_settime is epoch-relative and the assertion will fail with a tv_sec corresponding to some 8030 years.
Avoid trying to be too clever, and just use a limit of 8000 365-day years past the epoch.
Submitted by: Heqing Yan <scottieyan@gmail.com> Reported by: Syzkaller (https://github.com/google/syzkaller) MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
3f8455b0 |
| 19-Mar-2017 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX. Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the FreeBSD behavior o
Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX. Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the FreeBSD behavior of updating rmtp only when interrupted by a signal. I believe this to be POSIX-compliant, since POSIX mentions the rmtp parameter only in the paragraph about EINTR. This is also what Linux does. (NetBSD updates rmtp unconditionally.)
Copy the whole nanosleep.2 man page from NetBSD because it is complete and closely resembles the POSIX description. Edit, polish, and reword it a bit, being sure to keep any relevant text from the FreeBSD page.
Reviewed by: kib, ngie, jilles MFC after: 3 weeks Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10020
show more ...
|
#
4cf66812 |
| 18-Mar-2017 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
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
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.
Reviewed by: jilles (via D10020), dchagin MFC after: 3 days Security: possibly Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10044
show more ...
|
#
9b3ece1c |
| 04-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r313243
|
#
2004ce3f |
| 24-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r312624 through r312719.
|
#
90a79ac5 |
| 24-Jan-2017 |
Conrad Meyer <cem@FreeBSD.org> |
Use time_t for intermediate values to avoid overflow in clock_ts_to_ct
Add additionally safety and overflow checks to clock_ts_to_ct and the BCD routines while we're here.
Perform a safety check in
Use time_t for intermediate values to avoid overflow in clock_ts_to_ct
Add additionally safety and overflow checks to clock_ts_to_ct and the BCD routines while we're here.
Perform a safety check in sys_clock_settime() first to avoid easy local root panic, without having to propagate an error value back through dozens of APIs currently lacking error returns.
PR: 211960, 214300 Submitted by: Justin McOmie <justin.mcomie at gmail.com>, kib@ Reported by: Tim Newsham <tim.newsham at nccgroup.trust> Reviewed by: kib@ Sponsored by: Dell EMC Isilon, FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9279
show more ...
|