Commit Graph

150797 Commits

Author SHA1 Message Date
Jaakko Heinonen
0ebeb8cec4 MFC r205121:
Use an unique directory name instead of hardcoded /tmp/.diskless.
A malicious user could create a file named /tmp/.diskless and cause
the script to misbehave.

PR:		conf/141258
2010-03-23 16:45:29 +00:00
Luigi Rizzo
8018e843a3 MFC of a large number of ipfw and dummynet fixes and enhancements
done in CURRENT over the last 4 months.
HEAD and RELENG_8 are almost in sync now for ipfw, dummynet
the pfil hooks and related components.

Among the most noticeable changes:
- r200855 more efficient lookup of skipto rules, and remove O(N)
  blocks from critical sections in the kernel;
- r204591 large restructuring of the dummynet module, with support
  for multiple scheduling algorithms (4 available so far)
See the original commit logs for details.

Changes in the kernel/userland ABI should be harmless because the
kernel is able to understand previous requests from RELENG_8 and
RELENG_7. For this reason, this changeset would be applicable
to RELENG_7 as well, but i am not sure if it is worthwhile.
2010-03-23 09:58:59 +00:00
Qing Li
521dd44db5 MFC r205272
Need to set the proper flag bit when inserting ARP
entries into the kernel.
2010-03-22 23:33:40 +00:00
Pyun YongHyeon
9832320129 MFC r204156:
Add __FBSDID.
2010-03-22 23:23:47 +00:00
Hiroki Sato
7fe6975097 MFC r203272:
- Fix a bug when adding an interface with an invalid MTU sets the
  bridge's MTU if it is the firstly-added one while the addition
  itself fails.

- Allow SIOCSIFMTU only when all members have the same MTU.

- Remove IFT_GIF check when defining the brige MTU by the
  firstly-added interface's one.  The MTU of the gif interface
  has to be the same as the bridge's one.
2010-03-22 22:07:19 +00:00
Edwin Groothuis
274885ab20 MFC of r205475, tzdata2010f:
The Australian Antartic Division:
- Macquarie Island will stay on UTC+11 for winter and not switch back from DST.
- Casey station reverted to its normal time of UTC+8 on 5 March 2010.
- Davis station will revert to its normal time of UTC+7 at 10 March 2010
- Mawson station stays on UTC+5.

Syria will start DST on Thursday 1 April 2010 at midnight.

Correct Samao DST start date (26 Sep vs 24 Oct)
2010-03-22 21:35:54 +00:00
Jung-uk Kim
a0bc6d1ca6 MFC: r205223
Fix a long standing regression of readdir(3) in fdescfs(5) introduced
in r1.48.  We were stopping at the first null pointer when multiple file
descriptors were opened and one in the middle was closed.  This restores
traditional behaviour of fdescfs.
2010-03-22 20:36:35 +00:00
Jung-uk Kim
1288863fa2 MFC: r205092
Tidy up callout for select(2) and read timeout.

- Add a missing callout_drain(9) before the descriptor deallocation.[1]
- Prefer callout_init_mtx(9) over callout_init(9) and let the callout
subsystem handle the mutex for callout function.

PR:		kern/144453
Submitted by:	Alexander Sack (asack at niksun dot com)[1]
2010-03-22 19:59:00 +00:00
Jung-uk Kim
e651ff978b MFC: r203943
Remove COMPILATIONDATE from the default section.  This string is no longer
being substituted since r162063.
2010-03-22 19:50:57 +00:00
Luigi Rizzo
f2f7c1447a mfc r205179: print correctly addresses with an OR block 2010-03-22 16:40:10 +00:00
John Baldwin
f5ccef8fd9 MFC 204950,205020:
Use thr_once() with once_t controls to initialize various thread_key_t
objects used to provide per-thread storage in the RPC code.  Almost all
of these used double-checking with a dedicated mutex (tsd_lock) to do this
before.  However, that is not always safe with more relaxed memory orders.
There were also other bugs, such as one in __rpc_createrr() that caused a
new key to be allocated each time __rpc_createrr() was invoked.
2010-03-22 15:52:26 +00:00
Andrew Gallatin
accbb468d5 MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO. 2010-03-22 14:50:08 +00:00
Andrew Gallatin
c6c73f9880 MFC 205255: Fix 2 bugs in mxge_attach() 2010-03-22 11:18:51 +00:00
Gleb Smirnoff
948165be1c MFC r200183 by luigi:
restore setting of sin_len (was removed in 1.146 last february) as
  it seems that now it is necessary for 'forward' to work outside lo0.

