Commit Graph

149449 Commits

Author SHA1 Message Date
Simon L. B. Nielsen
bc7f0010f1 MFC r197711:
Add no zero mapping feature.

NOTE: Unlike in the other branches where this change will be "merged"
to, the 'no zero mapping' is enabled by default in stable/8.

Errata:		FreeBSD-EN-09:05.null
Approved by:	re (kib)
2009-10-02 17:58:47 +00:00
Alan Cox
1040e2e4d1 MFC r197580
Temporarily disable the use of 1GB page mappings by the direct map.

Approved by:	re (kib)
2009-10-02 05:11:46 +00:00
Yoshihiro Takahashi
4d1ed2a5c6 MFC: revision 197535
Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
  (the default is 1).

  This makes the nfslockd module works for NFS client.

  Reviewed by:	dfr

Approved by:	re (kib)
2009-10-01 14:42:55 +00:00
Jamie Gritton
a301d3226a MFC r197581, r197583, r197584:
Set the prison in NFS anon and GSS SVC creds.

Reviewed by:	marcel
Approved by:	re (kib)
2009-10-01 13:11:45 +00:00
Rui Paulo
f24f7ffbd4 MFC r197653:
Improve 802.11s comment.

Approved by:	re (kib)
2009-10-01 10:06:09 +00:00
Ken Smith
3c5548d5cc Remove an extra 'S' that snuck in.
Submitted by:	danfe
Approved by:	re (implicit)
2009-09-30 12:53:21 +00:00
Ken Smith
10d9c2f795 Update description of debugging support.
Submitted by:	ivoras (but heavily modified)
Pointy hat:	me
Approved by:	re (implicit)
2009-09-29 19:57:06 +00:00
Doug Barton
d89eb6fc62 MFC r197297
Add a knob to show 'Starting foo:' messages when faststart is used,
such as at boot time.

MFC 197619

By popular acclaim, enable "Starting foo:" messages by default

Approved by:	re (bz)
2009-09-29 18:44:34 +00:00
Rui Paulo
5c58c682cb Mention 802.11s D3.03 support.
Approved by:	re (implicit)
2009-09-29 12:20:10 +00:00
Rui Paulo
f785216c4f Update 802.11s mesh support to draft 3.03. This includes a revised frame
format for peering and changes to the PERR frames.
Note that this is incompatible with the previous code.

Reviewed by:	sam
Approved by:	re (kib)
2009-09-29 12:18:23 +00:00
Pawel Jakub Dawidek
01985d6884 MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
r197512, r197513, r197514, r197515, r197525:

r197287:

Purge namecache for the file system being rolled back, so it doesn't point at
invalid vnodes after the rollback resulting in EIO errors when trying to access
files which are in the namecache.

Reported by:	des

r197289:

Purge file system namecache when receiving incremental stream and rolling back
to it.

r197351:

Purge namecache in the same place OpenSolaris does.

r197426:

Restore BSD behaviour - when creating new directory entry use parent directory
gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR:	kern/139076
Reported by:	Sean Winn <sean@gothic.net.au>

r197458:

Close race in zfs_zget(). We have to increase usecount first and then
check for VI_DOOMED flag. Before this change vnode could be reclaimed
between checking for the flag and increasing usecount.

r197459:

Before calling vflush(FORCECLOSE) mark file system as unmounted so the
following vnops will fail. This is very important, because without this change
vnode could be reclaimed at any point, even if we increased usecount. The only
way to ensure that vnode won't be reclaimed was to lock it, which would be very
hard to do in ZFS without changing a lot of code. With this change simply
increasing usecount is enough to be sure vnode won't be reclaimed from under
us. To be precise it can still be reclaimed but we won't be able to see it,
because every try to enter ZFS through VFS will result in EIO.

The only function that cannot return EIO, because it is needed for vflush() is
zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
z_teardown_lock and never returns EIO.

r197497:

Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

r197498:	head/cddl/contrib/opensolaris

Fletcher4 is not the default checksum algorithm.

r197512:

- Don't depend on value returned by gfs_*_inactive(), it doesn't work
  well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.

PR:	kern/139062
Reported by:	trasz

r197513:

Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

r197514:

On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

r197515:

Handle cases where virtual (GFS) vnodes are referenced when doing forced
unmount. In that case we cannot depend on the proper order of invalidating
vnodes, so we have to free resources when we have a chance.

PR:	kern/139062
Reported by:	trasz

r197525:

Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
This completes the fix from r185586.

