Commit Graph

149490 Commits

Author SHA1 Message Date
John Baldwin
862ab0643e MFC 196521:
Fix a few issues with the lib32 dist so that it includes ldd32.
- Use a better find invocation to purge empty directories from all the dist
  trees during a release build.  The previous version did not purge
  directories whose contents were all empty directories.
- Explicitly blacklist a few files from the lib32 dist instead of using a
  whitelist.  A better longterm solution is to fix the few offenders to not
  install data files during a lib32 install.

Approved by:	re (kib)
2009-08-27 17:16:23 +00:00
John Baldwin
953e1b6c8d MFC 196520:
Tweak the way that the ACPI and ISA bus drivers match hint devices to
BIOS-enumerated devices:
- Assume a device is a match if the memory and I/O ports match even if the
  IRQ or DRQ is wrong or missing.  Some BIOSes don't include an IRQ for
  the atrtc device for example.
- Add a hack to better match floppy controller devices.  Many BIOSes do not
  include the starting port of the floppy controller listed in the hints
  (0x3f0) in the resources for the device.  So far, however, all the BIOS
  variations encountered do include the 'port + 2' resource (0x3f2), so
  adjust the matching for "fdc" devices to look for 'port + 2'.

Approved by:	re (kib)
2009-08-27 16:34:04 +00:00
Brian Somers
61a651a452 MFC: When ``ppp -direct'' is invoked by a program that uses pipe(2) to
create stdin and stdout, don't blindly try to use stdin as a bi-directional
     channel.  Instead, detect the pipe and set up a special exec handler
     that indirects write() calls through stdout.

     This fixes the problem where ``set device "!ssh -e none host ppp
     -direct label"'' no longer works with an openssh-5.2 server side as
     that version of openssh ignores the USE_PIPES config setting and
     *always* uses pipes (rather than socketpair) for stdin/stdout channels.

Approved by:	re (kib)
2009-08-27 07:07:38 +00:00
Brian Somers
ff550a99bd MFC: When realloc()ing device memory for transfer to another ppp process,
don't continue to use the realloc()d pointer - it might have changed!

     Remove some stray diagnostics while I'm here.

Approved by:	re (kib)
2009-08-27 07:05:46 +00:00
Doug Barton
818b5b0e2a MFC r196435:
The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the
script do not make use of that information. So restrict execution
of the svnversion-related code to the kernel build context.

Approved by:	re (kib)
2009-08-26 22:32:14 +00:00
Doug Barton
0c4ef85bfd MFC 196436;
Move is_wired_interface() from rc.d/wpa_supplicant into network.subr,
simplify it a bit, and make use of that method to determine if an
interface is a candidate for IPv6 rtsol rather than listing all of the
possible wireless interfaces that should _not_ get rtsol'ed.

This change is only relevant for 8.0+ unless the "wlan mandatory" code
gets ported back to RELENG_7.

Approved by:	re (kib)
2009-08-26 21:08:41 +00:00
Doug Barton
215f7aba49 MFC 196434:
Add a script to create the /var/db/mergemaster.mtree file for new
releases so that when users subsequently update their source trees
they can make use of mergemaster's -U option.

Approved by:	re (kib)
2009-08-26 20:57:21 +00:00
Ken Smith
48b89c5962 Update the comment for RELENG_8 too.
Submitted by:	Dmitry Morozovsky <marck at rinet dot ru>
Approved by:	re (implicit)
2009-08-24 03:49:37 +00:00
Sam Leffler
f9906ce770 MFC r196472:
Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly
  for it's unix domain socket.  Before this change wpa_cli would take
  the first file in the directory that was not "." or "..".

Approved by:	re (rwatson)
2009-08-23 16:21:49 +00:00
Ken Smith
b9a4add986 Update for RELENG_8.
Reminded by:	dougb
Approved by:	re (implicit)
2009-08-23 06:33:42 +00:00
Ken Smith
bf6ab6cb36 Ready for 8.0-BETA3 builds.
Approved by:	re (implicit)
2009-08-21 17:40:24 +00:00
Julian Elischer
f8f0b70474 MFC r196423
Fix ipfw's initialization functions to get the correct order of evaluation
  to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c
  to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers
  instead of the modevent handler. Correct some spelling errors in comments
  in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when
  ipfw is unloaded.

  This patch is a minimal patch for 8.0
  I have a much larger patch that actually fixes the underlying problems
  that will be applied after 8.0

