Commit Graph

150123 Commits

Author SHA1 Message Date
Christian Brueffer
4d672d94c1 MFC: r197900
Improved one-line description of this module (taken from NOTES).
2009-12-07 08:36:49 +00:00
Hiroki Sato
3cec660ea4 MFC:
r197139
- Add afexists() to check if the specified address family exists
  on the system or not.

r197697
- Add AF_IPX and AF_NATM to afexists().
2009-12-07 07:41:29 +00:00
Michael Tuexen
cf19fced17 MFC 197288,197326,197327,197328,197342,197914,197929,
197955,199365,199370,199371,199373,199866
This MFCs all SCTP/VNET relevant fixes from head.

Approved by: rrs (mentor)
2009-12-07 07:33:51 +00:00
Hiroki Sato
a1c3a99ce5 MFC:
r197144:
- Add an extension of set_rcvar(), a new function set_rcvar_obsolete(),
  and $desc.

  The set_rcvar_obsolete() is to mark a variable as obsolete and define
  the new one.  More specifically, a warning is displayed when
  a variable is removed or changed in the source tree and the user
  still defines the old one.
2009-12-07 06:25:19 +00:00
Hiroki Sato
28769e8539 MFC:
r197138:
- The ifconfig(8) command now supports NDP flags which are handled by ndp(8).

r198006:
- Use printb() to display the "nd6 options=" line.
2009-12-07 06:05:36 +00:00
Jilles Tjoelker
2ffbb2cea1 MFC r198406: wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
2009-12-06 22:14:58 +00:00
Jilles Tjoelker
7635c69726 MFC r198963: sh: Fix memory leak when using a variable in arithmetic
like $((x)).
2009-12-06 22:01:45 +00:00
Edwin Groothuis
0b1ab65e97 MFC of r199642
The output of perror(1) is now showing local messages for locales
supported by libc/nls

PR:             bin/140499
Approved by:    gnn@
2009-12-06 21:07:47 +00:00
Luigi Rizzo
3a5ce93470 mfc r200056
use qsort_r instead of heapsort;
  staticize two functions.
2009-12-06 19:01:33 +00:00
Bjoern A. Zeeb
bba81f6fbd MFC r198467:
Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets
  no matter whether we are compiled as module or if our default of the
  net.inet6.ip6.v6only sysctl already matches what we would set.

  This avoids unnecessary complications with modules, VIMAGES, INET6 and
  the sysctl value, especially considering that most users will use
  linux compat as a module.

  Discussed with:       kib, rwatson (weeks ago)
  Reviewed by:  rwatson
2009-12-06 09:36:11 +00:00
Navdeep Parhar
1dc03a9fc5 MFC r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

(missed this one in r200175)
2009-12-06 01:59:06 +00:00
Navdeep Parhar
3b3920bc3c MFC r199237, r199238, r199239, r199240, r200003
r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

r199238:
Make sure *some* edc is setup even for an unknown transceiver (assume
it is optical).

r199239:
The 10GBASE-T card should use an IPG of 1.  Also enable the check
for low power startup on this card.

r199240:
Don't disable the XGMAC's tx on ifconfig down.  It is unnecessary
and can cause false backpressure in the chip.  Fix a us/ms mixup
while here.

r200003:
T3 firmware 7.8.0 for cxgb(4)
2009-12-06 01:45:55 +00:00
Bjoern A. Zeeb
c4de0a57f3 MFC r197729:
Make sure that the primary native brandinfo always gets added
  first and the native ia32 compat as middle (before other things).
  o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
  stays on SI_ORDER_ANY coming last.

  The reason for this is only to make sure that even in case we would
  overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
  would still be there and the system would be operational.

Reviewed by:	kib
2009-12-05 20:43:15 +00:00
Bjoern A. Zeeb
8cb7f89dbb MFC r197726:
Print a warning in case we cannot add more brandinfo because
  we would overflow the MAX_BRANDS sized array.

Reviewed by:	kib
2009-12-05 20:40:28 +00:00
Bjoern A. Zeeb
a1778929b7 MFC r197518:
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
  devices that we also support, just not by default (thus only LINT or
  module builds by default).

  While currently there is only "/dev/full" [2], we are planning to see more
  in the future.  We may decide to change the module/dependency logic in the
  future should the list grow too long.

  This is not part of linux.ko as also non-linux binaries like kFreeBSD
  userland or ports can make use of this as well.

Suggested by:	rwatson [1] (name)
Submitted by:	ed [2]
Discussed with:	markm, ed, rwatson, kib (weeks ago)
Reviewed by:	rwatson, brueffer (prev. version)
PR:		kern/68961
2009-12-05 20:37:46 +00:00
Bjoern A. Zeeb
b4e227f473 MFC r198050:
Compare pointer to NULL rather than 0.
2009-12-05 19:44:16 +00:00
Bjoern A. Zeeb
4fe9cf96e9 MFC r198076:
Explicitly compare to a return code.

  Discussed with: philip (after we both misread the logic there the 1st time)