PR:	kern/139059
Reported by:	Daniel Braniss <danny@cs.huji.ac.il>
Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
Tested by:	Daniel Braniss <danny@cs.huji.ac.il>

Approved by:	re (kib)
2009-09-29 10:53:06 +00:00
Andrew Gallatin
264d14d30d MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC
Approved by: re (kib)
2009-09-28 23:48:16 +00:00
Michael Tuexen
fe36e02918 MFC r197341.
Fix errnos.

Approved by: re (bz), rrs (mentor)
2009-09-28 18:32:28 +00:00
Konstantin Belousov
b57f5ce0bd MFC r197390:
Remove forward_roundrobin().

Approved by:	re (kensmith)
2009-09-28 11:31:21 +00:00
Marius Strobl
238bc19306 MFC: r197401
- According to Linux, the ALi M5451 can do 31-bit DMA instead of just
  30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
  causes the chip to overrun the mapping, triggering uncorrectable
  DMA errors on sparc64.
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari (superset of what is committed)
Approved by:	re (kib)
2009-09-25 19:59:18 +00:00
Alexander Motin
b8b5722c5d Remove constraint, requiring request data to fulfill controller's
alignment requirements. It is busdma task, to manage proper alignment by
loading data to bounce buffers.

PR:		kern/127316
Reviewed by:	current@
Tested by:	Ryan Rogers
Approved by:	re (kib)
2009-09-25 18:07:23 +00:00
Alexander Motin
2adf464fea MFC rev. 197462:
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems, where
some ata channels (usually ata1) was probed, but failed to attach.

Reviewed by:    jhb, imp
Tested by:      many
Approved by:    re (kib)
2009-09-25 18:04:55 +00:00
Marcel Moolenaar
3b9790003e MFC rev 197449:
Don't create more partitions than can fit in the table by checking
that the index is within bounds.

Approved by:	re (kib)
2009-09-25 17:48:30 +00:00
Marius Strobl
54577e2314 - Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
the work area was totally unsynchronized which means this driver only
  had a chance of working on x86 when no bounce buffers were involved,
  which isn't that likely given that support for 64-bit DMA is currently
  broken throughout ata(4).
- Add necessary little-endian conversion of accesses to the work area,
  making this driver work on big-endian hosts. While at it, use the
  alignment-agnostic byte order encoders in order to be on the safe side.
- Clear the reserved member of the SG list entries in order to be on the
  safe side. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari
Approved by:	re (kib)
2009-09-25 16:45:27 +00:00
John Baldwin
424b2e64a2 MFC 197415:
The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

Approved by:	re (kib)
2009-09-25 15:14:11 +00:00
John Baldwin
57a0ee4c0b MFC 197410:
- Split the logic to parse an SMAP entry out into a separate function on
  amd64 similar to i386.  This fixes a bug on amd64 where overlapping
  entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
  instead of an append to support systems with out-of-order SMAP entries.

Approved by:	re (kib)
2009-09-25 15:08:26 +00:00
John Baldwin
b10d205de2 MFC 197406:
Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

Approved by:	re (kib)
2009-09-25 14:58:00 +00:00
Brooks Davis
ad00749016 MFC r196990:
cr_groups is no longer embedded in struct ucred and is instead stored
in a seperate array.  As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.

This fixes a crash when running ps -ax on a coredump.

Reported by:	brucec
Tested by:	brucec
MFC after:	3 days
Approved by:	re@ (kib)
2009-09-24 21:35:13 +00:00
Brooks Davis
7bd26ba4cc MFC r197269:
Allocate space for the group array in a static credential used in
the quota code.  One case was correctly handled in r194498, but
this one was missed.

PR:		kern/138657
Tested by:	PR submitter
MFC after:	3 days
Approved by:	re@ (kib)
2009-09-24 21:32:56 +00:00
Stephane E. Potvin
0c6c8b3e8f MFC r197259
The buffer returned by fgetln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by:    marck@
Approved by:	re (kib)
2009-09-24 20:43:08 +00:00
Yoshihiro Takahashi
8b1e4172cb MFC: r197322 and r197374
Revision: 197322
  Log:
    Correct BIOS header sanitizing on pc98.

  Revision: 197374
  Log:
    Disable a check on a disk size because it's too strict.  This change is
    to avoid using incorrect geometry.

   It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.

   Reviewed by: rink

Approved by:	re (kib)
2009-09-24 15:34:18 +00:00
Attilio Rao
917c07ca1d MFC r197445:
Let fall down in the hard path (thus handling shared waiters wakeup
correctly) for the shared waiters also in the rwlock held in shared mode
as well, fixing possible deadlocks.

