Commit Graph

84618 Commits

Author SHA1 Message Date
mrg
4804ddb2d7 what was <crypto/sha2/sha2.h> and <crypto/ripemd160/rmd160.h> is now
<sys/sha2.h> and <sys/rmd160.h>.
2006-10-27 22:50:28 +00:00
elad
145a8382e1 Don't leak handle. 2006-10-27 22:17:09 +00:00
uwe
b05d0f4d20 Define __used as __unused for gcc's that don't grok __attribute__((__used__))
Those older versions of gcc don't eliminate unused functions/vars
anyway, so it's enough just to suppress the warning.
2006-10-27 22:10:56 +00:00
christos
e1ae6bce13 - don't allocate huge arrays on the stack
- no bogus ; after }; in block statements!
2006-10-27 21:58:59 +00:00
christos
31a62606ea Merge kernel and userland rmd160 and sha2 implementation.
XXX: We still install rmd160.h and sha2.h in /usr/include/crypto, unlike
the other hash functions which get installed in /usr/include for compatibility.
2006-10-27 21:20:48 +00:00
garbled
3dc1c33272 Add the crypto swcrypto and veriexec psuedo devices. Also add FILEASSOC
and VERIEXEC, following elad's lead.
2006-10-27 20:37:17 +00:00
elad
52bab3d8ab Don't allocate MAXPATHLEN on the stack.
Prompted by and initial diff okay yamt@
2006-10-27 20:16:10 +00:00
christos
7dae219b5b add syslog_ss, vsyslog_ss. 2006-10-27 20:01:33 +00:00
pooka
eb6da7fc35 fix checkalias true branch: don't unlock or lock twice 2006-10-27 19:54:34 +00:00
garbled
e5bff3e418 A few changes so pnpbus devices can do isadma. Note that isadma still
does not seem to work properly on prep.
2006-10-27 19:52:51 +00:00
garbled
8685914d8f Change an instance of curaddr to PHYS_TO_BUS_MEM(t, curaddr) in
_bus_dmamap_load_buffer, otherwise when attempting to DMA a buffer larger
than PAGE_SIZE on an arch where PHYS != BUS it will allways fail.
2006-10-27 19:36:15 +00:00
pooka
0035113cf8 Use spec_fsync for specops vop_fsync: it knows about vflushbuf(), which
is more than what puffs currently knows.  makes e.g. ffs unmount for a
puffs-based device node work.
2006-10-27 19:01:48 +00:00
dogcow
6cb622186f Sync up with rtk 'common macro' changes. 2006-10-27 18:47:07 +00:00
perry
360359b671 fix a bit of trailing whitespace, and do the space tab dance for a
couple of options so that they work well when commented out
2006-10-27 17:37:44 +00:00
christos
26bb1685bd don't allocate large buffers on the stack. 2006-10-27 16:49:01 +00:00
christos
78a48d28a3 Use strncpy to copy out interface names so that the trailing part of the
buffer is zeroed, and check for overflow.
2006-10-27 15:33:11 +00:00
yamt
b89279d039 revert malloc -> kmem_alloc part of uvm_swap.c rev.1.110 because
the current implementation of kmem_free can sleep.
2006-10-27 15:06:04 +00:00
yamt
17685f3fdc vmem: use correct function names for ASSERT_SLEEPABLE. 2006-10-27 15:05:16 +00:00
tsutsui
dee13e6f7d Remove redundant byteswap ops. 2006-10-27 13:26:34 +00:00
pooka
30a851c1d1 support fifos 2006-10-27 12:25:16 +00:00
tsutsui
5ee73a035c Use common macro rather than local one. 2006-10-27 09:57:26 +00:00
bouyer
f91ce46f20 Add SATA native registers support for VIA SATA controllers, so that
drives are probed using the SATA way (from FreeBSD). While here add the
VT8237A SATA Controller to the tables, should fix PR kern/34927.