Approved by:	luigi
2010-03-22 10:11:59 +00:00
Konstantin Belousov
1b90b87fba MFC r204879:
Teach procstat(1) to display some information about signal disposition
and pending/blocked status for signals.

MFC r204880:
Add file forgotten in r204879.
2010-03-22 09:29:56 +00:00
Nathan Whitehorn
9c4dbddb29 MFC r204211:
Support the extended PLT format used when objects have more than 8192
PLT relocations on PPC32.
2010-03-20 15:28:39 +00:00
Nathan Whitehorn
fca060b9f9 MFC r204297:
Move the OEA64 scratchpage to the end of KVA from the beginning, and set
its PVO to map physical address 0 instead of kernelstart. This fixes a
situation in which a user process could attempt to return this address
via KVM, have it fault while being modified, and then panic the kernel
because (a) it is supposed to map a valid address and (b) it lies in the
no-fault region between VM_MIN_KERNEL_ADDRESS and virtual_avail.

While here, move msgbuf and dpcpu back into regular KVA space for
consistency with other implementations.
2010-03-20 15:27:01 +00:00
Nathan Whitehorn
1f70273a79 MFC r204296:
Provide an implementation of pmap_dev_direct_mapped() on OEA64. This is
required in order to be able to mmap the running kernel, which is turn
required to avoid fstat returning gibberish.
2010-03-20 15:23:06 +00:00
Nathan Whitehorn
59908d2f72 MFC r204269:
Use dcbz instead of word stores for page zeroing, providing a factor of
3-4 speedup.
2010-03-20 15:21:13 +00:00
Nathan Whitehorn
aba7e013d6 MFC r204268:
Close a race involving the OEA64 scratchpage. When the scratch page's
physical address is changed, there is a brief window during which its PTE
is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold
the page table lock, it was possible for another CPU to insert a new PTE
into the scratch page's PTEG slot during this interval, corrupting both
mappings.

Solve this by creating a new flag, LPTE_LOCKED, such that
moea64_pte_insert will avoid claiming locked PTEG slots even if they
are invalid. This change also incorporates some additional paranoia
added to solve things I thought might be this bug.

Reported by:	linimon
2010-03-20 15:19:57 +00:00
Nathan Whitehorn
e868629641 MFC r204128:
Reduce KVA pressure on OEA64 systems running in bridge mode by mapping
UMA segments at their physical addresses instead of into KVA. This emulates
the direct mapping behavior of OEA32 in an ad-hoc way. To make this work
properly required sharing the entire kernel PMAP with Open Firmware, so
ofw_pmap is transformed into a stub on 64-bit CPUs.

Also implement some more tweaks to get more mileage out of our limited
amount of KVA, principally by extending KVA into segment 16 until the
beginning of the first OFW mapping.

Reported by:	linimon
2010-03-20 15:15:54 +00:00
Nathan Whitehorn
6f88556c52 Fix a bug where pages being removed from memory entirely no longer have
PVOs, and so the modified state of the page can no longer be communicated
to the VM layer, causing pages not to be flushed to swap when needed, in
turn causing memory corruption. Also make several correctness adjustments
to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs.

Obtained from:	projects/ppc64
Discussed with:	grehan
2010-03-20 15:05:44 +00:00
Nathan Whitehorn
006e2f2ce5 MFC r204903:
Place interrupt handling in a critical section and remove double
counting in incrementing the interrupt nesting level. This fixes a number
of bugs in which the interrupt thread could be preempted by an IPI,
indefinitely delaying acknowledgement of the interrupt to the PIC, causing
interrupt starvation and hangs.

