Commit Graph

149337 Commits

Author SHA1 Message Date
Julian Elischer
e181d489f6 MFC r196450
Add clarifications to the kproc and kthread manpages and link
   the kthread_create(9) man page to the kproc(9) page as it has migrated and
   people looking for it may need a hand to find its new name.

Approved by:	re (kib)
2009-09-04 07:13:07 +00:00
Weongyo Jeong
fa0dc8bb62 MFC r196809:
fix a TX issue on big endian machines like powerpc or sparc64.  Now
  zyd(4) should work on all architectures.

  Obtained from:	OpenBSD

Approved by:	re (kib)
2009-09-04 05:37:49 +00:00
John Baldwin
bf202eb1c6 MFC 196705 and 196707:
- Improve pmap_change_attr() on i386 so that it is able to demote a large
  (2/4MB) page into 4KB pages as needed.  This should be fairly rare in
  practice.
- Simplify pmap_change_attr() a bit:
  - Always calculate the cache bits instead of doing it on-demand.
  - Always set changed to TRUE rather than only doing it if it is false.

Approved by:	re (kib)
2009-09-03 13:54:58 +00:00
Bjoern A. Zeeb
5b628e0c26 MFC r196738:
In case an upper layer protocol tries to send a packet but the
  L2 code does not have the ethernet address for the destination
  within the broadcast domain in the table, we remember the
  original mbuf in `la_hold' in arpresolve() and send out a
  different packet with an arp request.
  In case there will be more upper layer packets to send we will
  free an earlier one held in `la_hold' and queue the new one.

  Once we get a packet in, with which we can perfect our arp table
  entry we send out the original 'on hold' packet, should there
  be any.
  Rather than continuing to process the packet that we received,
  we returned without freeing the packet that came in, which
  basically means that we leaked an mbuf for every arp request
  we sent.

  Rather than freeing the received packet and returning, continue
  to process the incoming arp packet as well.
  This should (a) improve some setups, also proxy-arp, in case it was an
  incoming arp request and (b) resembles the behaviour FreeBSD had
  from day 1, which alignes with RFC826 "Packet reception" (merge case).

  Rename 'm0' to 'hold' to make the code more understandable as
  well as diffable to earlier versions more easily.

  Handle the link-layer entry 'la' lock comepletely in the block
  where needed and release it as early as possible, rather than
  holding it longer, down to the end of the function.

  Found by:			pointyhat, ns1
  Bug hunting session with:	erwin, simon, rwatson
  Tested by:			simon on cluster machines
  Reviewed by:			ratson, kmacy, julian

Approved by:	re (kib)
2009-09-02 16:35:57 +00:00
Bjoern A. Zeeb
914e5afefd MFC r196653:
Make sure FreeBSD binaries without .note.ABI-tag section work
  correctly and do not match a colliding Debian GNU/kFreeBSD
  brandinfo statements.
  For this mark the Debian GNU/kFreeBSD brandinfo that it must have
  an .note.ABI-tag section and ignore the old EI_OSABI brandinfo
  when comparing a possibly colliding set of options.

  Due to SYSINIT we add the brandinfo in a non-deterministic order,
  so native FreeBSD is not always first. We may want to consider
  to force native FreeBSD to come first as well.

  The only way a problem could currently be noticed is when running an
  i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD
  brandinfo  was matched first,  as the fallback to ld-elf32.so.1 does
  not exist in that case.

Reported and tested by:	ticso
In collaboration with:	kib
MFC after:		3 days
Approved by:		re (rwatson)
2009-09-02 10:39:46 +00:00
Alfred Perlstein
42a66b539d MFC: r196489,196498
Critical USB bugfixes for 8.0

Approved by:    re
2009-09-02 02:12:07 +00:00
Jilles Tjoelker
33656b91cd MFC r196460
Fix the conformance of poll(2) for sockets after r195423 by
  returning POLLHUP instead of POLLIN for several cases. Now, the
  tools/regression/poll results for FreeBSD are closer to that of the
  Solaris and Linux.

  Also, improve the POSIX conformance by explicitely clearing POLLOUT
  when POLLHUP is reported in pollscan(), making the fix global.

  Submitted by:	bde
  Reviewed by:	rwatson