Thanks to the César Catrián Carreño and paul (at) whooppee.com for
tests.
2006-10-27 08:22:31 +00:00
macallan
4022a1c7d3 fix a typo in chipsfb_bitblt() 2006-10-27 06:14:17 +00:00
elad
0c57382297 oops - passing wrong integer. 2006-10-27 00:11:44 +00:00
uwe
523122cd3e Nuke GPROF cargo-cult I've been cut-n-pasting around in my drivers. 2006-10-27 00:08:32 +00:00
uwe
2909b42808 Fix __mcount to use bsrf to call _mcount. We know it's in the same
module (in the same file even), so we know the offset at link time and
don't need a reloc.  This kills the last text relocation in the sh3
libc.so.

While here, tweak the code slightly to put delay slots into use.
2006-10-26 23:54:28 +00:00
simonb
c7f58e7f3e Make mcount static.
Same problem as described in port-alpha/10582 by ITOH Yasufumi.
pc532 problem pointed out by Valeriy Ushakov.
2006-10-26 23:53:27 +00:00
bjh21
ed5db5831e boot_file is not used by generic NetBSD/arm code, and its type varies by
MACHINE.  Thus, move it out of <arm/bootconfig.h> and put it into
<machine/bootconfig.h> on those MACHINEs (cats, hpcarm, and shark) where
it's used outside the file in which it's defined.
2006-10-26 23:31:47 +00:00
bjh21
be9c217769 Regen (__KERNEL_RCSID()). 2006-10-26 23:21:23 +00:00
bjh21
8eda8c47a7 Emit __KERNEL_RCSID() into videomodes.c so that kernels using it can be
more easily identified.
2006-10-26 23:19:50 +00:00
pooka
0f94cb76f7 support specfs 2006-10-26 22:52:47 +00:00
bjh21
3191d2a481 Change the type of initarm() on OFW-based ARM systems to match other non-hpcarm
ports.  This seems sensible since all of them call it from the same locore.S.
This makes NetBSD/shark GENERIC compile.
2006-10-26 22:49:36 +00:00
bjh21
b09fd5bdb5 No need for two __KERNEL_RCSIDs. 2006-10-26 22:42:00 +00:00
uwe
5704a46a71 uvm_page_printall: With new PQ_* flags pg->pqflags no longer fits and
makes the output of "show all pages" ragged.  Widen the field to 4 chars.
2006-10-26 20:00:52 +00:00
joerg
8f704ed76b Revert last change. The DWL122C1 is *not* an ural device. 2006-10-26 17:29:03 +00:00
elad
74482de29f Kill a couple of KAUTH_GENERIC_ISSUSER usages.
I had to refactor the code a bit, I hope it's okay.
2006-10-26 15:11:22 +00:00
thorpej
f815ec900f Back out previous -- it is used in userland right now. 2006-10-26 13:54:46 +00:00
pooka
93c897b7ab Fix operations creating new nodes to honor the vnode locking protocol
if the userspace server returns an error.  Fixes lockups if any
of the following operations failed: create, mknod, mkdir, symlink
2006-10-26 13:42:21 +00:00
pooka
f15702aabc debug print fixes 2006-10-26 13:35:23 +00:00
elad
d70e6d1b25 Compile in Veriexec by default on some popular archs (amd64, i386, sparc64)
so it's more accessible and less of a hassle to put to use. Also enable
fileassoc(9) by default as a result, which for itself may open the door for
a lot of cool stuff. (stay tuned. :)

I recommend port masters of other archs to consider doing the same.
Personally I don't know which ports are considered more of a legacy than
in-production, so I'm leaving it for someone else for now...

