summaryrefslogtreecommitdiff
path: root/sys/dev/clockctl.c
AgeCommit message (Collapse)Author
2019-03-01Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as brieflypgoyette
discussed on irc. NFCI intended. Ride the earlier kernel bump - it;s getting crowded.
2019-01-27Merge the [pgoyette-compat] branchpgoyette
2016-11-21- Return ENOTTY rather than EINVAL for invalid ioctl, suggested byrin
mlelstv. - Protect NTP stuff in COMPAT_50 codes by NTP macro. Approved by mlelstv
2016-01-06Simplify and fix the unload to destroy the mutex. To reproduce, configurechristos
a kernel with LOCKDEBUG make clockctl a module: /etc/rc.d/ntpd stop modunload clockctl /etc/rc.d/ntpd start boom.
2015-12-07Modularize the clockctl pseudo-device and link to the build.pgoyette
2014-07-25Add d_discard to all struct cdevsw instances I could find.dholland
All have been set to "nodiscard"; some should get a real implementation.
2014-03-16Change (mostly mechanically) every cdevsw/bdevsw I can find to usedholland
designated initializers. I have not built every extant kernel so I have probably broken at least one build; however I've also found and fixed some wrong cdevsw/bdevsw entries so even if so I think we come out ahead.
2012-10-27split device_t/softc for all remaining drivers.chs
replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
2012-01-04When processing ioctl CLOCKCTL_NTP_ADJTIME, set the return value fromapb
ntp_timestatus instead of leaving it uninitialised, and don't use copyout(9) because args->retval is in kernel space, not user space. Previously, running ntpd(8) in unprivileged mode would call libc ntp_adjtime(), which would open /dev/clockctl and call ioctl(CLOCKCTL_NTP_ADJTIME), which would fail with EFAULT.
2009-10-03Move clockctl policy exception back to the subsystem.elad
2009-02-22- fix copyout size in CLOCKCTL_O?ADJTIME.nakayama
- add missing break in CLOCKCTL_NTP_ADJTIME.
2009-02-18simply the previous as suggested by enami:mrg
- don't check args->tp, just let copyin() fail.
2009-02-18clock_settime1() expects the struct timespec * to be in kernel space.mrg
make it so. fixes crashes seen on sparc64 systems with clockctl.
2009-01-11merge christos-time_tchristos
2007-11-25Refactor time modification checks and place them in the secmodel code.elad
okay christos@
2007-05-12Change interface to settimeofday1() so that it can also be used fromdsl
compat code in order to avoid the stackgap.
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-08-29fix incomplete initializerchristos
2006-06-07merge FreeBSD timecounters from branch simonb-timecounterskardel
- struct timeval time is gone time.tv_sec -> time_second - struct timeval mono_time is gone mono_time.tv_sec -> time_uptime - access to time via {get,}{micro,nano,bin}time() get* versions are fast but less precise - support NTP nanokernel implementation (NTP API 4) - further reading: Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-03-09Do not use SCARG() in userland. Eliminates need for <sys/systm.h>.christos
2005-12-11merge ktrace-lwp.christos
2005-12-05- make settime take timespec.christos
- avoid wrapping of time in settime. - pass struct proc down so that we can log a detailed message.
2005-02-27nuke trailing whitespaceperry
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
be inserted into ktrace records. The general change has been to replace "struct proc *" with "struct lwp *" in various function prototypes, pass the lwp through and use l_proc to get the process pointer when needed. Bump the kernel rev up to 1.6V
2003-02-10Fix clockctlattach to take an (ignored) int as its parameter, which isperry
what the rest of the pseudo-device attach infrastructure expects. It didn't cause any harm that the function signature was wrong because it ignored what it was passed.
2002-10-23merge kqueue branch into -currentjdolecek
kqueue provides a stateful and efficient event notification framework currently supported events include socket, file, directory, fifo, pipe, tty and device changes, and monitoring of processes and signals kqueue is supported by all writable filesystems in NetBSD tree (with exception of Coda) and all device drivers supporting poll(2) based on work done by Jonathan Lemon for FreeBSD initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-09-23Remove breaks after returns, unreachable returns and returns aftersimonb
returns(!).
2002-09-06Merge the gehenna-devsw branch into the trunk.gehenna
This merge changes the device switch tables from static array to dynamically generated by config(8). - All device switches is defined as a constant structure in device drivers. - The new grammer ``device-major'' is introduced to ``files''. device-major <prefix> char <num> [block <num>] [<rules>] - All device major numbers must be listed up in port dependent majors.<arch> by using this grammer. - Added the new naming convention. The name of the device switch must be <prefix>_[bc]devsw for auto-generation of device switch tables. - The backward compatibility of loading block/character device switch by LKM framework is broken. This is necessary to convert from block/character device major to device name in runtime and vice versa. - The restriction to assign device major by LKM is completely removed. We don't need to reserve LKM entries for dynamic loading of device switch. - In compile time, device major numbers list is packed into the kernel and the LKM framework will refer it to assign device major number dynamically.
2002-03-01Two more trivial bug fixes:manu
- copyin() the ntv argument to ntp_adjtime1(), to avoid some panics - correctly handle the return value And this still relates to kern/15519
2002-02-25Fixes a bug in argument passing to ntp_adjtime1. patch submitted bymanu
paul@Plectere.com (see kern/15519)
2001-12-09Changed clocktl interface to use syscallargs structuresmanu
2001-11-15don't need <sys/types.h> when including <sys/param.h>lukem
2001-11-13add RCSIDslukem
2001-09-16This is the clockctl pseudodevice. It gives non root users access to root-onlymanu
time-related system calls through ioctls. For instance, if user daemon is able to write to /dev/clockctl, then it is able to use the CLOCKCTL_SETTIMEOFDAY ioctl on it, which will be equivalent to a settimeofday. Approved by Christos