Commit Graph

65583 Commits

Author SHA1 Message Date
uwe bb09aff859 Undo previous as it broke things.
There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
2003-08-25 17:50:22 +00:00
tron c8232f0d0f Protect inclusion of "opt_vm86.h" with "#ifdef _KERNEL_OPT" as appropriate. 2003-08-25 13:11:30 +00:00
drochner 25df17af88 fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its
event loop answering requests from the kernel device (cfs). sys_mount()
calls VFS_STATFS() internally which caused an upcall through cfs,
which was never answered.
Now don't consider the fs fully mounted before the VFS_START() was
called at the vey end of sys_mount(). So VFS_STATFS() will return
an error which is ignored.
2003-08-25 10:05:46 +00:00
drochner eacc9ee5ce nuke an over-zealous memset() which broke statfs() et al. completely 2003-08-25 09:24:53 +00:00
drochner 8085017e31 fix _UC_MACHINE_SP() for the vm86 case: we have to add the SS offset 2003-08-25 09:20:25 +00:00
cb 5f734a1850 fix a race condition between path resolution in userland
and the subsequent namei(): inform the kernel portion of
valid filenames and then disallow symlink lookups for
those filenames by means of a hook in namei().
with suggestions from provos@

also, add (currently unused) seqnr field to struct
systrace_replace, from provos@
2003-08-25 09:12:42 +00:00
he 2dfc91641e Remove duplicate entry for ``pf''. 2003-08-25 09:05:13 +00:00
mrg 0e001a53fa make it "static long nil;" as it's used as &nil in an array wanting long *'s.
makes GCC3 happy.
2003-08-25 04:51:10 +00:00
thorpej b6ff7ed864 It's bad form to use the <opencrypto/rmd160.h> header file while
using the crypto/ripemd160/rmd160.c implementation.  Remove the
opencrypto-local copies of these files entirely.
2003-08-25 04:09:57 +00:00
thorpej 7c0f1119d1 These are unused; remove them. 2003-08-25 04:09:05 +00:00
itojun 356aebd768 g/c unused member. use in6p_ip6 more effectively. 2003-08-25 00:14:30 +00:00
itojun 9569786c95 deref member in in6p directly, don't rely on existence of macro 2003-08-25 00:11:52 +00:00
itojun ff512e5035 don't commit value into ip6_ptkopts until the validation is done.
(note: the code will be updated with 2292bis definition soon, hopefully)
2003-08-25 00:10:27 +00:00
marcus 9010cdf728 LINEAR and LINEAR_LE need to be interchangeable (fixes 8bit unsigned bug). 2003-08-24 19:52:46 +00:00
marcus f436d156b4 Added some encodings which were supported but not listed. 2003-08-24 19:44:29 +00:00
thorpej a7b80200d3 crypto_mbuf.c is unused; remove it. 2003-08-24 19:29:09 +00:00
thorpej 6c52220ed3 G/C some unused config definitions. 2003-08-24 19:28:32 +00:00
thorpej 633cb7d73e Make opencrypto depend on the "ripemd160" and "sha2" attributes, rather
than polluting the crypto algorithm config info with opencrypto knowledge.
2003-08-24 19:26:54 +00:00
thorpej 35479644a7 Move the opencrypto defpseudo into files.opencrypto. 2003-08-24 19:21:11 +00:00
atatat 2768d776d4 Use pfind() in proc_sysctl() to find the target process instead of a
home-grown routine.  Remove defcorenamelen, since it's not used
anywhere.
2003-08-24 19:20:40 +00:00
thorpej 06b1e7a0f1 Make opencrypto explicitly depend on the "des" attribute. Also pull
in zlib.c explicitly if opencrypto is included.
2003-08-24 19:19:54 +00:00
chs 12f04351ad fix some indentation. 2003-08-24 18:12:25 +00:00
chs 14ee4005a1 make sp_tlb_flush() work for profiling kernels:
when we're profiling, the compiler creates a stack frame for us,
so doing a "retl" isn't so good in that case.
2003-08-24 18:10:31 +00:00
chs f217b85c1f make this build with GEM_DEBUG. fix rxhist counters. 2003-08-24 18:07:03 +00:00
chs 2ab420f918 recognize the latest version of the GMAC. 2003-08-24 18:02:00 +00:00
chs 939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
uwe 4b28d28d70 defflag RASTERCONSOLE. 2003-08-24 17:36:32 +00:00
marcus 7973c3321c Added AICA sound driver contributed by Ryo Shimizu. 2003-08-24 17:33:27 +00:00
uwe 65aeb1d742 #include "opt_rcons.h" 2003-08-24 17:31:59 +00:00
chs fd825b0f1e avoid taking the kernel lock for MPSAFE syscalls.
add missing unlock in fancy case.
2003-08-24 16:36:10 +00:00
chs 3cf764618d remove bogus code that terminates stack trace too early on OEA. 2003-08-24 16:33:41 +00:00
chs 4ffa07757d mprotect()'s "len" is really a size_t, and we can't do any useful
bounds-checking on it.
2003-08-24 16:32:50 +00:00
he cb53c3ac12 The new ufs.o also needs memset, so add it. 2003-08-24 15:19:46 +00:00
he d871277d7d Adapt to new ufs.c needing memcmp and memmove. 2003-08-24 15:11:18 +00:00
he 47a6e783ff Adapt to const-ification of the first arg of the open function of fs_ops. 2003-08-24 14:43:29 +00:00
tron 6948b33a95 Add a missing blank line between two functions. 2003-08-24 09:38:53 +00:00
itojun e5255bfd47 make proc.curproc.* check more strict. atatat 2003-08-24 06:11:19 +00:00
mrg b5076a98db 64 bit number literals need a "ULL" suffix 2003-08-24 00:41:43 +00:00
cjep a94f967897 Make this compile with options DEBUG (part of PR#22582 from Frank Kardel). 2003-08-23 20:37:18 +00:00
martin f5a54fd742 When trying to (re-)establish a session cope with intermediate output
failures of the underlying ethernet interface - just keep trying.
2003-08-23 16:42:41 +00:00
he 75219318a9 Add memmove.c, needed by new ufs.c. 2003-08-23 09:10:51 +00:00
uwe 8dccb95e85 French keydesc for Jornada 680/690. Written based on photos and
descriptions of WinCE behavior from Ge'rard Gambaro (jornada.free.fr).
Not tested on an actual ABF unit.

Hidden under #if 0, as we don't have a platform id for French Jornadas yet.
But I think it's better off committed before it's got lost.
2003-08-23 02:48:47 +00:00
itojun 3e76200c67 need sys/domain.h for FAST_IPSEC case; jonathan 2003-08-23 01:41:10 +00:00
dogcow 80f2705ab1 regen (add VIA VT6105) 2003-08-23 00:14:42 +00:00
dogcow 171b7c3fa5 add VT6105 support to vr(4) 2003-08-23 00:14:28 +00:00
itojun a3bad645a4 make sure so is properly initialized 2003-08-22 22:49:34 +00:00
itojun 58f57a60fd tp could be null in tcp_respond() 2003-08-22 22:27:07 +00:00
itojun 4e6aca94c2 correct missing inclusion of opt_ipsec.h 2003-08-22 22:11:44 +00:00
itojun cabb25918f no need for opt_ipsec.h any longer 2003-08-22 22:05:11 +00:00
itojun 11ede1ed88 remove ipsec_set/getsocket. now we explicitly pass socket * to ip{,6}_output. 2003-08-22 22:00:36 +00:00
itojun 82eb4ce914 change the additional arg to be passed to ip{,6}_output to struct socket *.
this fixes KAME policy lookup which was broken by the previous commit.
2003-08-22 21:53:01 +00:00
itojun 9329caaf20 typo in log message 2003-08-22 21:50:42 +00:00
dsl db4706faf9 Reduce memory footprint:
- use file buffer for all block reads
- only save a small amount of the indirect block list
Allows i386 bootxx_ufs code to load /boot from a filesystem with 32k blocks
while still fitting inside 64k of memory.
Code size reduced as well (by ~1k on i386).
It ought to be possible to use a buffer that is smaller than a filesystem
block.  This might be needed in order to boot from filesystems with larger
block sizes.
2003-08-22 21:33:52 +00:00
dsl f3404c9f63 Fix same breakage as previous (need memmove for symlink handling in ufs.c)
but use (probably) smaller footprint code from libsa.
2003-08-22 21:14:35 +00:00
dsl 6c51a53afa Add memmove - needed for symlink processing in ufs.c 2003-08-22 21:00:26 +00:00
jonathan e3ec783e41 (Accidentally-omitted change): update for ip6_output() to match commit below.
replace the set_socket() method of passing an extra struct socket*
argument to ip6_output() with a new explicit struct in6pcb* argument.
(The underlying socket can be obtained via in6pcb->inp6_socket.)

In preparation for fast-ipsec.  Reviewed by itojun.
2003-08-22 20:49:03 +00:00
jonathan 9339ef0381 Change KAME code for ip_output()/ip6_output() to obtain struct socket*
from the explicit inpcb*/in6pcb* argument.  set_socket() becomes redundant.
2003-08-22 20:29:00 +00:00
jonathan 902669955f Replace the set_socket() method of passing an extra struct socket*
argument to ip6_output() with a new explicit struct in6pcb* argument.
(The underlying socket can be obtained via in6pcb->inp6_socket.)

In preparation for fast-ipsec.  Reviewed by itojun.
2003-08-22 20:20:09 +00:00
he b372f2beaa Adapt to const-ification of first arg of open function in fs_ops. 2003-08-22 08:06:19 +00:00
itojun 8ebd15f8cd add udav* 2003-08-22 07:52:48 +00:00
itojun 52f8075c5a allow userland to specify SPD ID. more readable debugging messages. 2003-08-22 06:22:21 +00:00
itojun 80e0659dae KNF 2003-08-22 06:21:09 +00:00
itojun 616adf38ee backout; committed by mistake 2003-08-22 05:48:27 +00:00
itojun 190b098134 do not quit from key_sendup() even if writes to non-target socket fails.
from SEIL team
2003-08-22 05:46:37 +00:00
itojun 96467c96c7 add udav* 2003-08-22 05:14:00 +00:00
itojun 413787298f udav*, for ether w/ Davicom DM9601 chipset. Shingo WATANABE 2003-08-22 05:13:29 +00:00
itojun 714f2369d3 on netbsd, major # for /dev/crypto depends on arch 2003-08-22 05:07:26 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
jonathan 215937cb45 Check in hooks to fix checksum offload on bge devices. Empirical
observation is that some 570x devices can get themselves into a state
where they miscompute off-loaded TCP or UDP checksums on packets so
small that Ethernet padding is required.  Further obsevation suggests
that the bge checksum-offload hardware is adding those padding bytes
into its TCP checksum computation. (Once a 5700 gets in this state,
even a warm boot won't fix it: it needs a hard powerdown.)

Work around the problem by padding such runts with zeros: even if the
checksum-offload adds in extra zeros, the resulting sum will be correct.

Also, dont trust the checksum-offload on received packets smaller than
the minimum ethernet frame, in case the Rx-side has a similar bug.

Finally, on packets where we do trust the outboard Rx-side TCP or UDP
checksum, the bge did not include the pseudo-header. Set the
M_CSUM_NO_PSEUDOHDR bit as well as M_CSUM_DATA, and rely on
udp_input() or tcp_input() adding in the sum via in_cksum_phdr().
2003-08-22 03:32:35 +00:00
jonathan 25eeb02c06 Fix a bug in compaction of `DMA runt' fragmented packet chains:
if we m_dup() a packet to compactify it, and later run out of DMA
descriptors, bge_encap() will return ENOBUFS, hoping the driver will
try again later.  But we have just m_freem()'d the original chain
which was m_dup()'d, leaving a pointer to the just-freed packet header
in the tx queue.

Fix by always walking the chain, shuffling data towards the head;
except if we find a runt in the very last mbuf, we must borrow data
from its predecessor.

(Patch is verbatim from a third-party tree, apologies for any style woes.)
2003-08-22 03:03:20 +00:00
junyoung d366db246b TNF & remove trailing spaces. 2003-08-22 02:01:32 +00:00
petrov 53514f157f Don't set and check absent interrupts on sabre. 2003-08-22 00:46:25 +00:00
petrov 051f6b8a9a Cosmetic: move DEBUG defines. 2003-08-22 00:45:40 +00:00
he 1c6c843936 Adapt to const-ification of first arg of open function in fs_ops. 2003-08-21 23:28:27 +00:00
he 09c6022868 Add memcmp, memmove and bcmp to handle the new ufs.c. 2003-08-21 23:24:36 +00:00
he b6643fd4d3 Adapt to const-ification of first arg of open function in fs_ops. 2003-08-21 23:15:18 +00:00
he 25d9b10ee9 Add casts of LINUX_USRSTACK and USRSTACK to handle the cases
where these are not constants.
2003-08-21 23:00:07 +00:00
he 241ad00001 Adapt to const'ing of the first argument of the open function in fs_ops. 2003-08-21 22:34:48 +00:00
jonathan 9dbddd495b Remove #ifdef _OpenBSD__ code which sets the softc pointer `sc' by
passing an index into ubsec_cd.cd_devs[]: that causes too much
confusion with the checks that sc is non-null.
2003-08-21 20:00:15 +00:00
jonathan 6f179aea24 Pull in FreeBSD sys/opencrypto/cryptodev.h, revision 1.2.2.5 -> 1.2.2.6.
Sam Leffler's FreeBSD commit message was
  ``to eliminate context switch when returning results from the
     software crypto driver''
but the patch also contains the CRYPTO_SESID*() macros used in newer
ubsec and hifn drivers.
2003-08-21 19:44:14 +00:00
jonathan 412d30185b Pull up `done' flag for crypto operations from FreeBSD. FreeBSD deltas:
cryptodev.c: 1.4.2.3 -> 1.4.2.4
  cryptodev.h: 1.4.2.4 -> 1.4.2.5
2003-08-21 16:08:05 +00:00
yamt a7f9b1d8e0 don't make zero-sized mappings. 2003-08-21 15:17:03 +00:00
dsl dc46f864d1 Hide prototype of linux_exec_setup_stack() inside #ifdef _KERNEL so
that sbin/sysctl will compile.
2003-08-21 15:08:25 +00:00
jonathan 6196bbe72d Honour the M_CSUM_NO_PSEUDOHDR, if set on inbound TCP and UDP packets.
Tested against  bcm5700 with patched if_bge.c.
2003-08-21 14:49:49 +00:00
dsl 92c5eba410 Split CGSIZE definition so it can be used with 64bit fpg values.
Split cg_start so magic can be done in libsa when it is known that the
filesystem isn't UFS2.
2003-08-21 14:41:00 +00:00
he 395b0c6682 Now that ufsboot / ufs.c uses memmove(), we need to include it here. 2003-08-21 13:12:32 +00:00
pk 84ab67f557 sun4/sun4c DIAGNOSTIC: fix tally of locked down pmegs.
pmap_page_protect: DIAGNOSTIC: show `pg' argument in panic.
pmap_unwire: for now, only used for sun4/sun4c MMUs.
2003-08-21 09:36:28 +00:00
hannken 1a2d1be737 Fix syscall_vm86 argument:
struct trapframe -> struct trapframe *
2003-08-21 08:36:56 +00:00
elric 72e3ec4b0c Should call ufs_close() if it isn't being built in. 2003-08-21 00:01:28 +00:00
elric 2a56d40c5c make 'path' argument to cd9660_open 'const char *' and fix the fallout. 2003-08-21 00:00:52 +00:00
itojun 109461480a expose CBQ_MAXPRI to userland 2003-08-20 23:32:25 +00:00
jonathan 65d419641b regen from pcidevs 1.567 with fix for typo in bcm5823 product-id. 2003-08-20 22:58:22 +00:00
jonathan fcc087c11d Fix typo (s/5822/5823/) in line for bcm5823 device. 2003-08-20 22:56:13 +00:00
jonathan c23a2c9c86 opt_inet6.h is FreeBSD-specific, so wrap it with #ifdef __FreeBSD__/#endif. 2003-08-20 22:33:40 +00:00
fvdl c43b35423e Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c
2003-08-20 21:48:35 +00:00
drochner 544307ba64 make the vlan stuff work 2003-08-20 17:41:38 +00:00
matt a1bba8f344 Relax things so that OFW implementations that don't conform to the OFW PCI
bindings will work.
2003-08-20 14:41:56 +00:00
yamt 7847549d35 use LSDEAD instead of SDEAD for lwp state. 2003-08-20 14:04:00 +00:00
yamt 611b0b9f15 don't use a space char in wmesg.
it makes outputs of SIGINFO confusing.
2003-08-20 13:54:48 +00:00
yamt be09ed029e fix indent. 2003-08-20 13:50:53 +00:00