No objections on tech-kern.
2006-10-26 11:48:38 +00:00
thorpej
ca1f5646f1 Garbage-collect the disk_geom structure. 2006-10-26 05:23:44 +00:00
thorpej
03e8889986 Insert a .WAIT between "depend" and "all" in the "dependall" target, so
that "make -j4 dependall" has the intended effect.
2006-10-26 05:10:55 +00:00
thorpej
1342c5a275 Use prop_dictionary_set_int32() to set the error number. 2006-10-26 05:08:01 +00:00
thorpej
f0c0486c7b Use the new prop_dictionary_util functions. 2006-10-26 05:04:18 +00:00
christos
6802f42727 Add reentrant bits from OpenBSD 2006-10-26 03:06:55 +00:00
macallan
4c4d8037a9 Take into accout that SCSI controllers may attach to other things than
pci or sbus, like esp at dma.
So now my U1 can find its boot device again.
2006-10-26 00:19:44 +00:00
elad
a498da2060 Kill KAUTH_GENERIC_ISSUSER. 2006-10-25 23:44:42 +00:00
elad
47dc01744a Kill some KAUTH_GENERIC_ISSUSER. 2006-10-25 23:40:57 +00:00
elad
6fac6c463b Kill KAUTH_GENERIC_ISSUSER use. 2006-10-25 23:30:35 +00:00
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
elad
0a57b5966b Kill some KAUTH_GENERIC_ISSUSER uses. 2006-10-25 20:28:45 +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
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
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
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
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
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
bjh21
65d685fe36 Use <arm/bootconfig.h>. 2006-10-24 20:39:13 +00:00
bjh21
b4dff5b189 ANSIfy, KNF, remove unnecessary includes. 2006-10-24 20:25:52 +00:00
drochner
21440e4fda minor fix to error handling (from OpenBSD, rev.1.40):
only set devvp->v_specmountpoint on successful mounts
2006-10-24 19:59:52 +00:00
drochner
bffbce1754 import a fix from FreeBSD (rev.1.185):
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count.  This will force the update of
the parent directory's actual link to actually be scheduled.  Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely.  ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
[plus description about problems woth background fsck solved
by this; irrelevant to NetBSD]

For me, the good effect is at least that I'm getting less filesystem
inconsistencies after a crash.

Approved by christos quite a while ago.
2006-10-24 19:36:26 +00:00
drochner
747abe99e5 add zero initializers to make that compile again 2006-10-24 19:16:50 +00:00
he
9ed827d944 The new gcc propagates const-ness from structs to members, so
make local variable const as well.  Avoid writing to the now-const
variable, instead do the masking before in the trapframe register
assignment.

OK'ed by thorpej and nathanw.
2006-10-24 16:53:01 +00:00
oster
7f33898207 Fix a logic bug in the bootblock code.
OK'ed by christos@
2006-10-24 15:56:55 +00:00
itohy
fc1ed5259e 3c575CT Ethernet card requires a little more time during reset
and after reset, or the card won't be detected on some machines.
Change the time from 40ms to 50ms.

XXX The card doesn't work correctly yet.
2006-10-24 14:16:39 +00:00
elad
d1b4b1326c oops, fix license. (hah!) 2006-10-24 11:53:12 +00:00
tsutsui
49466e5a5e Set RTK_RDESC_CMD_OWN in rtk_cmdstat of RX DMA descriptor after
all other descriptor data is written to avoid possible race condition.
2006-10-24 11:17:49 +00:00
hannken
8ea60a7f23 Remove specificdata_setspecific_nowait() as result of discussion on tech-kern.
Add _lwp_getspecific_by_lwp() to get lwp specific data from other lwp's.
Protected by #ifdef _LWP_API_PRIVATE.

Approved by: Jason Thorpe <thorpej@netbsd.org>
2006-10-24 10:05:45 +00:00
mrg
43ce2a503f avoid shadowing "delay" 2006-10-24 02:48:04 +00:00
mrg
4b539e3eec move a label such that it is only visible in the scopes it is used in. 2006-10-24 02:47:40 +00:00
uwe
07dcd59f52 __pmap_kpte_lookup: verify that ptp is not NULL. 2006-10-24 01:56:33 +00:00
pooka
4f1cd3b286 Apply a little eggwash to a deadlock condition where calling
getnewvnode() while holding on to any vnode lock deadlocks the
system if the file system is being forcibly unmounted.

Normal file systems don't trigger this problem because of two reaons:
1) they don't hold on to vnode locks while idling who-knows-where, so
   the race doesn't trigger
2) they aren't usually unmounted with FORCE; puffs is, in case "someone"
   manages to make a crashy userspace server

Nevertheless, a real solution is slowly being braised.
2006-10-23 23:32:57 +00:00
skrll
e90404b342 - mbus_dmamap_create: remove a redundant local.
- mbus_dmamap_sync: restructure/simplify code and add our our version of
  sync_caches that does sync; syncdma; sync. This is now smaller as a
  result.