2009-12-05 19:42:42 +00:00
Bjoern A. Zeeb
3b558c96ce MFC r199947, 199950:
Enable IPcomp by default.

PR:	kern/123587
2009-12-05 19:25:29 +00:00
Bjoern A. Zeeb
87d7d0abb5 MFC r199946:
Add more statistics variables for IPcomp.

  Try to version the struct in a backward compatible way.
  People asked for the versioning of the stats structs in general before.

Note: old netstat binaries, as only consumer, continue to work as they are
      still using kvm but will not display the new stats. [1]

Discussed with:	rwatson [1]
2009-12-05 19:21:58 +00:00
Bjoern A. Zeeb
e55ea9c811 MFC r199906:
In case the compression result is the same size as the orignal version,
  the compression was useless as well.  Make sure to not update the data
  and return, else we would waste resources when decompressing.

  This also avoids the copyback() changing data other consumers like
  xform_ipcomp.c would have ignored because of no win and sent out without
  noting that compression was used, resulting in invalid packets at the
  receiver.
2009-12-05 19:12:35 +00:00
Bjoern A. Zeeb
99808bdf69 MFC r199905:
Assimilate very similar input and output code paths
  (no real functional change).
2009-12-05 19:11:02 +00:00
Bjoern A. Zeeb
d0b0b1b85a MFC r199904:
Add SDT iter probes forgotten in r199885 (r200138 for stable/8).
2009-12-05 19:09:26 +00:00
Bjoern A. Zeeb
0b845b9322 MFC r199899:
Only add the IPcomp header if crypto reported success and we have a lower
  payload size.  Before we had always added the header, no matter if we
  actually send out compressed data or not.

  With this, after the opencrypto/deflate changes, IPcomp starts to work
  apart from edge cases.  Leave it disabled by default until those are
  fixed as well.

PR:	kern/123587
2009-12-05 19:07:28 +00:00
Bjoern A. Zeeb
bc05a8e020 MFC r199897:
Remove whitespace.
2009-12-05 19:06:03 +00:00
Bjoern A. Zeeb
eee2ee2ac7 MFC r199896:
Directly send data uncompressed if the packet payload size is lower than
  the compression algorithm threshold.
2009-12-05 19:03:20 +00:00
Bjoern A. Zeeb
8d6960d085 MFC r199895:
Change memory managment from a fixed size array to a list.
  This is needed to avoid running into out of buffer situations
  where we cannot alloc a new buffer because we hit the array size
  limit (ZBUF).
  Use a combined allocation for the struct and the actual data buffer
  to not increase the number of malloc calls. [1]

  Defer initialization of zbuf until we actually need it.

  Make sure the output buffer will be large enough in all cases.

  Details discussed with: kib [1]
  Reviewed by:            kib [1]
2009-12-05 19:01:50 +00:00
Bjoern A. Zeeb
7a955dbf6b MFC r199887:
Z_PARTIAL_FLUSH is marked deprecated. Z_SYNC_FLUSH is the suggested
  replacement but only use it for inflate. For deflate use Z_FINISH
  as Z_SYNC_FLUSH adds a trailing marker in some cases that inflate(),
  despite the comment in zlib, does npt seem to cope well with, resulting
  in errors when uncompressing exactly fills the outbut buffer without
  a Z_STREAM_END and a successive call returns an error.
2009-12-05 18:59:58 +00:00
Bjoern A. Zeeb
5aef8fdf11 MFC r199885:
Add SDT probes for opencrypto:deflate:deflate_gobal:*.
  They are not nice but they were helpful.
2009-12-05 18:57:32 +00:00
Bjoern A. Zeeb
c8ce7b587b MFC r199884:
Define an SDT provider for "opencrypto".
2009-12-05 18:55:54 +00:00
Bjoern A. Zeeb
4cc7ec3500 MFC r199883:
Add SDT_PROBE[1-5] in the same way we have SDT_PROBE_DEFINE[1-5] to
  avoid having to add all the unused trailing arguments as zeros.
2009-12-05 18:54:21 +00:00
Bjoern A. Zeeb
cc8eb5c3a4 MFC r199894:
Correct a typo.
2009-12-05 18:17:15 +00:00
Ed Maste
4816ae8d04 MFC r200001:
Fix parenthesis typo -- copy full frame pointer for userland callchain,
  not just one byte.

Submitted by:        Ryan Stone      rysto32 at gmail dot com
2009-12-05 17:07:43 +00:00
Luigi Rizzo
3cdcbc4885 some simple MFC:
r200020:
  change the type of the opcode from enum *:8  to u_int8_t
  so the size and alignment of the ipfw_insn is not compiler dependent.
  No changes in the code generated by gcc.

r200023:
  Add new sockopt names for ipfw and dummynet.

  This commit is just grabbing entries for the new names
  that will be used in the future, so you don't need to
  rebuild anything now.