Reported by:	linimon
Reviewed by:	marcel, jhb
2010-03-20 14:55:22 +00:00
Nathan Whitehorn
81484b9174 MFC r204082,204179,204180,204218,204241,204247,204270,204692:
Provide thermal management and monitoring features in smu(4). This allows
fan control and thermal monitoring on SMU-based Apple G5 machines, as well
as an led(4) interface to control the sleep LED.
2010-03-20 14:49:44 +00:00
Konstantin Belousov
2219384ff7 MFC r205225:
Add missing headers. While there, arrange headers alphabetically.
2010-03-19 10:33:45 +00:00
Konstantin Belousov
b2eaa3b2c2 MFC r205224:
Add missing headers.
2010-03-19 10:28:49 +00:00
Konstantin Belousov
5a9ca220b2 MFC r204755:
Update the list of the process flags. Note that the lists of pending
signals for process and its threads are distinct.
2010-03-19 10:25:59 +00:00
Pyun YongHyeon
4f7bf104f0 MFC r202717:
- Added a workaround for NC-SI management firmware that would allow
    frames to be accepted while the driver is resetting the hardware.
    This failure is generally observed when broadcast frames are received
    during driver load and will generate "Unable to write CTX memory"
    errors.
  - Small changes to driver flags display.

PR:	kern/135836, kern/140684
2010-03-19 00:26:45 +00:00
Pyun YongHyeon
be3410a939 MFC r204150:
Add TSO support on VLAN in fconfig(8).
2010-03-18 19:10:03 +00:00
Pyun YongHyeon
d5eda01f75 MFC r204149:
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
  from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
  TSO over VLAN without VLAN hardware tagging.
  Driver changes and userland support will follow.
2010-03-18 19:04:04 +00:00
Pyun YongHyeon
12c4b5ef43 MFC r202826-202827,204146
r202826:
  s/Mhz/MHz/g

  Submitted by:	N.J. Mann <njm <> njm dot me dot uk >

r202827:
  Yukon Ultra2 has 125MHz clock.

r204146:
  Correct inversed programming of ethernet hardware address on
  big-endian architecture.

  Submitted by:	C. Jayachandran <c.jayachandran at gmail dot com> (initial version)
2010-03-18 18:58:24 +00:00
Pyun YongHyeon
0debac0d3a MFC r203358,203716:
r203358:
  PCI express device status register has W1C feature. Writing 0 has
  no effect. Make sure to clear error bits by writing 1. [1]
  While I'm here use predefined value instead of hardcodig magic
  vlaue.

  Submitted by:	msaitoh at NetBSD [1]

r203716:
  Move device specific flag configuration to attach routine.
  The softc obtained in device probe wouldn't be the same one used in
  device attach. Drivers should not assume any values stored in softc
  structure in probe routine will be available for its attach routine.
2010-03-18 18:50:20 +00:00
Pyun YongHyeon
bb8c5f9792 MFC r203355:
Add more bit definitions to PCI express device control and device
  status register.
2010-03-18 18:44:08 +00:00
Pyun YongHyeon
194bfbdd24 MFC r202821-202822.
r202821:
  Fix a long standing ASF heartbeat sending bug. The initial
  implementation of heartbeat interval was 2 but there was typo which
  caused the heartbeat is sent approximately every 5 seconds. This
  caused unintended controller reset by firmware because firmware
  thought OS was crashed.

  Submitted by:	Floris Bos < info <> je-eigen-domein dot nl >
  Tested by:	Andrzej Tobola < ato <> iem dot pw dot edu dot pl >

r202822:
  Use new handshake command for BCM5750 or new controllers.
2010-03-18 18:35:28 +00:00
Max Laier
29f2c008fd MFC r203834 and r205197: Make ALTQ work for drbr consumers. 2010-03-18 17:00:44 +00:00
Rafal Jaworowski
7088545a40 MFC r205027
Let detailed info about CPU features print on Marvell Sheeva CPU as well.

Provide missing entry in the cpu_classes[].

Reported by:	Maks Verver
2010-03-18 11:53:32 +00:00
Gavin Atkinson
0761ef3362 Merge r203622 from head:
Add support for a few more Sony-specific ACPI features (default display
  brightness, wired LAN power and bass gain), and update the description of
  one previously unknown feature (display contrast).  While here, expand on
  a comment and remove two defines left over from an old version of the code.

  Also update man page to document the above changes, and correct grammar.