2006-10-23 21:58:52 +00:00
christos
d0545a9b43 nuke $DBG, since it contains -O2; suggested by uwe. 2006-10-23 21:57:46 +00:00
skrll
bce47ca120 Remove chooselwp - it doesn't exist. 2006-10-23 21:39:18 +00:00
christos
3380fe7daf shrink further. 2006-10-23 21:36:47 +00:00
uwe
d8092bae40 Kill get_ascii and its alternative format, it's not very useful. We'd
better use it for something else later.  I'm also thinking of g/c'ing
the temp buffer and emit disassembly with db_printf direcly, and
get_ascii gets in the way.
2006-10-23 21:13:00 +00:00
peter
4c87aba921 Enable MI todr(9) and timecounter on hpcarm. 2006-10-23 21:12:42 +00:00
he
8a7e351ffd Constify, since the new gcc propagates constness to struct members. 2006-10-23 19:49:47 +00:00
uwe
9287c88e77 Const-poision. While here, rename the argument s/code/pc/. 2006-10-23 19:28:07 +00:00
he
8d51656fd4 Const-ness is now (by the new gcc) propagated from structs to
members, so constify so as to not lose qualification.
2006-10-23 18:58:24 +00:00
uwe
351eae3599 Be careful when fetching instruction to disassemble. Check for
unalinged address, refuse to disassemble P4 area (on-chip i/o regs),
use fusword/kcopy to fetch the instruction.
2006-10-23 18:33:56 +00:00
elad
af94ee3081 PR/34888: Nicolas Joly: kernel panic while trying to access
/emul/linux/proc/0/stat

Patch applied, thanks for the report!
2006-10-23 18:19:14 +00:00
gson
3b3814b873 const correctness 2006-10-23 18:10:44 +00:00
uwe
a34468ef57 fu* function should read bytes/shorts as unsigned, so s/exts/extu/ 2006-10-23 16:28:51 +00:00
pooka
6ea08fd809 bump the reqstruct minsize to something more believable (but I should
really fix this, still)
2006-10-23 16:07:18 +00:00
yamt
3342bd892a cpu_dumpconf: oops, redo the previous correctly. 2006-10-23 15:15:52 +00:00
yamt
7eadca1ca8 fix parenthesis mismatch in 1.197. (hi mrg) 2006-10-23 15:08:20 +00:00
skrll
21f8bf16fc KNF and comment update. 2006-10-23 14:15:09 +00:00
yamt
5239dc5a67 qc_init: fix a problem introduced by rev.1.13.
namely, use quantum-size alignment rather than no alignment.
PR/34879 from Peter Postma.
2006-10-23 13:36:33 +00:00
pooka
e4ae558e9d fix print in VOP_PRINT
also make it compile on amd64.  problem noticed by Blair Sadewitz
on current-users
2006-10-23 12:21:39 +00:00
pooka
9739aee84d apply const where necessary 2006-10-23 12:11:47 +00:00
elad
c2da5d160e PR/34873: Ryo Shimizu: sendmsg() can cause kernel panic
Patch applied, thanks!
2006-10-23 10:37:22 +00:00
kiyohara
6920dbe4f2 Define BASE_ISA macro for ISA window base address (where pckbc, com, lpt live)
instead of hardcoding the constant or (even before) using BASE_COM.
2006-10-23 06:49:17 +00:00
rjs
4b90889ec6 Regen. 2006-10-23 00:21:27 +00:00
rjs
e3925c8d0b Add Motorola MPC5200B host bridge. 2006-10-23 00:20:06 +00:00
pooka
17015342cb * add MOUNT_PUFFS
* add macro VFS_PROTOS(fsname), which generates file system vfs prototypes
2006-10-22 22:50:10 +00:00
pooka
7ad65999e3 add VT_PUFFS 2006-10-22 22:49:38 +00:00
pooka
bbceff78e8 add fs/puffs 2006-10-22 22:44:44 +00:00
pooka
ce9afaf2f9 grab device number for puffs 2006-10-22 22:44:32 +00:00
pooka
8640fbb580 kernel portion of puffs - the Pass-to-Userspace Framework File System.
It contains the VFS attachment and userspace message-passing interface.

