Commit Graph

82191 Commits

Author SHA1 Message Date
elad 9be7229906 expose less api; prompted by yamt@. 2006-07-16 19:37:55 +00:00
kardel e804524e26 fix another t{s,v}tohz() fallout (invalid remaining time)
now passes regression/sys/kern/sleeping
2006-07-16 19:23:11 +00:00
elad c6d34abf63 oops, forgot to commit that one. thanks Arnaud Lacombe. 2006-07-16 18:49:29 +00:00
cube b1b29cb4ae Remove that example. It was obsolete even before 3.0 release. 2006-07-16 10:52:22 +00:00
yamt 402cb9eb95 adapt to vfs_copyinfh -> vfs_copyinfh_alloc rename. 2006-07-16 07:52:02 +00:00
rillig f2634b6a2b Reordered the declaration-specifiers so that "inline" comes before
"int", which fixes a gcc warning.
2006-07-16 06:32:42 +00:00
rillig 07e31b3af5 When debugging output is disabled, define DPRINTF() to a proper
statement expression instead of the empty string. Fixes a gcc warning in
ibcs2_ioctl.c.
2006-07-16 06:31:42 +00:00
rillig b102417f76 Fixed the gcc warning that "static" should come before "const". 2006-07-16 06:06:20 +00:00
rillig e769ad7ca4 Added type information for the parameter r of isapnp_read_reg. 2006-07-16 06:01:03 +00:00
gdamore d5875505ba Remove unused memp. Fixes coverity CID 3713 from run 61. 2006-07-15 20:52:59 +00:00
elad 4f60437127 minor api cleanup, and remove useless VOP_GETATTR() calls. 2006-07-15 20:07:36 +00:00
elad a904c6895a update my email on the copyright to @netbsd.org 2006-07-15 16:48:51 +00:00
elad a890e27076 move veriexec_clear() from dev/verified_exec.c to kern/kern_verifiedexec.c 2006-07-15 16:43:35 +00:00
elad e3f6ad54bf dont use magic numbers. 2006-07-15 16:42:12 +00:00
elad 904a157292 some cleanup and fixes:
- fix possible panic and vfs refcnt issue
  - use log(9) instead of printf(9) where possible
  - indent
  - stop logging fsid/fileid
2006-07-15 16:33:16 +00:00
martin 631d071e84 FHANDLE_SIZE_MIN is an allowed value for the requested size (it happens
to be the old static size on 32bit archs, so the compat_30 code uses it)
2006-07-15 16:32:29 +00:00
tsutsui 970c192eba - configure PCI space for viaide so that DMA will work even if the firmware
doesn't map DMA registers properly
- enable viaide secondary port explicitly which isn't enabled by some firmware

Tested on RaQ and RaQ2.
2006-07-15 08:08:23 +00:00
elad c4afa933de add (commented out) fileassoc(9) kernel options on some popular archs. 2006-07-15 07:55:20 +00:00
skrll 96bba029ff KNF 2006-07-15 06:44:43 +00:00
yamt 96cfc7d98a remove unused code and add some comments. 2006-07-15 06:33:40 +00:00
yamt 73f44d02f7 do_setresuid, do_setresgid: use the suser privilege only when necessary. 2006-07-15 06:31:34 +00:00
yamt bfe8806772 kauth_cred_setgroups: fix an assertion. 2006-07-15 05:54:56 +00:00
yamt b0c4bb36d9 nfs_getreq: fix a kauth fallout.
pointed by nanashi-san.  http://pc8.2ch.net/test/read.cgi/unix/1145181361/786
2006-07-15 05:54:10 +00:00
kardel 7e5391a22a rename boottimebin to timebasebin as this
struct actually keeps the start of the UTC
time scale and not the boot time. the relationship
is: utc-time = up-time + timebase.
background: when doing an ACPI sleep the uptime
freezes and on wakeup the tc_setclock() leads to
a new timebasebin - this had no relationship with
a boottime as the structure was previously called.

discussed on tech-kern@
anomalies (moving boottime, uptime describing running time)
where discovered by Arnaud Lacombe.
2006-07-14 23:01:12 +00:00
kardel 97b1c42feb keep NetBSD boottime semantics:
- only set at boot
- only tracking delta of set-time operations
-> will keep boottime stable across ACPI sleeps
   uptime(1) will report the time since last boot