r200034
  Dispatch sockopt calls to ipfw and dummynet
  using the new option numbers, IP_FW3 and IP_DUMMYNET3.
  Right now the modules return an error if called with those arguments
  so there is no danger of unwanted behaviour.

r200040
  - initialize src_ip in the main loop to prevent a compiler warning
    (gcc 4.x under linux, not sure how real is the complaint).
  - rename a macro argument to prevent name clashes.
  -  add the macro name on a couple of #endif
  - add a blank line for readability.
2009-12-05 12:51:51 +00:00
Alexander Motin
c0afc53a8f MFC r200008:
Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.
It is not needed for SATA controllers, but required for PATA.
2009-12-05 08:44:55 +00:00
Marcel Moolenaar
fa0b65d151 Revert unintentional change in revision 200103. 2009-12-04 18:35:02 +00:00
Marcel Moolenaar
0800f014ec MFC rev 200051:
Make sure bus space accesses use unorder memory loads and stores.
2009-12-04 18:29:59 +00:00
Jaakko Heinonen
21148e9257 MFC r199843:
Clarify that the value of the fts_info field is different in post-order.

Approved by:	trasz (mentor)
2009-12-04 11:26:52 +00:00
Jaakko Heinonen
a95336167e MFC r199529:
Extend ddb(4) "show mount" command to print active string mount options.
Note that only option names are printed, not values.

Approved by:	trasz (mentor)
2009-12-04 11:23:37 +00:00
Christian Brueffer
e043b4c399 MFC: r199988
Add an .Nm for strncat.
2009-12-04 07:08:15 +00:00
Pyun YongHyeon
9b96de9413 MFC r199565:
Move interface reinitialization down after disabling WOL in resume
  path.
2009-12-03 18:48:32 +00:00
Pyun YongHyeon
86032a4158 MFC r199564:
Minimize interface reinitialization by checking IFF_DRV_RUNNING
  flag. This fixes unnecessary interface UP/DOWNs during getting an
  IP address via DHCP.
2009-12-03 18:42:19 +00:00
Colin Percival
0cd4e30efa Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]

Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]

Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]

Approved by:	so (cperciva)
Security:	FreeBSD-SA-09:15.ssl
Security:	FreeBSD-SA-09:16.rtld
Security:	FreeBSD-SA-09:17.freebsd-udpate
2009-12-03 09:18:40 +00:00
Xin LI
23ca7b86bd MFC r199066 + 199339:
Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 files
as created by pbzip2.
2009-12-02 21:58:00 +00:00
Tony Finch
edc71a91ec MFC 199815:
Fix performance bugs in factor(6).
2009-12-02 19:28:55 +00:00
Tony Finch
cb0593b42c MFC 199813, 199817, 199842, 199867:
Update unifdef to latest upstream version.
2009-12-02 15:30:53 +00:00
Alexander Motin
ab4ca9d195 MFC r199644:
Add some missing WDMA/UDMA modes.
2009-12-02 12:26:26 +00:00
Alexander Motin
06a7b83b5e MFC r199822:
Drop USB mass storage devices support from ata(4). It is out of the build as
long as I remember, and completely superseded by better maintained umass(4).
It's main idea was to optionally avoid CAM dependency for such devices, but
with move ATA to CAM, it is not actual any more.

No objections:  hselasky@, thompsa@, arch@
2009-12-02 10:47:11 +00:00
Alexander Motin
03b5c37446 MFC r199747, r199799, r199821:
- Extend XPT-SIM transfer settings control API. Now it allows to report to
SATA SIM number of tags supported by each device, implement ATA mode and
SATA revision negotiation for both SATA and PATA SIMs.
- Make ahci(4) and siis(4) to use submitted maximum tag number, when
scheduling requests. It allows to support NCQ on devices with lower tags
count then controller supports.
- Make PMP driver to report attached devices connection speeds.
- Implement ATA mode negotiation between user settings, device and
controller capabilities.
- Improve ATA mode/SATA revision control.
2009-12-02 10:32:34 +00:00
Alexander Motin
7e7ac267c9 MFC r199279, r199280, r199281:
- Fix several device freeze counting bugs.
- Remove code that years ago was closing race between request submission
to SIM and device/SIM freeze. That race become impossible after moving from
spl to mutex locking, while this workaround causes some unexpected effects.
2009-12-02 10:10:37 +00:00
Garrett Wollman
28f2223875 MFC revs 199781,199782,199784,199785,199786:
Eliminate dead stores.

  In __mbsconv(), if prec was zero, nconv could have been used
  uninitialized.  Initialize it to a safe value so that there's no
  chance of returning an error if stack garbage happens to be equal to
  (size_t)-1 or (size_t)-2.

  In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTED
  && SUCCESS case succeeds.  The stack garbage might be zero.

  In clnt_raw_create(), avoid minor race condition initializing the
  file-scope variable clntraw_private.

Found by:		Clang static analyzer
2009-12-02 02:47:29 +00:00