Reviewed by:	zec@, rwatson@, bz@(earlier version)
Approved by:	re (rwatson)
2009-08-21 11:23:29 +00:00
Marko Zec
28444b1ffd MFC r196421:
Bugfix: all requests for creating vnets via vimage -c were always
  reported as failures, even if the actual library / system call
  would succeed, because error message would be reported if the return
  value from jail_setv() call was >= 0, and if not, then if that same
  value was < 0, i.e. always.  The correct behavior is to abort (only)
  if jail_setv() returns < 0.

  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-21 11:17:25 +00:00
Julian Elischer
1261248008 MFC r196419:
Don't allow access to the internals until it has all been set up.
  Specifically, not until the per-vnet parts have been set up.

Submitted by:	kmacy@
Reviewed by:	julian@, zec@
Approved by:	re(rwatson)
2009-08-21 10:05:26 +00:00
John Baldwin
18fb1e9a44 MFC 196417:
This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
  leaving the new list empty.
- Properly compute the amount of data added to an sglist via
  _sglist_append_buf().  This allows sglist_consume_uio() to properly update
  uio_resid.
- When a request to append an address range to a scatter/gather list fails,
  restore the sglist to the state it had at the start of the function call
  instead of resetting it to an empty list.

Approved by:	re (kib)
2009-08-21 03:14:39 +00:00
Ken Smith
31b3c66986 MFC r196415:
Fix a boot hang for hptrr(4) caused by changes introduced in r195534.
It is necessary to make sure cpi->transport is set for xpt_scan_bus() to
work properly.

Submitted by: Bernhard Schmidt (scb+freebsd-current <at> techwires
              <dot> net)
Reviewed by:  scottl
Approved by:  re (kib)
2009-08-21 01:12:06 +00:00
Peter Wemm
21f6a3982f MFC rev 196410 - deal with 'ticks' going negative after 24 days of uptime
with the default 1000hz clock in the timewait expiration code.

Approved by:    re (kensmith)
2009-08-20 23:07:53 +00:00
Jung-uk Kim
1cc36da966 MFC: r196412
Check whether the SMBIOS reports reasonable amount of memory.  If it is
less than "avail memory", fall back to Maxmem to avoid user confusion.
We use SMBIOS information to display "real memory" since r190599 but
some broken SMBIOS implementation reported only half of actual memory.

Tested by:	bz
Approved by:	re (kib)
2009-08-20 23:04:21 +00:00
Marko Zec
c9482dbb72 MFC r196409:
vimage(8) is a legacy CLI interface for managing jails associated with
  network stack instances, which is provided for compatibility with
  older applications.  This change brings it back to life in a followup
  to the initial conversion of vimage to use the new jail(4)
  userland-kernel API:

  - when creating vimages via "vimage -c", by default turn on a few
  options expected by legacy applications, such as allow operations on
  raw sockets, FS mounts etc, and allow jail-related parameters to be
  optionally configured.

  - introduce the "-m" modifier which allows for configuring jail
  parameters of existing vimages / vnet-jails.

  - make "vimage name command ..." actually work.

  - when reassigning ifnets to vnets using "vimage -i", attempt to rename
  the ifnet as "ethXXX" on arrival in the target vnet.  Several legacy
  applications are known to depend heavily on such behavior.

  - vimage -l lists only jails associated with vnets.  The output is
  sorted using vimage / jail names as keys.

  - vimage -l by default searches only the current level in the jail
  hierarchy.  Recursive listing can be requested via -r switch.

  - vimage -l by default prints only jail names on each line, making
  such output suitable for pipelining to other commands.  More verbose
  output can be obtained via -v switch, and even more jail specific
  information will be displayed if -j switch is turned on.

  - there's no need to build vimage as statically linked, so update the
  Makefile accordingly.

  - update the vimage.8 man page.

  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-20 22:56:29 +00:00