Please note that this is a special condition as we want this fix in
before RC2 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by:	re (kib)
2009-09-24 08:35:17 +00:00
John Baldwin
4e36c32793 MFC 197350:
Re-remove the IBM0057 ID used for PS/2 mouse controllers.  The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Approved by:	re (kensmith)
2009-09-23 15:56:09 +00:00
Konstantin Belousov
2c5f9fbe6a MFC r197348:
For a.out and pre-8 ELF binaries, allow the mmap of zero length.

Approved by:	re (kensmith)
2009-09-23 13:49:41 +00:00
Marius Strobl
24bf98b17b MFC: r197368
- Update the list of known-working machines based on feedback for 7.2.
- Update the V440 entry regarding added support for the on-board NICs
  in 8.0.

Approved by:	re (kib), blackend
2009-09-23 10:12:58 +00:00
Rui Paulo
d414bb00bb MFC 197190:
Make the sudden motion sensor work on older models and add a bit of
 debugging.

 Submitted by:	Christoph Langguth <christoph at rosenkeller.org>

Approved by:	re (kib)
2009-09-22 20:31:32 +00:00
Qing Li
8cb7f8f861 MFC r197364
A wrong variable is used when setting up the interface
address route, which broke source address selection in
some code paths.

Submitted by:	noted by bz
Reviewed by:	hrs
Approved by:	re (kib)
2009-09-20 17:46:56 +00:00
Andriy Gapon
1a7268649b MFC r197099: pci(4): don't perform maximum register number check
Different sub-kinds of PCI buses may have different rules and
thus it is up for the bus backends to do proper input checks.
For example, PCIe allows configuration register numbers < 0x1000,
while for PCI proper the limit is 0x100.
And, in fact, the buses already do the checks.

Reviewed by:	jhb
Approved by:	re (kib)
2009-09-19 08:13:10 +00:00
Nathan Whitehorn
3f12b2cdd4 MFC r197080
Add a few SCSI controllers to GENERIC that can be found in Powermacs.
This allows installation onto SCSI disks as shipped, for example,
as an option with the Powermac G3.

PR:		powerpc/138543
Reviewed by:	grehan
Approved by:	re (kib)
Obtained from:	sparc64
2009-09-19 01:49:36 +00:00
Nathan Whitehorn
ec46867105 MFC r196993
Remove some debugging (KTR_VERBOSE) that crept into ppc GENERIC long ago
and is present on no other architectures by default.

Reviewed by:	grehan
Approved by:	re (kib)
2009-09-19 01:48:12 +00:00
Kenneth D. Merry
43eb6aeda0 Merge change r197208 from head to stable/8:
Fix some instances where CAM rescans get hung up or take a long time to
complete.

Also, allow xpt_rescan() to rescan a LUN instead of a full bus.

Sponsored by:	Copan Systems, Inc.
Approved by:	re (kib)
2009-09-18 20:35:05 +00:00
Yoshihiro Takahashi
9febd63ce1 MFC: r197156
MFi386:

  Move the loader's entry point to 0x200000.  This change is also needed
  for pc98.

Approved by:	re (kensmith)
2009-09-17 14:12:21 +00:00
Ken Smith
5895f2dd9f Get ready for 8.0-RC1 builds.
Approved by:	re (implicit)
2009-09-17 14:05:06 +00:00
Bruce M Simpson
bfcfe77605 MFC revs 197129,197130,197132:
Fixes to mcast userland API.
--
  Fix an API issue in leave processing for IPv4 multicast groups.
   * Do not assume that the group lookup performed by imo_match_group()
     is valid when ifp is NULL in this case.
   * Instead, return EADDRNOTAVAIL if the ifp cannot be resolved for the
     membership we are being asked to leave.

  Caveat user:
   * The way IPv4 multicast memberships are implemented in the inpcb layer
     at the moment, has the side-effect that struct ip_moptions will
     still hold the membership, under the old ifp, until ip_freemoptions()
     is called for the parent inpcb.
   * The underlying issue is: the inpcb layer does not get notification
     of ifp being detached going away in a thread-safe manner.
     This is non-trivial to fix.
--
  Fix an obvious logic error in the IPv4 multicast leave processing,
  where the filter mode vector was not updated correctly after the leave.