PR:		kern/127581
2010-03-17 20:39:21 +00:00
Gavin Atkinson
40df979212 Merge r203835 from head:
When growing a UFS1 filesystem, we need to initialise all inodes in any new
  cylinder groups that are created.  When the filesystem is first created,
  newfs always initialises the first two blocks of inodes, and then in the
  UFS1 case will also initialise the remaining inode blocks.  The changes in
  growfs.c 1.23 broke the initialisation of all inodes, seemingly based on
  this implementation detail in newfs(8).  The result was that instead of
  initialising all inodes, we would actually end up initialising all but the
  first two blocks of inodes.  If the filesystem was grown into empty
  (all-zeros) space then the resulting filesystem was fine, however when
  grown onto non-zeroed space the filesystem produced would appear to have
  massive corruption on the first fsck after growing.
  A test case for this problem can be found in the PR audit trail.

  Fix this by once again initialising all inodes in the UFS1 case.

PR:		bin/115174
Submitted by:	"Nate Eldredge"  <nge cs.hmc.edu>
Reviewed by:	mjacob
2010-03-17 20:27:35 +00:00
Gavin Atkinson
27dfb536f2 Merge r203865 from head:
The -newerXB option was being interpreted the same as the -newerXm option
  as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
2010-03-17 20:16:28 +00:00
Konstantin Belousov
84d7d98fa1 MFC r205148:
Make it compile on LP64 arches.
2010-03-17 09:52:26 +00:00
Doug Barton
6b5b49ce7f MFC r205145:
Make it more clear in the docs that -a is not compatible with -iFU,
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.

While I'm here, fix a trailing space in mergemaster.8
2010-03-17 07:26:00 +00:00
Joerg Wunsch
01bd5afb0f r205170: then -> than 2010-03-16 05:13:20 +00:00
Rafal Jaworowski
9f36044770 MFC r205028
Fix ARM cache handling yet more.

 1) vm_machdep.c: remove the dangling allocations so they do not
    un-necessarily turn off the cache upon consecutive access.

 2) busdma_machdep.c: remove the same amount than shadow mapped.

Reported by:	Maks Verver
Submitted by:	Mark Tinguely
Reviewed by:	Grzegorz Bernacki
2010-03-15 19:59:16 +00:00
Rafal Jaworowski
7bfaecdca3 MFC r204764
Provide correct TCLK value for Kirkwood A1 silicon revision.

While there improve SOC ID output accordingly.

Obtained from:	Semihalf
2010-03-15 19:51:24 +00:00
Marius Strobl
8bf5ec1047 MFC: r204222
According to the Linux sungem driver, in case of Apple (K2) GMACs
GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered
down the chip so the internal transceiver has to be hardcoded. This
is also in line with the AppleGMACEthernet driver, which just doesn't
distinguish between internal/external transceiver and MDIO/MDI1
respectively in the first place. Tested by: Andreas Tobler
2010-03-15 19:13:36 +00:00
Marius Strobl
a130bd42f5 MFC: r204144
Add support for BCM54K2 found in combination with Apple K2 GMAC.

Submitted by:   Andreas Tobler
Obtained from:  OpenBSD
2010-03-15 19:04:44 +00:00
Marius Strobl
2181f8f5be MFC: r204974, r205002
- The OPSZ macro actually only does the right thing for int32 and int64
  operands but not for double and extended double ones. Instead of trying
  to fix the macro just nuke it and unroll the loops in the correct way
  though as extended double operands turn out to be the only special case.
- For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded
  after setting type accordingly as it's generally decoded using the low
  2 bits as the type, which are 0 for these three instructions.
- Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be
  re-decoded using not only the operand mask appropriate for int64 but
  also the correct register number encoding.
- Use const where appropriate.
- Wrap long lines.

Submitted by:	Peter Jeremy (partly)
2010-03-15 18:32:57 +00:00
Jung-uk Kim
256794862e MFC: r204235
Fix FBIO_ADPINFO ioctl on amd64.
2010-03-15 18:22:19 +00:00
Luigi Rizzo
2ad0f3f258 and wrong place too! 2010-03-15 17:54:01 +00:00
Luigi Rizzo
2faf8829c4 wrong name for this file... 2010-03-15 17:52:55 +00:00