Robert Watson
708b471c4b Merge r196267 from head to stable/8:
Rather than fix questionable ifnet list locking in the implementation of
  the kern.polling.enable sysctl, remove the sysctl.  It has been deprecated
  since FreeBSD 6 in favour of per-ifnet polling flags.

  Reviewed by:	luigi

Approved by:	re (kib)
2009-08-20 21:29:49 +00:00
Robert Watson
aeba9e80ff Merge r196263 from head to stable/8:
Remove unused if_rawoutput() macro; it has been unused since at least
  FreeBSD 2.

Approved by:	re (kib)
2009-08-20 21:14:52 +00:00
John Baldwin
5c91164df2 MFC 196404:
Change the 'resid' parameter to sglist_consume_uio() from an int to a
size_t to match the recent type change of the uio_resid member of struct
uio.

Approved by:	re (kib)
2009-08-20 20:53:36 +00:00
John Baldwin
247db0748a MFC 196403: Temporarily revert the new-bus locking for 8.0 release.
Approved by:	re (kib)
2009-08-20 20:23:28 +00:00
Andriy Gapon
2c68e2fb1e MFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit long
This affects only fstat on zfs and devfs, only on 64-bit systems
and only when fsid is greater than 2^31 - 1.
When fstat examines a file via stat(2) it takes uint32_t st_dev
and assigns to (signed) (64-bit) long fsid, this results in
a positive value.
When fstat examines opened files it takes int32_t f_fsid.val[0]
and assigns to (signed) (64-bit) long fsid, this results in
a negative value.
So, while initially st_dev and f_fsid.val[0] have the same bit
values they get promoted to different 64-bit values because
of the signed-vs-unsigned difference.

A fix is to use "more natural" positive numbers by introducing
intermediate unsigned cast for f_fsid.val[0].

Reviewed by:    jhb, lulf
Approved by:    re (kib)
MFC after:      1 week (to stable/7)
2009-08-20 11:04:31 +00:00
Will Andrews
566abe95b2 MFC r196397 from head:
Fix CARP memory leaks on carp_if's malloc'd using M_CARP.  This occurs when
  CARP tries to free them using M_IFADDR after the last address for a virtual
  host is removed and when detaching from the parent interface.

Approved by:	re (kib), ken (mentor)
2009-08-20 02:49:43 +00:00
Pawel Jakub Dawidek
8844a10730 MFC r196395:
Our libc doesn't implement control method for XDR (only kernel does) and it
will always return failure. Fix this by bringing userland implementation of
xdrmem_control() back. This allow 'zpool import' to work again.

Reported by:	Thomas Backman <serenity@exscape.org>
Reviewed by:	kmacy
Approved by:	re (kib)
2009-08-20 00:08:58 +00:00
Simon L. B. Nielsen
452e49d601 MFC 196392:
Add support for backing up the old kernel when installing a new kernel
  using freebsd-update.  This applies to using freebsd-update in "upgrade
  mode" and normal freebsd-update on a security branch.

  The backup kernel will be written to /boot/kernel.old, if the directory
  does not exist, or the directory was created by freebsd-update in a
  previous backup.  Otherwise freebsd-update will generate a new directory
  name for use by the backup.  By default symbol files are not backed up
  to save diskspace and avoid filling up the root partition.

  This feature is fully configurable in the freebsd-update config file,
  but defaults to enabled.

  Reviewed by:	cperciva

Approved by:	re (kib)
2009-08-19 21:01:32 +00:00
Ed Schouten
f0c46a48f7 MFC r196390:
Make the MacBookPro3,1 hardware boot again.

  Tested by:    Patrick Lamaiziere <patfbsd davenulle org>
  Approved by:  re (kib)
2009-08-19 20:44:22 +00:00
Kip Macy
786f829ddb This change fixes a comment and addresses a complaint by kib@ by
moving a frequently executed flowtable syslog statement from being
 conditional on bootverbose to conditional on a per-vnet flowtable
 sysctl.