This work was initially started and completed for Google SoC 2005
and tweaked to work a bit better in the past few weeks.  While
being far from complete, it is functional enough to be able and
stable to host a fairly general-purpose in-memory file system in
userspace.  Even so, puffs should be considered experimental and
no binary compatibility for interfaces or crash-freedom or zero
security implications should be relied upon just yet.

The GSoC project was mentored by William Studenmund and the final
review for the code was done by Christos.
2006-10-22 22:43:23 +00:00
christos
896545c86a shave 32 bytes. 2006-10-22 21:57:55 +00:00
jmmv
f584c9cef6 Forgot to remove non-applicable *VERBOSE options. 2006-10-22 21:08:48 +00:00
christos
a4b205c85a don't leak kernel variable declarations to userland. 2006-10-22 20:55:09 +00:00
mrg
a37172bb09 avoid a problem in kpsignal2() holding sched_lock while wanting to call
pool_get().  pre-allocate the ksiginfo_t before taking sched_lock and
use it if necessary, or freeing it if it is unused.

rename ksiginfo_{get,put}() to ksiginfo_{dequeue,queue}() (idea from chuq.)


this fixes PR#32962.  thanks to christos, chuq and go for help/ideas.
2006-10-22 20:48:45 +00:00
christos
1536848b53 fix typo. 2006-10-22 19:21:26 +00:00
jmmv
2bce77b498 Kernel configuration file for the QEMU virtual machine. This is based on
GENERIC and keeps all MI stuff untouched but removes all MD devices that
are not supported by QEMU.  Inspired by the recently added PARALLELS file.
2006-10-22 18:49:24 +00:00
christos
f6c67772ca use strlcpy instead of strncpy or bcopy to copy the interface name. 2006-10-22 18:24:02 +00:00
christos
8c71201d08 make ktruser enforce the maximum buffer length, and return an error. 2006-10-22 18:19:49 +00:00
christos
9e34b4bbee ktruser checks for length now. 2006-10-22 18:18:49 +00:00
christos
0838967c65 ktruser now returns an error if the buffer length is too big. 2006-10-22 18:18:08 +00:00
bouyer
146b18fc4b Don't add ikphy twice; pointed out by Patrick Welche 2006-10-22 16:26:27 +00:00
peter
8f247a77de add const 2006-10-22 15:31:26 +00:00
bjh21
139ac00676 The sec(4) and ei(4) drivers appear to work on acorn32. Use them in preference
to the MD asc(4) and ie(4) drivers.
2006-10-22 14:15:51 +00:00
pooka
362b187ff0 constify in cpu_setmcontext() 2006-10-22 13:59:14 +00:00
pooka
c0402602d9 constipate 2006-10-22 13:29:13 +00:00
pooka
80b7c62e48 be appropriately const poisonous 2006-10-22 13:25:54 +00:00
pooka
96d8335980 kauth_cred_uucvt() -> kauth_uucred_to_cred(), introduce kauth_cred_to_uucred()
per tech-kern proposal
2006-10-22 13:07:15 +00:00
pooka
ce41546de3 make compile for NMIDI == 0 2006-10-22 12:52:46 +00:00
scw
321742a838 Stick with unsigned long for _BSD_SIZE_T_ regardless of LP64/ILP32. 2006-10-22 11:20:44 +00:00
mrg
592435f965 don't drop const in cpu_setmcontext32(). 2006-10-22 10:50:44 +00:00
elad
54c1c4a4dc Remove todo that has been documented for a long time now. 2006-10-22 10:37:19 +00:00
yamt
982b4f66e8 remove a todo which has been done. 2006-10-22 10:19:25 +00:00
yamt
6a98028817 use vmem for xen_shm. 2006-10-22 09:44:55 +00:00
yamt
e95cf416a6 extent/malloc -> vmem_alloc/kmem_alloc. 2006-10-22 09:44:21 +00:00
yamt
0d14f90ef6 qc_init: when initializing pools, use align==1 (ie. no alignment)
rather than align==0, which is converted to ALIGN(1) by pool_init.
2006-10-22 09:42:30 +00:00
uwe
f8b92ef629 Instead of referring *code repeatedly, fetch it once into a local variable.
Identical object code for f_* is produced with -O.
2006-10-22 03:58:36 +00:00
uwe
d62bc05de1 Whitespace cosmetics in declarations of local variables. 2006-10-22 03:50:10 +00:00
uebayasi
3d643c0f73 const static -> static const 2006-10-22 03:39:43 +00:00
uwe
e10806aaa8 Rename get_opcode argument for consistency. 2006-10-22 03:37:04 +00:00
tsutsui
5398897f34 Rename RTK_[TR]X_DESC_INC() macro to RTK_NEXT_[TR]X_DESC() and
change them to return rvalues to avoid possible side effects.
Also define RTK_NEXT_TXQ() for rtk_txq index and use it as well.
2006-10-22 01:47:53 +00:00
tsutsui
d438fee521 Rename a variable to clarify meaning of index. 2006-10-22 01:23:39 +00:00
mrg
7a4c53719e avoid yet another GCC warning only exposed at -O3. 2006-10-22 00:48:14 +00:00
uwe
6ac2d0e699 Revert previous that apparently has been committed by mistake.
It actually contained just some debugging printfs, and *wrong*
debugging printfs at that (hi, jared :)
2006-10-22 00:33:14 +00:00
mrg
1b262f1cb0 correct a debug statement. 2006-10-22 00:24:23 +00:00
reinoud
d31cd7fc58 Add extended attribute numbers associated with the two defined structures
for times and device specification.
2006-10-22 00:06:48 +00:00
reinoud
9c8aedbe6c Return the TAILQ_FOREACH to an explicit `for' loop since in the loop vnodes
can be removed.
2006-10-22 00:03:33 +00:00
mrg
9631418f8f remove "struct cacheline" and the "cacheline" variable. (it was only set
in cpu_attach(), overwritten by multiple cpus, and only one member of the
12 or more were ever used again.)  add an ecache_min_line_size to replace
this functionality.

clean up some non-SMP friendly code from cpu_attach():
	- only reset the fpu state on the boot cpu
	- don't bother printing "FPU version 0" always
	- don't call getver() and ignore the result
	- print the UPA id on the first cpu0: line

only print mp_tramp address #ifdef DEBUG.

reset the fpu state in cpu_hatch(), like cpu_attach() does for the boot cpu.


cpu_attach() is now free of SMP-unfriendly code.
2006-10-21 23:49:29 +00:00
bjh21
f62548abf5 Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
2006-10-21 22:45:03 +00:00
tsutsui
bc366d3166 Tweak TX descriptor setup code in re_encap() to make it more readable a bit. 2006-10-21 21:29:14 +00:00
bouyer
76694b5d3f Regen: addded i82563 PHY 2006-10-21 17:19:21 +00:00
bouyer
5b9f1ed038 Regen: added some Intel gigabit ethernet products 2006-10-21 17:18:49 +00:00
bjh21
983692f3d5 Program the IOMD flyback size register correctly, or at least the same way
we did before we started using struct videomode.  This seems to unbreak
systems with VRAM at least a little.
2006-10-21 17:08:22 +00:00
pooka
e2d2f0dc15 pool_get(): use PR_WAITOK, not M_WAITOK (which happens to be PR_NOWAIT ..)
XXX: not the first time this mistake has been made
2006-10-21 17:01:56 +00:00
tsutsui
587d5e790a Fix hardware VLAN tagging support on vge(4):
- On TX, vge(4) seems to assume that tags are written in little endian.
  We already use htole32() to write values into descriptors,
  so extra byteswap by htons() is not needed there.

- On RX, vge(4) seems to store tags in network byteorder.
  We have to swap byteorder regardless of host's byteorder
  (i.e. we have to use bswap16() rather than ntohs())
  because we already use le32toh() to read values from descriptors.

Anyway, no need to use htons()/ntohs() because there is no stream data.

Tested on both i386 and macppc, and OK'ed by Pavel Cahyna.
2006-10-21 16:26:35 +00:00
tsutsui
f89487b7e5 Use aprint_error(9) to print error messages. 2006-10-21 16:13:21 +00:00
bjh21
d726ea385c Remove cruft left over from when this code was copied from some TURBOchannel
framebuffer or other.
2006-10-21 14:24:46 +00:00
bouyer
154d613f0b Add support for the Intel 80003 Gigabit Ethernet controller (found e.g. in
newer server chipsets) to wm(4), from the FreeBSD em(4) driver.
While there, add a few other Intel Ethernet controller that should work as
is.
Properly update the RX error and TX collision counters.
Add ikphy(4), a driver for the Intel i82563 Kumeran 10/100/1000 Ethernet PHYs
2006-10-21 14:10:32 +00:00
bouyer
7bdd26b810 Restart negotiation when we change media even if autoneg is not enabled.
Otherwise switching from a fixed media to another fixed media isn't noticed
by the switch and the effective speed doesn't change.
2006-10-21 13:55:30 +00:00
yamt
80e1bbb713 add sack_dump(), a function to dump sack holes, if defined(DDB). 2006-10-21 10:26:21 +00:00
yamt
7253aad93f constify. 2006-10-21 10:24:47 +00:00
yamt
c31e22237d - constify.
- make tcp_dooptions and tcpipqent_pool static.
2006-10-21 10:08:54 +00:00
skrll
c837287aab s/out/bad/ in cpu_dumpconf so this compiles. 2006-10-21 08:11:49 +00:00
mrg
065b4dbdca fix errors in the previous changes. 2006-10-21 08:09:58 +00:00
skrll
3d92eb6b84 De-__P() 2006-10-21 07:24:20 +00:00
skrll
b560533af2 Pass the cookie (not the function address) to bus_space_alloc.
From OpenBSD.
2006-10-21 07:22:48 +00:00
kardel
d094ff8f40 Avoid printf() the selected timecounter as it is called in the path of hardclock().
The information is available via sysctl anyway.
2006-10-21 07:16:54 +00:00
mrg
648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
tsutsui
5227317a1e Use CSR_WRITE_1() to write RTK_TXSTART register because it is localted
at an odd address (0xd9) and noted "8 bit" in rtl81x9reg.h.

XXX: FreeBSD and OpenBSD also use CSR_WRITE_1() to write RTK_GTXSTART
XXX: for 8169 even though there is a "16 bits" comment at GTXSTART macro.
XXX: Which is correct?
2006-10-21 03:44:47 +00:00
mrg
877957f469 add a "mach sir" command to call sir instruction ('software initiated
reset').  this is a much more drastic way to do "mach prom", but it
works when used from cpu>0, which "mach prom" currently does not.
2006-10-21 03:16:05 +00:00
elad
815337c3da Kill KAUTH_GENERIC_ISSUSER usage. 2006-10-21 00:13:57 +00:00
elad
305fe09181 Introduce a new action on the network scope, KAUTH_NETWORK_INTERFACE,
used to manage network interfaces.

Add four sub-actions to fulfill generic needs for now, until a more
carefully defined usage of the interface is documented: get, set,
getpriv, and setpriv.
2006-10-20 23:10:33 +00:00
elad
a5d447aee5 Add an XXX to remind me why it's there when grepping. (securelevel ref) 2006-10-20 22:22:48 +00:00
mrg
e54ce8ca38 avoid yet another GCC uninitialised warning at -O3. 2006-10-20 22:12:57 +00:00
elad
0c8de7ee9e Kill another KAUTH_GENERIC_ISSUSER. 2006-10-20 22:04:13 +00:00
elad
fab05f403b Add a new ALTQ kauth(9) request, KAUTH_REQ_NETWORK_ALTQ_JOBS. 2006-10-20 22:02:54 +00:00
elad
b8093b8985 Kill some KAUTH_GENERIC_ISSUSER. 2006-10-20 21:55:56 +00:00
mrg
e76360da33 avoid yet another GCC uninitialised warning error that only comes
up with -O3.
2006-10-20 21:50:41 +00:00
reinoud
19cb20fb7b Back out TAILQ_FOREACH in the vflush() since vgone() and vclean() are
called, the TAILQ_NEXT() derefers 0xdeadbeef....

Implemented again using an explicit `for' loop that keep the next pointer
available.
2006-10-20 20:29:52 +00:00