2006-07-14 22:44:28 +00:00
kardel 9a7410ffff reduce sleep time by slept time for retrys 2006-07-14 22:35:15 +00:00
kardel ac3f10a8d9 make inittimeleft() and gettimeleft() available (for e. g. kern_event.c) 2006-07-14 22:33:27 +00:00
martin b9dade0e59 netbsd32_sys___fhstat30 and netbsd32_sys___fhstatvfs have nothing to do
with compat_30 - so use full/variable sized filehandles here too.
Fixes PR kern/34004.
2006-07-14 22:09:01 +00:00
elad 1c8d298b89 move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@. 2006-07-14 21:55:19 +00:00
christos 29b80779c5 make this compile again. 2006-07-14 20:06:57 +00:00
elad b5d09ef065 okay, since there was no way to divide this to two commits, here it goes..
introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
2006-07-14 18:41:40 +00:00
yamt a1c2fd0906 introduce filehandle size limits:
- FHANDLE_SIZE_MAX: refuse unreasonable size allocation, esp. when
  it's a user-specified value.

- FHANDLE_SIZE_MIN: pad small filehandles with zero for compatibility.
  XXX it might be better to push this into filesystem dependent code so that
  new filesystems can choose smaller handles.
2006-07-14 18:30:35 +00:00
yamt cf80fa09d3 - sys___getfh30:
- restructure code so that it doesn't try to allocate user-specified
	  unbound amount of memory.
	- don't ignore copyout failure in the case of E2BIG.
- rename vfs_copyinfh to vfs_copyinfh_alloc for consistency.
2006-07-14 18:29:40 +00:00
gdamore e19a48dbd2 Cleanup old aucom entries. Left marked obsolete in majors, and removed from
dev/DEVNAMES.
2006-07-14 17:44:07 +00:00
yamt 3b9db50e99 oops, fix FHANDLE_SIZE. 2006-07-14 17:31:42 +00:00
gdamore 4c26da3f0e Add support for 10-bit addressing, per i2c specs. This has not been tested
with any actual 10-bit devices (as I don't have any), but it doesn't seem to
impact 7-bit addressing any.  Approved by christos@, briggs@, and thorpej@.
2006-07-14 17:25:17 +00:00
christos a2f707bc1b factor out common code. 2006-07-14 16:02:45 +00:00
yamt 2d1ef0388d - fix buffer overruns in fhopen and friends.
- share some code among them.
2006-07-14 15:59:29 +00:00
yamt 050993bda6 add some convenient macros for fhandle_t. 2006-07-14 15:58:40 +00:00
christos 199b3952c8 - rename sleepts to sleeptv since it is a timeval.
- don't initialize it needlessly.
- fix the poll code the same way the select code was fixed, so that it
  computes the remaining time to sleep properly.
2006-07-14 15:52:44 +00:00
yamt e221f55a3b sys___getfh30: fix a vnode lock botch in rev.1.244. 2006-07-14 14:28:58 +00:00
yamt 387e1097ba sys___getfh30: remove unnecessary casts. 2006-07-14 14:00:46 +00:00
seanb 13d47e9c25 Consistently establish / disestablish shutdown hook
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
2006-07-14 13:37:25 +00:00
xtraeme 911aafad9f Make this build again and fix the bus_space_tag_t member of the softc,
it's defined in the com_regs struct now.
2006-07-14 05:02:00 +00:00
pavel 7173632277 sys_getfh -> compot_30_sys_getfh 2006-07-13 23:52:55 +00:00
pavel 336e41ffa7 regen (sys_getfh -> compat_30_sys_getfh) 2006-07-13 23:48:08 +00:00
pavel 50a6eaa646 use the COMPAT_30 getfh. 2006-07-13 23:47:17 +00:00
pavel 20d6f5666c regen (sys_getfh -> compat_30_sys_getfh). 2006-07-13 23:45:54 +00:00
pavel 485f2e18be use the COMPAT_30 getfh. And do it always - don't protect it by
#if defined(NFS) || defined(NFSSERVER).
2006-07-13 23:44:34 +00:00
martin dee43775e6 Small simplification, pointed out by Christian Hattemer in private mail. 2006-07-13 23:43:13 +00:00