Approved by:	re@
2009-08-19 20:17:36 +00:00
Xin LI
67a435347b MFC r196386:
Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
Without this changeset there will be no way to prevent these NICs from
sending ARP, which is harmful in server farms that is configured as
"Direct Server Return" behind a load balancer.

A better fix would remove the whole hack completely but it would be
later than 8.0-RELEASE.

Reviewed by:	jfv, yongari
Approved by:	re (kib)
2009-08-19 18:08:50 +00:00
John Baldwin
46208d409c MFC 196382:
Explicitly line up the CPU state labels with the calculated starting column
that takes into account the width of the largest CPU ID.  On systems with
> 10 CPUs the labels for the first 10 CPUs were not lined up properly
otherwise.

Approved by:	re (kib)
2009-08-19 17:45:58 +00:00
Marcel Moolenaar
9fdef7744d MFC change 196383:
Remove the dependency on the kernel -- in particular the gctl request to
 the GEOM_BSD class -- to translate the absolute offsets in the label to
 relative ones. This makes bslabel(8) work correctly with GEOM_PART and
 also when the BSD label is nested under arbitrary partitioning schemes.

Inspired by:	Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by:	re (kib)
2009-08-19 16:40:45 +00:00
Rafal Jaworowski
49d96dc6dd MFC r196380
Fix USB cache sync operations for platforms with non-coherent DMA.

- usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
  so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
  cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
  the low level bus dma sync operation is implementation dependent and we
  cannot assume the required order of operations to be guaranteed.

- usb_pc_cpu_flush() is called before writing to a device, so
  BUS_DMASYNC_PREWRITE should be used.

Submitted by:	Grzegorz Bernacki
Reviewed by:	HPS, arm@, usb@ ML
Tested by:	HPS, Mike Tancsa
Approved by:	re (kib)
Obtained from:	Semihalf
2009-08-19 14:48:59 +00:00
Ed Schouten
e047c5fbb6 MFC r196378:
Small changes to the warning message generated by pty(4):

  - Only print the warning once, instead of filling up the screen.
  - Use the word "legacy" for the pty_warningcnt description, to prevent
    confusion.
  - Use log() instead of printf().

  Discussed with: rwatson, jhb
  Approved by:    re (kib)
2009-08-19 14:38:43 +00:00
Michael Tuexen
d51d92a789 Fix a bug in the handling of unreliable messages which
results in stalled associations.

Approved by: re, rrs (mentor)
2009-08-19 12:12:51 +00:00
Edwin Groothuis
a0f9adc732 - Make note of the update of tzdata from 2008h to 2009j
- Make note of the update of tzcode from 2004a to 2009h
  Add an extra alert that people who update via source or via
  freebsd-update will have to run the tzsetup(8) utility.

Approved by:	re (Kostik)
2009-08-19 03:58:12 +00:00
Max Laier
0e7983d1f6 MFC r196372:
If we cannot immediately get the pf_consistency_lock in the purge thread,
  restart the scan after acquiring the lock the hard way.  Otherwise we
  might end up with a dead reference.

Approved by:	re (kib)
2009-08-19 00:17:00 +00:00
Stanislav Sedov
1daebacca0 - MFC r196370.
Do not try to reevaluate current RX production index on each
  loop iteration as it can be updated by the card while we
  process the RX ring forcing us to process RX descriptors
  for which DMA synchronisation operation has not been
  performed.  This fixes the bug when bge(4) drops packets
  under high load.

Discussed with:	yongari, marius
Approved by:	re (kib)
2009-08-18 21:13:00 +00:00
Kip Macy
670151d0e4 MFC 196368
- change the interface to flowtable_lookup so that we don't rely on
    the mbuf for obtaining the fib index
  - check that a cached flow corresponds to the same fib index as the
    packet for which we are doing the lookup
  - at interface detach time flush any flows referencing stale rtentrys
    associated with the interface that is going away (fixes reported
    panics)
  - reduce the time between cleans in case the cleaner is running at
    the time the eventhandler is called and the wakeup is missed less
    time will elapse before the eventhandler returns
  - separate per-vnet initialization from global initialization
    (pointed out by jeli@)

