Commit Graph

192300 Commits

Author SHA1 Message Date
pooka b7d235f4da Fix typo in comment. comment tested by wizd. 2010-07-16 13:07:23 +00:00
pooka 16c5b04bd3 Fill in PR kern/43626 now that it exists. 2010-07-16 11:46:31 +00:00
pooka 8206e1e692 Do the famous renamerace test using directories. Uh oh, bad idea.
PR coming soon.
2010-07-16 11:33:45 +00:00
pooka b006a8b60d This test does not always fail for LFS, so apply same kludge as
elsewhere while waiting for atf to grow support for these cases.
2010-07-16 10:50:55 +00:00
hannken 3b6c9000bf Use a kmutex to protect the hash chains and always take this mutex
before removing a node from the hash chain.

Release the hash list lock before calling getnewvnode() and check the
hash list again like other file systems do.

Take v_interlock before calling vget().
2010-07-16 10:41:12 +00:00
hannken 438de34ae8 Always take the hash list lock before removing a node from the hash chain.
Release the hash list lock before calling getnewvnode() and check the
hash list again like other file systems do.

Take v_interlock before calling vget().
2010-07-16 08:23:28 +00:00
dyoung a055a1e00a Under some circumstances, udp6_output() would call ip6_clearpktopts()
with an uninitialized struct ip6_pktopts on the stack, opt.
ip6_clearpktopts(&opt, ...) could dereference dangling pointers,
leading to memory corruption or a crash.  Now, udp6_output() calls
ip6_clearpktopts(&opt, ...) only if opt was initialized. Thanks to
Clement LECIGNE for reporting this bug.

Fix a potential memory leak: it is udp6_output()'s responsibility
to free its mbuf arguments on error.  In the unlikely event that
sa6_embedscope() failed, udp6_output() would not free its mbuf
arguments.

I will ask for this to be pulled up to -4, -5, and -5-0.
2010-07-15 23:46:55 +00:00
jym b5924bfd19 With Xen, PDPpaddr should contain a guest physical address (== PFN). 2010-07-15 23:20:34 +00:00
jym dfcbd5678f pte0 is used to map the page required by bioscall() trampoline code, so
add VM_PROT_EXECUTE protection for it.

Currently, this does not change much, as page execute permission is not
enforced for i386 (except for Xen, where BIOS calls are not used anyway).
2010-07-15 22:19:19 +00:00
christos 6533f925b7 Document the format of the system crontab file, since cron(8) says that we do. 2010-07-15 22:18:20 +00:00
pooka b97a9a0af5 f_namemax is one of the static fields overridden by copy_statvfs_info(),
so be sure to set it to the value coming from the file server as
part of mount args.

exposed, like so many other problems, by njoly's tests
2010-07-15 21:55:05 +00:00
pooka 01e9b21900 Default f_namemax to MAXNAMLEN, mostly for initial statvfs struct
passed to kernel in mount.

XXX: there's currently no way for a file server to override the
one passed in mount.
2010-07-15 21:53:10 +00:00
jym dd8a27c182 Check the virtual address 'va' for each PDIR_SLOT_PTE entry. PDP_SIZE
is 4 with PAE (Xen only currently), 1 otherwise: loop should be unrolled
when PDP_SIZE is 1.

pmap_alloc_level() is used by pmap_growkernel(), the PDE is a kernel
mapping: mark it so with PG_k. While here, use pmap_pa2pte() for physical
address 'pa'.

No functional change.
2010-07-15 21:14:31 +00:00
christos 4d77e7cf65 PR/43623: Takahiro Kambe: Allow /etc/crontab processing if it is not writable,
don't insist that it is mode 0600.
2010-07-15 20:04:14 +00:00
christos 7035a6c5ea remove bad cast. 2010-07-15 20:03:28 +00:00
dyoung c0d48690b2 To help find the cause of kernel complaints such as "/netbsd:
nd6_storelladdr: sdl_alen == 0, dst=... if=wm1", add printfs for some
"impossible" conditions, and make the nd6_storelladdr() printf more
informative by printing the value of sdl_alen.
2010-07-15 19:15:30 +00:00
jym 7d13a50ab2 Make the comment about PDPpaddr more thorough. 2010-07-15 19:02:26 +00:00
jym d3c610129a Purely cosmetic: move L2_SLOT_KERNBASE out of the PAE #ifdef/#endif block. 2010-07-15 18:58:40 +00:00
jym c60095f23a In Xen PAE case, fix argument size passed to init386(), by pushing the
upper bits onto stack (we do not expect first_avail to be above 4GiB, so
assume their value is 0).

