Commit Graph

149905 Commits

Author SHA1 Message Date
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
Fabien Thomas
9e5aec3978 MFC 198339:
Fix the NO_PROXY handling.

PR: 139751
2009-12-01 23:23:52 +00:00
Fabien Thomas
baa1e3c69a MFC 199763:
- fix a LOR between process lock and pmc thread mutex
 - fix a system deadlock on process exit when the sample buffer
 is full (pmclog_loop blocked in fo_write) and pmcstat exit.
2009-12-01 23:06:17 +00:00
Fabien Thomas
7619fb0cbd MFC 198343:
Handle the case where there is only one PMC in the system.
2009-12-01 22:59:37 +00:00
John Baldwin
fa860bed4e MFC 199579:
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
fully support booting from large volumes.
2009-12-01 22:38:17 +00:00
Alexander Leidinger
f48f29ede9 MFC r199626:
Fix minor resource leak in a function.

  Reviewed by:        luigi
2009-12-01 12:35:51 +00:00
Andriy Gapon
e9aa44c800 MFC r199016: acpi: remove 'magic' ivar
Note that the ivar itself is kept in the stable branches, only its use is
dropped.
2009-12-01 06:11:42 +00:00
Colin Percival
0b1a7fea85 MFC r199979: Fix local root vulnerability. 2009-12-01 02:59:22 +00:00
Christian Brueffer
90ecb96535 MFC: r199739, r199825
- LSI MegaRAID 9260 works, sort the hardware list while here.
- Add IBM ServeRAID-MR10i to the hardware list.
2009-11-30 07:54:22 +00:00
Christian Brueffer
17d1b37db5 MFC: r199748
Grammar and mdoc improvements.
2009-11-30 07:51:37 +00:00
Pyun YongHyeon
de75e77770 MFC r199413:
It seems generation of link state change of e1000phy(4) is not
  reliable on some Marvell PHYs. If msk(4) know it still does not
  have established link check whether msk(4) missed the link state
  change by looking into polled link state.

  Reported by:	Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >,
		Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
  Tested by:	Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
2009-11-29 20:19:24 +00:00
Pyun YongHyeon
44d2845719 MFC r199013:
88E8057(Ultra 2) is now supported.
2009-11-29 20:11:38 +00:00
Pyun YongHyeon
97333ffb74 MFC r198475:
- Add support for Marvell Yukon 88E8042 device.
2009-11-29 20:06:57 +00:00
Pyun YongHyeon
75c4ab0ae9 MFC r199012:
Add preliminary Yukon Ultra 2 support(88E8057). The controller
  looks very similar to Yukon EC Ultra.

  Tested by:	kalin m ( kalin <> el dot net )
2009-11-29 19:58:35 +00:00
Pyun YongHyeon
30c8843f6a MFC 198996-198997.
r198996:
  Remove unnecessary header file.

r198997:
  It's normal to see Rx FIFO overruns under high network load and
  showing the message creates other side-effects. Remove the Rx
  FIFO overrun message in interrupt handler. msk(4) should recover
  from the FIFO overruns without any user intervention. Users can
  still check the Rx FIFO overrun counter from MAC MIB statistics
  maintained in driver(dev.msk.0.stats.rx.overflows).
2009-11-29 19:54:32 +00:00
Pyun YongHyeon
2ff1d99219 MFC 198814.
Add a check to know whether driver is still running after
  reacquiring driver lock in Rx handler. re(4) drops a driver lock
  before passing received frame to upper stack and reacquire the
  lock. During the time window ioctl calls could be executed and if
  the ioctl was interface down request, driver will stop the
  controller and free allocated mbufs. After that when driver comes
  back to Rx handler again it does not know what was happend so it
  could access free mbufs which in turn cause panic.

  Reported by:	Norbert Papke < npapk <> acm dot org >
  Tested by:	Norbert Papke < npapk <> acm dot org >
2009-11-29 19:49:21 +00:00
Pyun YongHyeon
cb08d589eb MFC 198813.
Add BCM5761 PHY id.
2009-11-29 19:46:15 +00:00
Pyun YongHyeon
4a288ceae9 MFC 197627.
Fix multicast handling. All Atheros controllers use big-endian form
  in computing multicast hash.

  PR:	kern/139137
2009-11-29 19:29:11 +00:00
Pyun YongHyeon
621838143b MFC 197600.
For AR8132 fast ethernet controller, do not report 1000baseT
  capability to mii(4). Even though AR8132 uses the same model/
  revision number of F1 gigabit PHY, the PHY has no ability to
  establish 1000baseT link. I have no idea why Atheros use the same
  device/model id for this PHY.
  With this change atphy(4) does not report 1000baseT media
  capability and manual 1000baseT configuration is also disabled
  which is more desirable behavior for 10/100Mbps PHY.
2009-11-29 19:25:15 +00:00