Reviewed by:	sam@
Approved by:	re@
2009-08-18 20:39:35 +00:00
Pyun YongHyeon
f8fb3cc00e MFC r196366:
Backout r193289. r193289 restored page select bits to previous
  value instead of blindly resetting it to 0. However, it seems page
  select bits of some 88E1116 PHY is initialized to invalid one such
  that restoring page select bits after programming broke MII
  register access. The correct solution would be reset page select
  bits to 0 in PHY attach stage but it would require more testing.
  Since we're in BETA stage such a change would be dangerous so just
  back it out.
  This change should fix nfe(4) breakage on NVIDIA MCP55.

  Reported by:	Ryan Rogers < webmaster <> doghouserepair dot com >
		Sam Fourman Jr. < sfourman <> gmail dot com >
  Tested by:	Ryan Rogers < webmaster <> doghouserepair dot com >
		Sam Fourman Jr. < sfourman <> gmail dot com >
  Approved by:	re (kib)
2009-08-18 20:25:02 +00:00
Michael Tuexen
3da1fd00cf Fix a panic when using one-to-one style sockets in non-blocking
mode and there is no listening server.
PR: 137795
Approved by: re, rrs (mentor)
2009-08-18 20:06:00 +00:00
Pawel Jakub Dawidek
65536ad653 MFC r196358:
Remove unused taskqueue_find() function.

Reviewed by:	dfr
Approved by:	re (kib)
2009-08-18 14:00:25 +00:00
Tom Rhodes
856d08a08d MFC rev 196356:
Document MAKE_DVD and xref svn in ports.

  Approved by:	re@ (kib)
2009-08-18 13:51:51 +00:00
Alexander Motin
382c5c0df4 Fix copy/paste bug, that requests data read during ATA device probe sequence
for ATA_SETFEATURES/ATA_SF_SETXFER command which by definition transfers no
data. Most of controllers are irrelevant to this bug, but some nVidia's
doesn't.

Tested on:      current@
Approved by:    re (kib)
2009-08-18 09:36:25 +00:00
Alexander Motin
a7f9e24d61 MFC r196352:
Fix iSCSI initiator and vpo driver operation, broken by CAM changes.

Reviewed by:	scottl, Danny Braniss
Approved by:	re (rwatson)
2009-08-18 09:31:00 +00:00
Kip Macy
bf4e402b83 fix netboot issue by disabling flowtable lookups until initialization has been run
+ mergeinfo garbage

Reviewed by:	rwatson@
Approved by:	re@
2009-08-17 20:06:00 +00:00
Rick Macklem
8d3f6febcd MFC r196332:
Apply the same patch as r196205 for nfs_upgrade_lock() and
nfs_downgrade_lock() to the experimental nfs client.

Approved by:	re (kensmith), kib (mentor)
2009-08-17 18:11:50 +00:00
John Baldwin
84dbe0452d MFC 196337: Document the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH
variables.

Approved by:	re (kib)
2009-08-17 17:13:17 +00:00
Attilio Rao
7e2d0af9e0 MFC r196334:
* Change the scope of the ASSERT_ATOMIC_LOAD() from a generic check to
  a pointer-fetching specific operation check. Consequently, rename the
  operation ASSERT_ATOMIC_LOAD_PTR().
* Fix the implementation of ASSERT_ATOMIC_LOAD_PTR() by checking
  directly alignment on the word boundry, for all the given specific
  architectures. That's a bit too strict for some common case, but it
  assures safety.
* Add a comment explaining the scope of the macro
* Add a new stub in the lockmgr specific implementation

Tested by: marcel (initial version), marius
Reviewed by: rwatson, jhb (comment specific review)
Approved by: re (kib)
2009-08-17 16:33:53 +00:00
Marcel Moolenaar
87b51e539d MFC rev 196333:
The start of the EFI GPT partition in the PMBR can always be represented
by CHS addressing. Don't define these fields as 0xff, but rather define
them correctly. This prevents boot problems on PCs where GPT is being
used.

PR:             115406
Submitted by:   Kent Hauser <kent@khauser.net>
Approved by:    re (kib)
2009-08-17 16:24:50 +00:00