Remove macros (PROC0PDIR and PROC0STACK) that were never used.
2010-07-15 18:55:27 +00:00
pooka d46f7cf9c7 some recent changes 2010-07-15 16:29:42 +00:00
joerg 3c0c4333af Regen for libarchive 2.8.4 2010-07-14 22:14:17 +00:00
joerg 1332698d66 Merge libarchive 2.8.4 2010-07-14 22:13:58 +00:00
joerg 7a09c6c34f Import libarchive 2.8.4:
Symlink dereference fix for Linux broke the build there; corrected.
Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix.
Improved reliability of hash function detection.
2010-07-14 22:10:39 +00:00
jmmv eea82a7db0 Add the new kernel/t_sigaction test program. 2010-07-14 21:48:31 +00:00
jmmv fc6db98b3b Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.
2010-07-14 21:47:06 +00:00
pooka 6314ba47ee xfail test on lfs. It goes badaboom faster than you can find your
multipass.  Borrow PR kern/43582 used earlier for rmdirrace, as it
looks pretty much like the same problem.
2010-07-14 21:44:40 +00:00
pooka 1d97126256 start converting renameraces to vfs 2010-07-14 21:41:32 +00:00
pooka 3b5bc723d2 Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions.  The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
2010-07-14 21:39:31 +00:00
pooka 5aa789e743 Check that nobody raced us into the source dir while it was unlocked
in preparation for rename.
2010-07-14 21:24:40 +00:00
pooka ae0b9ccec6 Add an assortment of rename tests. Not complete, but at least tests
something.

This contains the tests for PR kern/43616 and PR kern/43617.
2010-07-14 20:45:48 +00:00
pooka 7d034c7a9d Return correct error values from a bunch of questionable renames.
There's no substitute for single-stepping do_sys_rename() into ffs
when trying to figure out what error should come from what layer...
well, at least apart from TNT.
2010-07-14 17:10:14 +00:00
pooka 6a86e782e9 * remove target node from right directory
* remove what i guess to be a useless if-clause (although with
  file systems you can never be sure)
2010-07-14 16:59:35 +00:00
pooka 083df92b14 return same errno as ffs 2010-07-14 16:03:49 +00:00
jym b1392d44f0 Fix typo in comment. 2010-07-14 14:42:40 +00:00
pooka 28a6875445 check we don't rename onto a non-empty directory 2010-07-14 14:22:15 +00:00
pooka b79f37ef16 RENAME lookup semantics say return EISDIR if dvp = *vpp for the
last component .... obviously(!!)
2010-07-14 14:07:37 +00:00
pooka 58d9a55076 prevent rename of source directory under itself 2010-07-14 13:09:52 +00:00
jnemeth a7428f3211 When searching PROM data to get a MAC address, search for National
Semiconductor Saturn data as well as Sun Cassini data.
2010-07-14 09:52:39 +00:00
jnemeth 7535698c7d Don't leak kernel stack data when an enaddr can't be found. 2010-07-14 04:50:28 +00:00
msaitoh 5af09cfe90 - s/TBDA/TDBA/. It stands for Transmit Descriptor Base Address.
- The document says that the TDH register must be set after
  TCL.EN is set on 82575 and newer devices.

TODO:
- ip4csum doesn't work on 82575 and newer devices (reported by Paul Goyette),
  so we have to fix it.
2010-07-14 00:11:06 +00:00
msaitoh e2e9dc6ae8 Add three card support from Tsubai.
- Advantech PCI-1604UP (2S)
 - InnoSys Keyspan SX Pro (4S)
 - I-O DATA RSA-PCI2 (2S)
2010-07-13 23:46:19 +00:00
msaitoh 80df369a1d regen. 2010-07-13 23:41:30 +00:00
msaitoh 07f6ac5ad5 Add Advantech PCI-1604 2010-07-13 23:40:56 +00:00
rmind bcc65ff09f Split-off IPv4 re-assembly mechanism into a separate module. Abstract
into ip_reass_init(), ip_reass_lookup(), etc (note: abstraction is not
yet complete).  No functional changes to the actual mechanism.

OK matt@
2010-07-13 22:16:10 +00:00
rmind 29dd668442 Add a regression test for IPv4 reassembly. Cases:
- Normal (valid) fragments.
- Fragment with ip_off + hlen lower than IP_MINFRAGSIZE - 1.
- Different ip_tos values in fragments.
- Fragment data length which is not multiple of 8 bytes.
- Duplicate fragments (one covering previous).
- Packet larger than IP_MAXPACKET after reassembly.
- No last non-MF fragment (causing of timeout).
2010-07-13 22:13:18 +00:00
jmmv 9d0b4b5bb8 Get rid of static Atffiles and let bsd.test.mk generate them on the fly. 2010-07-13 21:13:21 +00:00
jmmv 2474b0ebb5 Set ATFFILE=yes to install the package-provided Atffiles instead of generating
our custom ones.
2010-07-13 21:12:38 +00:00
jmmv dad604ce0c Implement Atffile automatic generation.
This change adds the ATFFILE variable, which can take the following values:
- yes: The source directory contains a static Atffile to be installed.
- auto: The Atffile is automatically generated.
- no: Do not install any Atffile (replaces the previous NOATFFILE variable).

The ugly bit of this is that I have to add a TESTS_SUBDIRS variable that
lists the subdirectories that contain test cases (so that they can be listed
in the Atffiles, without including auxiliary directories without tests).
This is a subset of SUBDIR.

Addresses a minor part of PR bin/43394.
2010-07-13 21:11:41 +00:00
pooka d066e8927d tp 2010-07-13 18:13:57 +00:00
pooka 2a5fd96f77 Add a few simple basic-level tests for vnodeops. They don't cover
corner-cases, but make sure things at least superficially work
(which they always don't).  More to come...
2010-07-13 18:13:10 +00:00