MFC r196556

  Fix poll() on half-closed sockets, while retaining POLLHUP for fifos.

  This reverts part of r196460, so that sockets only return POLLHUP if both
  directions are closed/error. Fifos get POLLHUP by closing the unused
  direction immediately after creating the sockets.

  The tools/regression/poll/*poll.c tests now pass except for two other
  things:
  - if POLLHUP is returned, POLLIN is always returned as well instead of
    only when there is data left in the buffer to be read
  - fifo old/new reader distinction does not work the way POSIX specs it

  Reviewed by:	kib, bde

MFC r196554

  Add some tests for poll(2)/shutdown(2) interaction.

Approved by:	re (kensmith)
2009-09-01 20:58:41 +00:00
Robert Noland
e2ba743711 MFC 196643
Swap the start/end virtual addresses in pmap_invalidate_cache_range().

This fixes the functionality on non SelfSnoop hardware.

Found by:	rnoland
Submitted by:	alc
Reviewed by:	kib
Approved by:	re (rwatson)
2009-09-01 16:41:28 +00:00
John Baldwin
8a503ad2c9 MFC 196637:
Mark the fake pages constructed by the OBJT_SG pager valid.  This was
accidentally lost at one point during the PAT development.  Without this
fix vm_pager_get_pages() was zeroing each of the pages.

Approved by:	re (kib)
2009-09-01 15:50:07 +00:00
Alexander Motin
be5b3af890 MFC r196657:
ATA_FLUSHCACHE is a 28bit format command, not 48.

MFC r196658:
Improve camcontrol ATA support:
 - Tune protocol version reporting,
 - Add supported DMA/PIO modes reporting.
 - Fix IDENTIFY request for ATAPI devices.
 - Remove confusing "-" for NCQ status.

MFC r196659:
Short ATA command format has 28bit address, not 36bit.
Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy.

Approved by:	re (ATA-CAM blanket)
2009-09-01 12:04:43 +00:00
Alexander Motin
84a08f606f MFC r196656, r196660:
Update ahci driver:
 - Add Command Completion Coalescing support.
 - Add SNTF support.
 - Add two more power management modes (4, 5), implemented on driver level.
 - Fix interface mode setting.
 - Reduce interface reset time.
 - Do not report meaningless protocol/transport versions.
 - Report CAP2 register content.
 - Some performance optimizations.

Approved by:	re (ATA-CAM blanket)
2009-09-01 11:44:30 +00:00
Alexander Motin
088705a89e MFC r196655:
Update siis driver:
 - Add SNTF support.
 - Do not report meaningless transport/protocol versions.

Approved by:	re (ATA-CAM blanket)
2009-09-01 11:13:31 +00:00
Marius Strobl
e4e5ed252d Add a temporary workaround which just lets init die instead of
causing a panic if it is killed due to a unsolved stack overflow
seen very late during shutdown on sparc64 when the gmirror worker
process exists, which is a regression introduced in 8.0.

Reviewed by:	kib
Approved by:	re (rwatson)
2009-08-31 19:16:58 +00:00
Jamie Gritton
f37b0a3db5 MFC r196592:
Fix a LOR between allprison_lock and vnode locks by releasing
  allprison_lock before releasing a prison's root vnode.

PR:		kern/138004
Reviewed by:	kib
Approved by:	re (rwatson), bz (mentor)
2009-08-31 14:13:45 +00:00
Colin Percival
ee1db5ae45 MFC r196558: Don't try to mmap the contents of empty files. This behaviour
was harmless prior to r195693, when mmap(2) changed from silently ignoring
requests for mapping zero bytes to returning EINVAL; this commit can be seen
as adjusting for the change in mmap(2) in order to make look(1) act like it
did previously.

Reviewed by:	jhb
Approved by:	re (kib)
2009-08-31 13:02:21 +00:00
Rui Paulo
de3a9cf126 MFC r196455:
Make dev.asmc.N.light.control writable by everyone.

Submitted by:	Patrick Lamaiziere <patfbsd at davenulle.org>
Approved by:	re (rwatson)
2009-08-31 12:25:04 +00:00
Marko Zec
962e75a763 MFC r196635:
Fix a few panics in linuxulator + VIMAGE due to curvnet not being set.

  This change affects only options VIMAGE builds.

  Reviewed by:  julian

Approved by:	re (rwatson)
2009-08-31 09:46:09 +00:00
Marko Zec
e9cedda843 MFC r196633:
Introduce a separate sx lock for protecting lists of vnet sysinit
  and sysuninit handlers.

  Previously, sx_vnet, which is a lock designated for protecting
  the vnet list, was (ab)used for protecting vnet sysinit / sysuninit
  handler lists as well.  Holding exclusively the sx_vnet lock while
  invoking sysinit and / or sysuninit handlers turned out to be
  problematic, since some of the handlers may attempt to wake up
  another thread and wait for it to walk over the vnet list, hence
  acquire a shared lock on sx_vnet, which in turn leads to a deadlock.
  Protecting vnet sysinit / sysuninit lists with a separate lock
  mitigates this issue, which was first observed with
  flowtable_flush() / flowtable_cleaner() in sys/net/flowtable.c.

  Reviewed by:  rwatson, jhb
  MFC after:    3 days

Approved by:	re (rwatson)
2009-08-31 09:44:07 +00:00
Konstantin Belousov
e179d138ba MFC r196560:
Honor the vfs.timestamp_precision sysctl settings for utimes(path, NULL)
and similar calls.

Approved by:	re (rwatson)
2009-08-31 09:08:14 +00:00
Qing Li
c7276c59ff As part of r196609, a call to "rtalloc" did not take the fib into
account. So call the appropriate "rtalloc_ign_fib()" instead of
calling "rtalloc_ign()".

Reviewed by:	pointed out by bz
Approved by:	re
2009-08-31 00:18:17 +00:00
Qing Li
87d2d9c556 MFC r196649
Prefix on-link verification is being performed on statically
configured prefixes. Since these statically configured prefixes
do not have any associated advertising routers, these prefixes
are treated as unreachable and those prefix routes are deleted
from the routing table. Therefore bypass prefixes that are not
learned from router advertisements during prefix on-link check.

Reviewed by:	hrs
Approved by:	re
2009-08-30 22:44:12 +00:00
Qing Li
ba3ae75b3c MFC r196609
In ip_output(), the flow-table module must not try to cache L2/L3
information for interface of IFF_POINTOPOINT or IFF_LOOPBACK type.
Since the L2 information (rt_lle) is invalid for these interface
types, accidental caching attempt will trigger panic when the invalid
rt_lle reference is accessed.

When installing a new route, or when updating an existing route, the
user supplied gateway address may be an interface address (this is
particularly true for point-to-point interface related modules such
as ppp, if_tun, if_gif). Currently the routing command handler always
set the RTF_GATEWAY flag if the gateway address is given as part of the
command paramters. Therefore the gateway address must be verified against
interface addresses or else the route would be treated as an indirect
route, thus making that route unusable.

Reviewed by:	kmacy, julian, rwatson
Approved by:	re
2009-08-30 22:42:32 +00:00
Qing Li
d84f95cd4a MFC r196608
Do not try to free the rt_lle entry of the cached route in
ip_output() if the cached route was not initialized from the
flow-table. The rt_lle entry is invalid unless it has been
initialized through the flow-table.

Reviewed by:	kmacy, rwatson
Approved by:	re
2009-08-30 22:39:49 +00:00
Qing Li
4090e9b219 MFC r196569
When multiple interfaces exist in the system, with each interface having
an IPv6 address assigned to it, and if an incoming packet received on
one interface has a packet destination address that belongs to another
interface, the routing table is consulted to determine how to reach this
packet destination. Since the packet destination is an interface address,
the route table will return a host route with the loopback interface as
rt_ifp. The input code must recognize this fact, instead of using the
loopback interface, the input code performs a search to find the right
interface that owns the given IPv6 address.

Reviewed by:	bz, gnn, kmacy
Approved by:	re
2009-08-30 22:36:46 +00:00
Doug Barton
72d5a535fa MFC 196478:
Prior to the dire warning about values of network_interfaces other than
AUTO the biggest mistake users made was leaving lo0 off the list. Since
lo0 is effectively mandatory, check for it and add it to the list if
it's not there.

MFC 196523:
Improve the case test to detect the presence of lo0 in the list of
network_interfaces.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>

Approved by:	re (kib)
2009-08-29 19:45:03 +00:00
Andrew Thompson
59fa5c955f MFC r196547
It is possible for all the kthreads to exit (hci modules unloaded) which in
 turn ends our usb process. This means the proc pointer becomes invalid and will
 panic if a new kthread is added. Count the number of threads and clear the proc
 pointer on the last one.

Approved by:	re (kib)
2009-08-29 15:42:06 +00:00
Simon L. B. Nielsen
eb2feeeeb9 MFC r196474:
Merge DTLS fixes from vendor-crypto/openssl/dist:

  - Fix memory consumption bug with "future epoch" DTLS records.
  - Fix fragment handling memory leak.
  - Do not access freed data structure.
  - Fix DTLS fragment bug - out-of-sequence message handling which could
    result in NULL pointer dereference in
    dtls1_process_out_of_seq_message().

  Note that this will not get FreeBSD Security Advisory as DTLS is
  experimental in OpenSSL.

  Security:	CVE-2009-1377 CVE-2009-1378 CVE-2009-1379 CVE-2009-1387

Approved by:	re (kib)
2009-08-29 15:21:50 +00:00
Brian Somers
6d2e2db1a9 MFC r196530: Document that ppp handles pipe(2) descriptors specially in
-direct mode.

Approved by:	re (kib)
2009-08-29 04:15:37 +00:00
Robert Watson
d6f7f21cac Merge r196559 from head to stable/8:
Add IFNET_HOLD reserved pointer value for the ifindex ifnet array,
  which allows an index to be reserved for an ifnet without making
  the ifnet available for management operations.  Use this in if_alloc()
  while the ifnet lock is released between initial index allocation and
  completion of ifnet initialization.

  Add ifindex_free() to centralize the implementation of releasing an
  ifindex value.  Use in if_free() and if_vmove(), as well as when
  releasing a held index in if_alloc().

  Reviewed by:  bz

Approved by:	re (kib)
2009-08-28 21:14:04 +00:00
Robert Watson
57d231bba6 Merge r196553 from head to stable/8:
Break out allocation of new ifindex values from if_alloc() and if_vmove(),
  and centralize in a single function ifindex_alloc().  Assert the
  IFNET_WLOCK, and add missing IFNET_WLOCK in if_alloc().  This does not
  close all known races in this code.

  Reviewed by:  bz

Approved by:	re (kib)
2009-08-28 21:12:38 +00:00
Robert Watson
a0021692f2 Merge r196535 from head to stable/8:
Use locks specific to the lltable code, rather than borrow the ifnet
  list/index locks, to protect link layer address tables.  This avoids
  lock order issues during interface teardown, but maintains the bug that
  sysctl copy routines may be called while a non-sleepable lock is held.

  Reviewed by:  bz, kmacy, qingli

Approved by:	re (kib)
2009-08-28 21:10:26 +00:00
Robert Watson
b569420afa Merge r196510 from head to stable/8:
Make if_grow static -- it's not used outside of if.c, and with the
  internals destined to change, it's better if it remains that way.

Approved by:	re (kib)
2009-08-28 21:07:43 +00:00
Max Laier
f2b31d1909 MFC r196551:
Fix argument ordering to memcpy as well as the size of the copy in the
  (theoretical) case that pfi_buffer_cnt should be greater than ~_max.

  Submitted by:	pjd
  Reviewed by:	{krw,sthen,markus}@openbsd.org

Approved by:	re (kib)
2009-08-28 20:26:00 +00:00
Robert Watson
1b257b0e92 Merge r196482 from head to stable/8:
Rather than using IFNET_RLOCK() when iterating over (and modifying) the
  ifnet list during if_ef load, directly acquire the ifnet_sxlock
  exclusively.  That way when if_alloc() recurses the lock, it's a write
  recursion rather than a read->write recursion.

  This code structure is arguably a bug, so add a comment indicating that
  this is the case.  Post-8.0, we should fix this, but this commit
  resolves panic-on-load for if_ef.

  Discussed with:       bz, julian
  Reported by:  phk

Approved by:	re (kib)
2009-08-28 20:07:38 +00:00
Robert Watson
3ef94f2b72 Merge r196481 from head to stable/8:
Rework global locks for interface list and index management, correcting
  several critical bugs, including race conditions and lock order issues:

  Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an
  sxlock.  Either can be held to stablize the lists and indexes, but both
  are required to write.  This allows the list to be held stable in both
  network interrupt contexts and sleepable user threads across sleeping
  memory allocations or device driver interactions.  As before, writes to
  the interface list must occur from sleepable contexts.

  Reviewed by:  bz, julian

Approved by:	re (kib)
2009-08-28 20:06:02 +00:00
Xin LI
c291f85f32 MFC r196525:
Consider flag == 0 as the same of flag == R_NEXT.  This change will restore
a historical behavior that has been changed by revision 190491, and has seen
to break exim.

Approved by:	re (kib)
2009-08-28 19:48:06 +00:00
Marko Zec
d6976e0558 MFC r196504:
When moving ifnets from one vnet to another, and the ifnet
  has ifaddresses of AF_LINK type which thus have an embedded
  if_index "backpointer", we must update that if_index backpointer
  to reflect the new if_index that our ifnet just got assigned.

  This change affects only options VIMAGE builds.

  Submitted by: bz
  Reviewed by:  bz
  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-28 19:18:20 +00:00
Marko Zec
61268392e1 MFC r196505:
When "jail -c vnet" request fails, the current code actually creates and
  leaves behind an orphaned vnet.  This change ensures that such vnets get
  released.

  This change affects only options VIMAGE builds.

  Submitted by: jamie
  Discussed with:       bz
  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-28 19:15:17 +00:00
Marko Zec
83864c810e MFC r196503:
Fix NFS panics with options VIMAGE kernels by apropriately setting curvnet
  context inside the RPC code.

  Temporarily set td's cred to mount's cred before calling socreate() via
  __rpc_nconf2socket().

  Submitted by: rmacklem (in part)
  Reviewed by:  rmacklem, rwatson
  Discussed with:       dfr, bz
  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-28 19:12:44 +00:00
Marko Zec
f04e871efc MFC r196502:
Introduce a div_destroy() function which takes over per-vnet cleanup tasks
  from the existing modevent / MOD_UNLOAD handler, and register div_destroy()
  in protosw as per-vnet .pr_destroy() handler for options VIMAGE builds.  In
  nooptions VIMAGE builds, div_destroy() will be invoked from the modevent
  handler, resulting in effectively identical operation as it was prior this
  change.  div_destroy() also tears down hashtables used by ipdivert, which
  were previously left behind on ipdivert kldunloads.

  For options VIMAGE builds only, temporarily disable kldunloading of ipdivert,
  because without introducing additional locking logic it is impossible to
  atomically check whether all ipdivert instances in all vnets are idle, and
  proceed with cleanup without opening a race window for a vnet to open an
  ipdivert socket while ipdivert tear-down is in progress.

  While here, staticize div_init(), because it is not used outside of
  ip_divert.c.

  In cooperation with:  julian
  Approved by:  re (rwatson), julian (mentor)

Approved by:	re (rwatson)
2009-08-28 19:10:58 +00:00
Marko Zec
939af5009a MFC r196501:
When registering a protocol to an existing protocol domain via
  pf_proto_register(), iterate over all existing vnets to call protosw_init()
  and thus the appropriate .pr_init() handler in the context of each vnet.
  NB in the future we probably want to separate pr_init() handlers into
  two, i.e. per-vnet and global, functions.

  This change has no impact on nooptions VIMAGE builds.

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

Approved by:	re (rwatson)
2009-08-28 19:08:56 +00:00
Pyun YongHyeon
180e7945c7 MFC r196517:
Don't try to power down PHY when alc(4) failed to map the device.
  This fixes system crash when mapping alc(4) device failed in device
  attach.

  Reported by:	Jim < stapleton.41 <> gmail DOT com >
Approved by:	re (kib)
2009-08-28 18:01:37 +00:00
Pyun YongHyeon
83b5def49a MFC r196516:
Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to
  the description of RTL8168D as RL_HWREV_8168D can be either
  RTL8168D or RTL8111D.

  PR:	kern/137672
Approved by:	re (kib)
2009-08-28 17:34:22 +00:00
Ed Schouten
2025af696e MFC r196508:
Our implementation of granpt(3) could be valid in the future.

  When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert
  Watson and I agreed the best way to implement this, would be to let
  posix_openpt() create a pseudo-terminal with proper permissions in place
  and let grantpt() and unlockpt() be no-ops.

  This isn't valid behaviour when looking at the spec. Because I thought
  it was an elegant solution, I filed a bug report at the Austin Group
  about this. In their last teleconference, they agreed on this subject.
  This means that future revisions of POSIX may allow grantpt() and
  unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation
  has such a device) and posix_openpt() already do the right thing.

  I'd rather put this in the manpage, because simply mentioning we don't
  comply to any standard makes it look worse than it is. Right now we
  don't, but at least we took care of it.

  Approved by:  re (kib)
2009-08-28 10:25:26 +00:00
Doug Barton
4bff593a8c MFC 196589:
In the loop through the list of interfaces in network6_interface_setup()
rtsol_interface gets reset to "yes" each time through the loop, but
rtsol_available does not. If a user has lo0 first in their list of
interfaces rtsol_available will get set to "no" the first time through
the loop and subsequent interfaces will not get rtsol'ed when they should.

Therefore change the conditional for the is_wired() test to _interface.

Approved by:	re (kib)
2009-08-27 17:53:25 +00:00
Bjoern A. Zeeb
ac63e409c2 MFC r196512:
Fix handling of .note.ABI-tag section for GNU systems [1].
  Handle GNU/Linux according to LSB Core Specification 4.0,
  Chapter 11. Object Format, 11.8. ABI note tag.

  Also check the first word of desc, not only name, according to
  glibc abi-tags specification to distinguish between Linux and
  kFreeBSD.

  Add explicit handling for Debian GNU/kFreeBSD, which runs
  on our kernels as well [2].

  In {amd64,i386}/trap.c, when checking osrel of the current process,
  also check the ABI to not change the signal behaviour for Linux
  binary processes, now that we save an osrel version for all three
  from the lists above in struct proc [2].

  These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
  and Linux binaries on the same machine again for at least i386 and
  amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).

PR:		kern/135468
Submitted by:	dchagin [1] (initial patch)
Suggested by:	kib [2]
Tested by:	Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by:	kib
Approved by:	re (kensmith)
2009-08-27 17:34:13 +00:00
John Baldwin
6f0ccdbcb3 MFC 196522:
Invoke the recently added mm-mtree.sh release script to store a pre-built
mergemaster mtree database in the 'base' dist.

Approved by:	re (kib)
2009-08-27 17:25:58 +00:00
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