Commit Graph

164083 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
f404863979 Remove a these days incorrect comment left from before new-arp.
MFC after:	1 week
2011-06-18 13:54:36 +00:00
Bjoern A. Zeeb
930c182a06 Install symlinks for m_tag_* mbuf tag functions to the mbuf_tags.9 man page.
MFC after:	1 week
2011-06-18 13:08:46 +00:00
Bjoern A. Zeeb
dabc7ac21a Correct a typo in the function name.
MFC after:	1 week
2011-06-18 13:03:06 +00:00
Konstantin Belousov
1c23d0f727 Fix vfork. Add comments. 2011-06-18 12:13:28 +00:00
Marius Strobl
a2f43b6155 - As with stray vector interrupts limit the reporting of stray level
interrupts. Bringup on additional machine models repeatedly reveals
  firmware that enables interrupts behind our back, causing the console
  to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
  u_long for counting the stray vector interrupts should be more than
  sufficient.
- Cache the interrupt vector in intr_stray_vector().
2011-06-18 11:27:44 +00:00
Marius Strobl
6ce2f878d3 Merge from r161730:
o  Set TP using inline assembly to avoid dead code elimination.
o  Eliminate _tcb.

Merge from r161840:
Stylize: avoid using a global register variable.

Merge from r157461:
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.

Merge from r177853:
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

MFC after:	1 week
2011-06-18 11:07:09 +00:00
Jilles Tjoelker
cfb739b854 rc.subr: Eliminate about 100 forks from the boot sequence.
With the current sh, placing eval in a command substitution always results
in a fork(), even if it is the only command and only executes a single
simple command. Therefore, avoid it where it can be avoided easily.

Side effect: values starting with a hyphen and all whitespace are preserved.
The values are defaults and names for rc.conf variables and messages to be
given about obsolete ones.

MFC after:	2 weeks
2011-06-18 11:05:30 +00:00
Marius Strobl
4a58eccc5b Add an entry for r221407 forgotten in said revision. 2011-06-18 10:48:00 +00:00
Michael Tuexen
bb3c45bf86 Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.
2011-06-18 10:36:05 +00:00
Bjoern A. Zeeb
e08e8999f6 Add a missing ',' to separate arguments lost for r222465 only found in
case a complete world is built without INET support.

MFC after:	10 days
X-MFC with:	222465
2011-06-18 09:46:39 +00:00
Bjoern A. Zeeb
52dcd04ba3 gre(4) was using a field in the softc to detect possible recursion.
On MP systems this is not a usable solution anymore and could easily
lead to false positives triggering enough logging that even  using
the console was no longer usable (multiple parallel ping -f can do).

Switch to the suggested solution of using mbuf tags to carry per
packet state between gre_output() invocations.  Contrary to the
proposed solution modelled after gif(4) only allocate one mbuf tag
per packet rather than per packet and per gre_output() pass through.

As the sysctl to control the possible valid (gre in gre) nestings does
no sanity checks, make sure to always allocate space in the mbuf tag
for at least one, and at most 255 possible gre interfaces to detect
loops in addition to the counter.

Submitted by:	Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR:		kern/114714
Reviewed by:	Cristian KLEIN (cristi net.utcluj.ro)
Reviewed bu:	Wooseog Choi (ben_choi hotmail.com)
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2011-06-18 09:34:03 +00:00
Ed Schouten
c3f1b3ae09 Let the size of the namebuf depend on the size of the ut_user field. 2011-06-18 07:47:15 +00:00
Warner Losh
cf95dbae06 More expeirmentation suggests that 10ms isn't as reliable as
previously thought, but 100ms seems to be.  Likely there's a good
middle ground, but for now be conservative.
2011-06-18 03:16:51 +00:00
Warner Losh
0b96c05a7a After we get a good power signal, always wait about 10ms before
proceeding.

On boot, some laptops with certain cards in them sometimes fail on
boot, but if the card is inserted after boot it works.  Experiments
show that small delays here makes things more reliable.  It is
believed that some combinations need a little more time before the
power on the card is really stable enough to be reliable once the
power is stable in the bridge.
2011-06-18 02:25:08 +00:00
David E. O'Brien
a57971c679 Note how wait(3) is implemented. 2011-06-18 00:53:51 +00:00
Xin LI
488d6e0c3d Sync with OpenBSD, primarily make the code easier to read, and a license
change to standard OpenBSD ISC license.

