Commit Graph

153123 Commits

Author SHA1 Message Date
elad 783aeba060 Kill some KAUTH_GENERIC_ISSUSER. 2006-10-25 23:27:29 +00:00
elad f808f29d05 Kill KAUTH_GENERIC_ISSUSER use. 2006-10-25 22:56:14 +00:00
elad adf8d7aab2 Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket is
allowed. It takes three int * arguments indicating domain, type, and
protocol. Replace previous KAUTH_REQ_NETWORK_SOCKET_RAWSOCK with it (but
keep it still).

Places that used to explicitly check for privileged context now don't
need it anymore, so I replaced these with XXX comment indiacting it for
future reference.

Documented and updated examples as well.
2006-10-25 22:49:22 +00:00
reinoud dc5b5420b9 Revisit mnt_vnodelist TAILQ patch. Remove all suspicious TAILQ_FOREACH()
loops where vnodes can get removed or added during the loops. This could
lead to panic's on unmount since nodes are skipped or otherwise
TAILQ_NEXT(0xdeadbeef, ...) was dereferenced.
2006-10-25 22:01:54 +00:00
cbiere 9e6aff1165 Added missing whitespace in sysctl description string. PR kern/34915. 2006-10-25 20:55:11 +00:00
he af0b64f490 Bump SYMTAB_SPACE so that it fits again. 2006-10-25 20:46:48 +00:00
he b773aa1b24 Bump SYMTAB_SPACE so that it fits again.
Hm, this port doesn't error out the build if it doesn't...
2006-10-25 20:44:57 +00:00
uwe 87cd2874b2 G/c check() macro, b/c it's used only twice and the off < 0 test is
useless in the first case (off is 0), and causes error with new gcc
(comparison of unsigned expression < 0 is always false) in the
second.

While here fix a typo in a comment and use less indent to make BAD and
BADUNMAP definitions fit 80 columns.

XXX: The second check should probably be more elaborate to protect
against bogus/malicious COFF files.
2006-10-25 20:43:49 +00:00
elad 0a57b5966b Kill some KAUTH_GENERIC_ISSUSER uses. 2006-10-25 20:28:45 +00:00
dsl adb344c8f2 Rename Lst_Append() to Lst_InsertAfter() and Lst_Insert() to Lst_InsertBefore()
to better explain their actions.
2006-10-25 20:17:40 +00:00
bouyer c55d38dab6 Exclude wdc_sataprobe() when no SATA controllers are present. Fix
build of *_TINY kernels.
2006-10-25 20:14:00 +00:00
dsl 7ef877a8c0 Fix previous - need to add a lstPrev() 2006-10-25 20:05:59 +00:00
dsl 95938658de Replace 'a == b ? FALSE : TRUE' with 'a != b'
Add missing () in expansion.
2006-10-25 19:45:22 +00:00
dsl 0ce4eb1f8a Only do dynamic dependecy expansion once, and follow by a single filename
globbing.
The old behaviour was the perform variable expansion and globbing on the
output of both the variable expansion and globbing.  Which allows some very
strange behaviour if, for example, globbed filenames contain $ symbols.
Unconditionally add new nodes from these expansions even if the names are
already children.  The .WAIT code needs the order of children preserved.
2006-10-25 19:44:10 +00:00
bouyer fe6228aefa Regen: Add VIA VT8237A Integrated SATA Controller 2006-10-25 19:22:57 +00:00
bouyer 99697bfb44 Add VIA VT8237A Integrated SATA Controller, from FreeBSD. 2006-10-25 19:22:31 +00:00
christos e8926fa3f7 1. fix procfs_validfile{,_linux} to test for NULL pointers properly.
2. make "exe" entry be a symlink to the executable, instead of pointing
   directly to the vnode of the executable.
3. factor out commonly used code.
2006-10-25 18:59:52 +00:00
christos 5ce26ddf80 enable namecache enter reverse for linux procfs lookups.
XXX: how expensive is that?
2006-10-25 18:56:38 +00:00
christos 1b7ad03044 Defer the vnode test for directory until after the cache lookup. This makes
getcwd work with plain files too, if we allow plain files in the vnode->name
cache.
2006-10-25 18:55:49 +00:00
pooka f9b7e6e829 Only nuke directory entry in remove and clear data completely only
when the node is reclaimed.  This makes dtfs preserve unix open file
semantics.
2006-10-25 18:18:16 +00:00
pooka bda8cd7266 handle PUFFS_VN_INACTIVE 2006-10-25 18:15:50 +00:00
pooka 14d708398a pass VOP_INACTIVE() to userspace 2006-10-25 18:15:39 +00:00
elad f2ce4f0704 Kill some KAUTH_GENERIC_ISSUSER. 2006-10-25 18:11:22 +00:00
bouyer cb53a57e9c Map the SATA registers for SATA channels, and probe drives using them instead
of using the old PATA way. Tested with a PDC20375 (2xSATA + 1xPATA).
While there add the PDC20618-621 products (Ultra/133 controllers);
untested. Yes, it's strange to support PATA-only devices in a driver
called pdcsata, but that's how it is ...
2006-10-25 17:38:27 +00:00
bouyer 576987983a Use common wdc_sataprobe() where possible; explain why we can't in satalink.c 2006-10-25 17:34:49 +00:00
bouyer 80b1feec65 Add sata registers to struct wdc_regs. Add wdc_sataprobe(), a function
probing drives using the standard SATA registers; taken from various
PCI sata drivers. Export wdc_drvprobe() too.
2006-10-25 17:33:02 +00:00
jmmv 3ecc718811 Mark MULTIBOOT_SYMTAB_SPACE obsolete instead of silently removing it.
Per cube@'s suggestion.
2006-10-25 15:52:28 +00:00
jmmv ccf856e4f9 Remove references to the GRUB patch required to load NetBSD kernels.
Finally they can be booted by mainstream GRUB-Legacy versions -- those
included with any Linux distribution!
2006-10-25 14:02:11 +00:00
jmmv 13f9baab4e MULTIBOOT_SYMTAB_SPACE is gone because the kernel is now clever enough to
not need this hack.
2006-10-25 13:58:02 +00:00
jmmv 8d30a46449 Remove the usage of Multiboot's "a.out kludge" to tell the boot loader to
reserve some more space for the BSS section than the binary says.  This
trick was used to leave room after the kernel's image to copy the symbol
table following the format required by ksyms_init.  (It was also used to
workaround a bug in the physical address fields of the binary, but this has
been long fixed.)  Yes, the MULTIBOOT_SYMTAB_SPACE option goes away; yay!