--
  Tighten input checking in inp_join_group():
   * Don't try to use the source address, when its family is unspecified.
   * If we get a join without a source, on an existing inclusive
     mode group, this is an error, as it would change the filter mode.

  Fix a problem with the handling of in_mfilter for new memberships:
   * Do not rely on imf being NULL; it is explicitly initialized to a
     non-NULL pointer when constructing a membership.
   * Explicitly initialize *imf to EX mode when the source address
     is unspecified.
  This fixes a problem with in_mfilter slot recycling in the join path.
--
  Don't allow joins w/o source on an existing group.
  This is almost always pilot error.

  We don't need to check for group filter UNDEFINED state at t1,
  because we only ever allocate filters with their groups, so we
  unconditionally reject such calls with EINVAL.
  Trying to change the active filter mode w/o going through IP_MSFILTER
  is also disallowed.

  Deals with the case described in PR 137164 upfront, cumulative
  with the fix in svn rev 197132 which only calls imo_match_source()
  if the source address family was not unspecified.
--

Revision 197136 has a text conflict, however it is a comment only change.

PR:		137164, 138689, 138690, 138691
Submitted by:	Stef Walter (with fixups)
Approved by:	re (kib)
2009-09-17 13:41:59 +00:00
Andriy Gapon
04793894d4 MFC r197077: pci: remove definitions of duplicate constants
Suggested by:	jhb
Reviewed by:	jhb
Approved by:	re (kib)
2009-09-17 12:41:27 +00:00
Marko Zec
1fe6ff9267 MFC r197176:
Lock the ifnet list while iterating over it.

  Submitted by: julian
  MFC after:    3 days

Approved by:	re (kensmith)
2009-09-17 11:03:37 +00:00
Tim Kientzle
52bd177ff7 MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by:	re (kib)
2009-09-17 06:31:59 +00:00
Scott Long
24048b0cb3 Merge rev 197263:
- Enable MSI support (MSIX support was already present)
- Performance improvements

Approved by:	re
Obtained from:	Yahoo!
2009-09-17 05:30:55 +00:00
Scott Long
053351cec3 Merge r197260, r197261, r197262
- Prevent a panic on modern controllers by increasing CISS_MAX_PHYSTGT to 256
- Fix MSI and PERFORMANT interrupt programming.  Fixes hang on boot.
- Fix locking bugs in ioctl handler

Most of this has been soaking at Yahoo for several months, if not longer.  The
quick MFC is due to the impending 8.0-RC1 build.

Approved by:	re
Obtained from:	Yahoo!
2009-09-17 05:27:32 +00:00
Michael Tuexen
6b3c18a020 MFC 197257:
Fix a bug reported by Daniel Mentz:
When authenticating DATA chunks some DATA chunks
might get stuck when the MTU gets decreased via
an ICMP message.

Approved by: re, rrs (mentor)
2009-09-16 14:47:50 +00:00
Michael Tuexen
04a34c6c34 Fixes two bugs:
1) A lock issue, if we ever had to try again
   we would double lock the INP lock.
2) We were allowing (at wrap) associd 0... which really
   we cannot allow since 0 normally means in most socket
   API calls that we are wishing to effect something on
   the INP not TCB.

Approved by: re, rrs (mentor)
2009-09-16 13:44:12 +00:00
Konstantin Belousov
9f1fab5064 MFC r197049:
Calculate the amount of bytes to copy for select filedescriptor masks
taking into account size of fd_set for the current process ABI.

Approved by:	re (kensmith)
2009-09-16 13:24:37 +00:00
Rafal Jaworowski
e9667e8ff1 MFC r196531-196534,196536
Clean up Marvell platform code.

Introduce SheevaPlug support.

   - The device is based on Marvell 88F6281 system on chip.
   - More info about the platform at http://www.plugcomputer.org

   - To build the FreeBSD kernel:
     make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG

   - Installation notes at: http://wiki.freebsd.org/FreeBSDMarvell

Submitted by:	Michal Hajduk
Approved by:	re (kib)
Obtained from:	Semihalf
2009-09-16 12:07:58 +00:00
Qing Li
553a7dec4b MFC r197227
Self pointing routes are installed for configured interface addresses
and address aliases. After an interface is brought down and brought
back up again, those self pointing routes disappeared. This patch
ensures after an interface is brought back up, the loopback routes
are reinstalled properly.

Reviewed by:	bz
Approved by:	re
2009-09-15 22:46:06 +00:00
Qing Li
bb3b75e86f MFC r197225
This patch enables the node to respond to ARP requests for
configured proxy ARP entries.

Reviewed by:	bz
Approved by:	re
2009-09-15 22:37:17 +00:00