Obtained from:	OpenBSD
MFC after:	2 weeks
2011-06-18 00:33:34 +00:00
Xin LI
8e27b6e60f Sync with OpenBSD (zap rcsid).
MFC after:	2 weeks
2011-06-18 00:29:10 +00:00
Xin LI
25879947d6 The flags argument of mpool_get() is meaningful, document it.
MFC after:	2 weeks
2011-06-18 00:10:21 +00:00
David E. O'Brien
52e95a64ea Add comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick) 2011-06-17 21:44:13 +00:00
Jung-uk Kim
5df88f46bb Teach the compiler how to shift TSC value efficiently. As noted in r220631,
some times compiler inserts redundant instructions to preserve unused upper
32 bits even when it is casted to a 32-bit value.  Unfortunately, it seems
the problem becomes more serious when it is shifted, especially on amd64.
2011-06-17 21:41:06 +00:00
Ed Schouten
7000858ec6 Regenerate src.conf.5. 2011-06-17 21:31:13 +00:00
Ed Schouten
9f0c9022c2 Add WITHOUT_UTMPX switch to the build system.
This knob removes the tools that are exclusively used to view and
maintain the databases maintained by utmpx, namely last, users, who,
wtmpcvt, ac, lastlogin and utxrm.

The tool w is not in this list, because it has some other functionality
which is unrelated to utmpx; it is hardlinked to the uptime tool.
2011-06-17 21:30:21 +00:00
Ed Schouten
2663175a9e Don't remove the periodic script for ac(8) when setting WITHOUT_ACCT. 2011-06-17 21:20:41 +00:00
John Baldwin
183c8af32e Don't create a device_t object or parse current resources (via _CRS) for
ACPI Device() objects that do not have any device IDs available via the
_HID or _CID methods.  Without a device ID a device driver cannot attach
to the device anyway.  Namespace objects that are devices but not of
type ACPI_TYPE_DEVICE are not affected.