Instead, copy the required data after the kernel in a way that avoids having
to reserve space and use the new ksyms_init_explicit function to avoid the
need to construct a minimal ELF image.

Fixes ksyms when using an "unpatched" GRUB (one that does not contain the
fix to honour the "a.out kludge" for ELF images, even when present) -- i.e.
ddb and lkms.  As a side effect, the new code is much clearer to read and
digest.

Closes PR port-i386/32865.
2006-10-25 13:56:15 +00:00
jmmv 133d7c5ba4 Add a function (ksyms_init_explicit) to add a symbol table when we know the
exact address of the symtab and strtab ELF sections contents beforehand.

This will be used in i386's Multiboot code to add the initial kernel ksyms
without having to prepare a minimal ELF image that matches the format
expected by the reguluar ksyms_init function.

This part was reviewed by cube@ and successfully passes a full i386 release
build.
2006-10-25 13:46:36 +00:00
elad 75939147ff Kill some KAUTH_GENERIC_ISSUSER. 2006-10-25 12:48:44 +00:00
pooka a72d8a71e5 If the control descriptor is closed, mark userspace dead and wakeup
all waiters *before* trying to get the syncer lock necessary for
dounmount().  This prevents a deadlock if the userspace server dies
while the syncer is running.
2006-10-25 12:04:14 +00:00
elad 59e67acd85 kauth_cred_geteuid() is okay for the purposes of these checks. Revert
conversion to kauth_authorize_generic() done some time ago.
2006-10-25 11:59:34 +00:00
mrg 66365a4f3c - note that __idle_u should go away but doing so breaks things
- fix several comments to reality
- clean up the #ifdef NO_VCACHE code slightly
- use call instead of set/jmpl
- remove a couple of unnecessary stores to curlwp
2006-10-25 11:56:56 +00:00
elad eae258eadf Use kauth(9) (device scope tty open). 2006-10-25 11:30:45 +00:00
skrll 2ec9405f64 Fix the code to deal with new gcc propagating const-ness from structs to
members. All fixups of the mcontext are done in the trapframe.
2006-10-25 11:06:02 +00:00
skrll da3d10d5b0 Whitespace fixes. 2006-10-25 07:07:48 +00:00
he 87a71ab54f Propagate const, prompted by new gcc. 2006-10-25 07:04:13 +00:00
mrg 712a3f3aae wrap a long line 2006-10-25 04:44:39 +00:00
thorpej 3c6ae35ab2 - Add a new disk ioctl (DIOCGDISKINFO) to get the disk-info dictionary
for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
  DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
  new disk_ioctl() function.
2006-10-25 04:04:45 +00:00
christos 12be2d1032 remove a bit of code and a label and explain why in a comment; no code size
change.
2006-10-24 23:41:01 +00:00
mlelstv 999ac788ac don't segfault on NULL pointer if number of rounds is
not specified in passwd.conf.
2006-10-24 22:49:19 +00:00
elad 2d8eaf9b86 Various cleanups.
Make some "#ifdef DIAGNOSTIC" blocks always compiled in; others
convert to KASSERT() where appropriate.

Add some sanity checks and comments while here.
2006-10-24 22:38:41 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
martin f559eee297 In the INTSTACK and KSTACK_VA special case treatment in pmap_exctract,
do not add the offset to the result - the calculated PA is the right
value - not the start of the page as in the other cases.
This fixes DMA to kernel stack, and avoids "fabricating a geometry"
warnings.
2006-10-24 21:11:58 +00:00
bjh21 695ea57fe2 parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:09:03 +00:00
drochner f0834e56c6 clean up the USB attachment stuff a bit: use a dedicated interface
attribute ("usbdevif") to attach USB devices, be it a plain device or
a hub, and remove some strangeness caused by the former usb/uhub mess
2006-10-24 21:03:30 +00:00
bjh21 84e47229be parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:03:13 +00:00
drochner 78c0d69e17 kill the "irq" llocator for pcmcia - this doesn't make sense because
irq mapping is done by the controller, and it is not used anywhere afaict
2006-10-24 20:54:10 +00:00