A few BIOSes have also attached a _CRS method to a PCI device to
allocate resources that are not managed via a BAR.  With the previous
code those resources are allocated from acpi0 directly which can interfere
with the new PCI-PCI bridge driver (since the PCI device in question may
be behind a bridge and its resources should be allocated from that
bridge's windows instead).  The resources were also orphaned and
and would end up associated with some other random device whose device_t
reused the pointer of the original ACPI-enumerated device (after it was
free'd by the ACPI PCI bus driver) in devinfo output which was confusing.
If we want to handle _CRS on PCI devices we can adjust the ACPI PCI bus
driver to do that in the future and associate the resources with the
proper device object respecting PCI-PCI bridges, etc.

Note that with this change the ACPI PCI bus driver no longer has to
delete ACPI-enumerated device_t devices that mirror PCI devices since
they should in general not exist.  There are rare cases when a BIOS
will give a PCI device a _HID (e.g. I've seen a PCI-ISA bridge given
a _HID for a system resource device).  In that case we leave both the
ACPI and PCI-enumerated device_t objects around just as in the previous
code.
2011-06-17 21:19:01 +00:00
Jilles Tjoelker
876b6796f3 posix_spawn(3): Document r222511 (trying to close already closed fd).
MFC after:	1 week
2011-06-17 21:16:27 +00:00
Ed Schouten
0ea27d0271 Update manpage. 2011-06-17 20:49:30 +00:00
Ed Schouten
f1c344b293 Don't omit ac(8) as part of WITHOUT_ACCT.
The WITHOUT_ACCT switch is supposed to omit tools related to process
accounting, namely accton and sa. ac(8) is just a simple tool that
prints statistics based on data in the utx.log database. It has nothing
to do with the former.
2011-06-17 20:47:44 +00:00
John Baldwin
1c2ed38455 - Use a dedicated task to handle deferred transmits from the if_transmit
method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Don't define igb_start() at all on 8.0 and where if_transmit is used.
  Replace last remaining call to igb_start() with a loop to kick off
  transmit on each queue instead.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

Reviewed by:	jfv
MFC after:	1 week
2011-06-17 20:06:52 +00:00
Joerg Wunsch
beee0062b5 Open the floppy disk device with O_RDONLY rather than O_RDWR. After
all, this is the fd*read* command, and thus should be able to read
even write-protected disks.

MFC after:	1 week
2011-06-17 18:56:51 +00:00
Jilles Tjoelker
c9afaa6389 sh: Add case statement fallthrough (with ';&' instead of ';;').
Replacing ;; with the new control operator ;& will cause the next list to be
executed as well without checking its pattern, continuing until a list ends
with ;; or until the end of the case statement. This is like omitting
"break" in a C "switch" statement.

The sequence ;& was formerly invalid.

This feature is proposed for the next POSIX issue in Austin Group issue
#449.
2011-06-17 13:03:49 +00:00
Gleb Smirnoff
ce97208218 - Fix my braino in the 220835, when I used strtok(). It isn't
applicable here, since modifies the string. Switch to strchr().
- Restore support for undocumented optional parameters of
  redir_port and redir_proto, that were disabled in 220835.
- While here, change !isalpha() checks on optinal parameters
  for isdigit().

Submitted by:	Alexander V. Chernikov <melifaro ipfw.ru>
PR:		kern/143653
2011-06-17 12:12:52 +00:00
Jilles Tjoelker
f5f215e251 sh: Skip variables with invalid names in "set", "export -p", "readonly -p".
This ensures the output of these commands is valid shell input.
2011-06-17 10:21:24 +00:00
Sergey Kandaurov
e0607dec4d Return empty cmdline/environ string for processes with kernel address
space. This is consistent with the behavior in linux.

PR:		kern/157871
Reported by:	Petr Salinger <Petr Salinger att seznam cz>
Verified on:	GNU/kFreeBSD debian 8.2-1-amd64 (by reporter)
Reviewed by:	kib (some time ago)
MFC after:	2 weeks
2011-06-17 07:30:56 +00:00
Mikolaj Golub
ba2a822490 In HAST we use two sockets - one for only sending the data and one for
only receiving the data. In r220271 the unused directions were
disabled using shutdown(2).

Unfortunately, this broke automatic receive buffer sizing, which
currently works only for connections in ETASBLISHED state. It was a
root cause of the issue reported by users, when connection between
primary and secondary could get stuck.

Disable the code introduced in r220271 until the issue with automatic
buffer sizing is not resolved.

Reported by:	Daniel Kalchev <daniel@digsys.bg>, danger, sobomax
Tested by:	Daniel Kalchev <daniel@digsys.bg>, danger
Approved by:	pjd (mentor)
MFC after:	1 week
2011-06-17 07:07:26 +00:00
Michael Tuexen
bb2c20c1a8 Add SCTP_MAX_BURST support to sctp_opt_info().
This only applies to 9.0 and higher, since the type
of the values has changed since we introduced it.
So it can't be MFCed.
2011-06-17 07:06:42 +00:00
Michael Tuexen
13aae0bf1d Update the list of supported socket options for sctp_opt_info().
MFC after: 1 month.
2011-06-17 07:03:42 +00:00
Alexander Leidinger
b66e74b695 Add 2-clause BSD license.
Approved by:	David Kirchner <dpk@dpk.net> (initial author)
Requested by:	Otto Moerbeek <otto@drijf.net>
MFC after:	1 week
2011-06-17 06:12:28 +00:00
Marcel Moolenaar
218b719b74 Improve on style(9) 2011-06-17 05:30:12 +00:00
Marcel Moolenaar
acd1d4d28e Properly serialize the global shootdown with the instruction
stream of the local processor. Also explicitly invalidate
the ALAT. This is done on the other CPUs in the coherence
domain by virtue of the ptc.ga instruction, but does not
apply to the local CPU.
2011-06-17 04:26:03 +00:00
Kirk McKusick
ff13f23f84 Drop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.c
and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that
file.  No other programs or libraries include <ufs/ffs/ffs_extern.h> (nor
should they as it is totally in-kernel interfaces). For added protection
I enclosed the entire contents of <ufs/ffs/ffs_extern.h> in ifdef _KERNEL.

Feedback from:	Bruce Evans and Tai-hwa Liang
2011-06-16 23:40:10 +00:00
Konstantin Belousov
160e5953c2 Regen. 2011-06-16 22:06:35 +00:00
Konstantin Belousov
7181217886 Implement compat32 for old lseek, for the a.out binaries on amd64. 2011-06-16 22:05:56 +00:00
Konstantin Belousov
508462ed1b Do not trash the argv[0] pointer for an a.out process on amd64.
Found with the binary provided by joerg.
2011-06-16 22:00:59 +00:00
Konstantin Belousov
5a888c066f Fix silly typo that resulted in the a.out process stack to end at
~200MB instead of 3GB on amd64.
2011-06-16 21:59:16 +00:00
Jilles Tjoelker
c5aef5377c sh: Reduce unnecessary forks with eval.
The eval special builtin now runs the code with EV_EXIT if it was run
with EV_EXIT itself.

In particular, this eliminates one fork when a command substitution contains
an eval command that ends with an external program or a subshell.

This is similar to what r220978 did for functions.
2011-06-16 21:50:28 +00:00
Michael Tuexen
6037f89c81 Add SCTP_DEFAULT_PRINFO socket option.
Fix the SCTP_DEFAULT_SNDINFO socket option: Don't clear the
PR SCTP policy when setting sinfo_flags.

MFC after: 1 month.
2011-06-16 21:12:36 +00:00
Benedict Reuschling
090f90cf61 Fix some wording and grammar in the BUGS section.
PR:             docs/157901
Submitted by:   Niclas Zeising (niclas dot zeising at gmail dot com)
Reviewed by:    mav
MFC after:      3 days
2011-06-16 19:57:07 +00:00
Andrey V. Elsukov
beeca17d4c Add "alignment" param to the request before calling gpart_autofill(). 2011-06-16 19:42:03 +00:00
Warner Losh
d996b98bea Setting warnings without make universe considered harmful. Revert to WARNS=0
until such time that the warnings at =2 are fixed for all platforms.
2011-06-16 18:00:27 +00:00
Marcel Moolenaar
8a71031712 Even if the loaded module has no symbols, we still need to notify
MD code about it and update the link map for GDB's use.
2011-06-16 17:41:21 +00:00