Commit Graph

149481 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
43ea76c98d MFC r196475:
- Add AS lookup functionality to traceroute6(8) as well.
 - Support for IPv6 transport for AS lookup.
 - Introduce $RA_SERVER to set whois server.
 - Support for 4 byte ASN.
 - ANSIfy function declaration in as.c.

Approved by:	re (kib)
2009-09-13 11:34:33 +00:00
Hajimu UMEMOTO
5858b2fdd2 MFC r196929: Suppress an options line when no bit is on.
Approved by:	re (kib)
2009-09-13 11:31:25 +00:00
Norikatsu Shigemura
87c120a67a MFC r196889:
Change 'dev.cpu.N.temperature', sysctl I (degC) to IK (Kelvin),
to match acpi_thermal(4) and amdtemp(4).

Approved by:	re (rwatson)
Reviewed by:	rpaulo
Suggested by:	ume
2009-09-13 10:04:08 +00:00
Konstantin Belousov
80bc871bdd MFC r196861:
Handle zero size for posix_memalign. Return NULL or unique address
according to the 'V' option.

Approved by:	re (kensmith)
2009-09-12 18:16:46 +00:00
Konstantin Belousov
72c975651d MFC r197046:
As was done in r196643 for i386 and amd64, swap the start/end virtual
addresses in pmap_invalidate_cache_range().

Approved by:	re (kensmith)
2009-09-12 18:11:48 +00:00
Michael Tuexen
ceda2d70e4 MFC 196610:
Fix a bug where vlan interfaces are not supported by SCTP.

Approved by: re, rrs (mentor)
2009-09-12 18:08:44 +00:00
Konstantin Belousov
d4c8e5ac7b MFC r197031:
Unlock the image vnode around the call of pmc PMC_FN_PROCESS_EXEC hook.
The hook calls vn_fullpath(9), that should not be executed with a vnode
lock held.

Approved by:	re (kensmith)
2009-09-12 18:05:57 +00:00
Konstantin Belousov
3c9d279b1d MFC r197030:
In vfs_mark_atime(9), be resistent against reclaimed vnodes.
Assert that neccessary locks are taken, since vop might not be called.

Approved by:	re (kensmith)
2009-09-12 18:02:57 +00:00
Michael Tuexen
f222133ab7 This fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT
was not honored, if the socket buffer size was not 4 times that large.
MFC of 196509.

Approved by: re, rrs (mentor)`
2009-09-12 17:58:15 +00:00
Jack F Vogel
b9a65dadc2 This fixes kern/138516, an mbuf leak in both the em
and igb driver, when a transmit fails the packet/mbuf
was not being requeued. Thanks to those that pointed
this problem out.

Approved by:  re
2009-09-11 16:53:12 +00:00
Shteryana Shopova
d51cecd143 MFC r196932:
When joining a multicast group, the inp_lookup_mcast_ifp call
does a KASSERT that the group address is multicast, so the
check if this is indeed true and eventually return a EINVAL if not,
should be done before calling inp_lookup_mcast_ifp. This fixes a kernel
crash when calling setsockopt (sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,...)
with invalid group address.

Reviewed by:	bms
Approved by:	re (kib)
2009-09-11 15:07:36 +00:00
Ken Smith
d8b6f57c83 MFC r196942:
> Bring the layout of package-split.py more in line with where we're going
> with packages on the release media.  It looks like we'll be putting just
> the doc packages on the new "memory stick" image as well as disc1.  There
> will be no other packages on the CDROM-sized media.  The DVD sized media
> will include the doc packages plus whatever other packages we decide to
> make part of the release.
>
> This commit just brings the basic structure in line with being able to
> do this.  We still need to discuss with various people exactly which
> packages will be included on the DVD.
>
> If the environement variable "PKG_DVD" is set a tree suitable for the
> DVD media is generated.  Otherwise a tree suitable for the "memory stick"
> and disc1 is generated.

Approved by:	re (kib)
2009-09-11 13:46:28 +00:00
Konstantin Belousov
8f0b752891 MFC r196966:
Lock Giant around vn_open_cred().
Remove innocent unnecessary call to NDFREE().

Approved by:	re (kensmith)
2009-09-11 12:56:13 +00:00
Ken Smith
ac7d4c93c6 Remove extra debugging support that is turned on for head but turned off
for stable branches:

	- shift to MALLOC_PRODUCTION
	- turn off automatic crash dumps
	- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
	  GENERIC kernel config files[2]

[1] INVARIANTS* left on for ia64 by request marcel
[2] sun4v was left as-is

Reviewed by:	marcel, kib
Approved by:	re (implicit)
2009-09-10 14:04:00 +00:00
Konstantin Belousov
b67ca8999b MFC r196920:
insmntque_stddtr() clears vp->v_data and resets vp->v_op to
dead_vnodeops before calling vgone(). Revert r189706 and corresponding
part of the r186560.

Approved by:	re (kensmith)
2009-09-10 12:42:36 +00:00
Attilio Rao
0ebf7e8dfc MFC r196916:
Fix a list overrun.

Sponsored by:	Sandvine Incorporated
Approved by:	re (kib)
2009-09-10 11:27:07 +00:00
Konstantin Belousov
93566d2a83 MFC r196887:
In fhopen, vfs_ref() the mount point while vnode is unlocked, to prevent
vn_start_write(NULL, &mp) from operating on potentially freed or reused
struct mount *.

Remove unmatched vfs_rel() in cleanup.

Approved by:	re (kensmith)
2009-09-09 13:28:18 +00:00
Edwin Groothuis
3470119d8c MFC of r196581 r196582 r197000
Import of tzdata 2009k, 2009l and 2009m

- Changes in Mauritius and Bangladesh
- No leapsecond at the end of December 2009

- Egypt will go to Wintertime on 21 August 2009

- Samoa will go in DST on 4 October 2009 till 28 March 2010
- Palestine will go back from DST on 4 September 2009

Approved by:	re (kostik)
2009-09-09 12:19:43 +00:00
Konstantin Belousov
f68591e407 Use traditional td_unusedX names for the padding members.
Suggested by:	julian
Approved by:	re (kensmith)
2009-09-09 10:31:09 +00:00
Attilio Rao
c90c9ddddb Adaptive spinning for locking primitives, in read-mode, have some tuning
SYSCTLs which are inappropriate for a daily use of the machine (mostly
useful only by a developer which wants to run benchmarks on it).
Remove them before the release as long as we do not want to ship with
them in.

Now that the SYSCTLs are gone, instead than use static storage for some
constants, use real numeric constants in order to avoid eventual compiler
dumbiness and the risk to share a storage (and then a cache-line) among
CPUs when doing adaptive spinning together.

Pleasse note that the sys/linker_set.h inclusion in lockmgr and sx lock
support could have been gone, but re@ preferred them to be in order to
minimize the risk of problems on future merging.

Please note that this patch is not a MFC, but an 'edge case' as commit
directly to stable/8, which creates a diverging from HEAD.

Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Approved by:	re (kib)
2009-09-09 09:34:13 +00:00
Attilio Rao
db0c92ce82 MFC r196772:
fix adaptive spinning in lockmgr by using correctly GIANT_RESTORE and
continue statement and improve adaptive spinning for sx lock by just
doing once GIANT_SAVE.

Approved by:	re (kib)
2009-09-09 09:17:31 +00:00
Jack F Vogel
6a89c3ede1 Make LRO turned off uncategorically for devices
attached to the bridge, rather than just in the case
when some device cannot do TSO. Customer tests have
shown that even when all devices can do TSO that LRO
will cause problems when bridging.

Approved by:  re
2009-09-08 23:25:39 +00:00
John Baldwin
bae950f3b3 MFC 196745:
Don't attempt to bind the current thread to the CPU an IRQ is bound to
when removing an interrupt handler from an IRQ during shutdown.  During
shutdown we are already bound to CPU 0 and this was triggering a panic.

Approved by:	re (kib)
2009-09-08 21:50:34 +00:00
Jamie Gritton
3c7562c77e MFC r196835:
Allow a jail's name to be the same as its jid (which is the default if
  no name is specified), and let a numeric name specify the jid for a new
  jail when the jid isn't otherwise set.  Still disallow other numeric
  names.

Reviewed by:	zec
Approved by:	re (kib), bz (mentor)
2009-09-08 19:18:02 +00:00
Konstantin Belousov
2af00decb8 MFC r196730:
Remove the altkstacks, instead instantiate threads with kernel stack
allocated with the right size from the start. For the thread that has
kernel stack cached, verify that requested stack size is equial to the
actual, and reallocate the stack if sizes differ.

Introduce separate kernel stack cache that keeps some limited amount of
preallocated kernel stacks to lower the latency of thread allocation.

Not a merge: instead of removing td_altkstack* members of struct thread,
replace them with placeholders to keep struct thread layout on the
stable branch.

Also, record r196640, r196644 and r196648 as merged.

Approved by:	re (kensmith)
2009-09-08 15:31:23 +00:00
Konstantin Belousov
c02280f542 MFC r196692:
Make the mnt_writeopcount and mnt_secondary_writes counters,
used by the suspension code, not greater then mnt_ref reference
counter value.

MFC r196733:
Fix mount reference leak when V_XSLEEP is specified to vn_start_write().

Approved by:	re (kensmith)
2009-09-08 14:43:42 +00:00
Sam Leffler
d53c6c91b1 MFC r196717:
fix beacon timers on resume in sta mode so raoming works

Approved by:	re (kensmith)
2009-09-07 16:41:18 +00:00
Sam Leffler
f8083274f0 MFC r196785:
correct timeout for doing NOL processing; need a ticks-relative value

Approved by:	re (kensmith)
2009-09-07 16:33:27 +00:00
Pawel Jakub Dawidek
264a8db4b0 MFC r196579:
Fix an obvious topology lock leak.

Approved by:	re (kib)
2009-09-07 16:25:09 +00:00
Remko Lodder
07c141a646 MFC r196787
Do the first step in removing lukemftpd from the base system. Disconnect
  it from the build.

  If you are using the FTP daemon, please consider using the port ftp/tnftpd
  which is the same FTP server, but newer and might have more/better
  functionality.

  This results in us providing only one ftp daemon by default.

  Reviewed by:        bz
  Approved by:        imp (mentor, implicit)
  MFC after:        3 days
  Silence from:        obrien

Approved by:	re (kib), imp (mentor, implicit)
2009-09-07 14:10:55 +00:00
Alexander Motin
529d728924 MFC r196831:
Add to `camcontrol cmd` support for sending arbitrary ATA commands.

It could be used for broad range of tasks, such as configuring drive
power management, caching, security and any other features and tasks,
not supported by existing drivers.

Approved by:	re (ATA-CAM blanket)
2009-09-06 14:05:01 +00:00
Julian Elischer
9e432c37e0 MFC of r196477
Don't delete copies of nthread_create(9) we find inthe filesystem.
 we now link it to kproc_create(9), it's new name.

Approved by:	re (kib)
2009-09-06 06:05:23 +00:00
Qing Li
69406c1632 MFC r196871
The addresses that are assigned to the loopback interface
should be part of the kernel routing table.

Reviewed by:	bz
Approved by:	re
2009-09-05 20:35:18 +00:00
Qing Li
3d2a8d364d MFC r196864
This patch fixes the following issues:
- Interface link-local address is not reachable within the
  node that owns the interface, this is due to the mismatch
  in address scope as the result of the installed interface
  address loopback route. Therefore for each interface
  address loopback route, the rt_gateway field (of AF_LINK
  type) will be used to track which interface a given
  address belongs to. This will aid the address source to
  use the proper interface for address scope/zone validation.
- The loopback address is not reachable. The root cause is
  the same as the above.
- Empty nd6 entries are created for the IPv6 loopback addresses
  only for validation reason. Doing so will eliminate as much
  of the special case (loopback addresses) handling code
  as possible, however, these empty nd6 entries should not
  be returned to the userland applications such as the
  "ndp" command.
Since both of the above issues contain common files, these
files are committed together.

Reviewed by:	bz
Approved by:	re
2009-09-05 17:40:27 +00:00
Qing Li
02642a5729 MFC r196865
This patch fixes an address scope violation. Considering the
scenario where an anycast address is assigned on one interface,
and a global address with the same scope is assigned on another
interface. In other words, the interface owns the anycast
address has only the link-local address as one other address.
Without this patch, "ping6" the anycast address from another
station will observe the source address of the returned ICMP6
echo reply has the link-local address, not the global address
that exists on the other interface in the same node.

Reviewed by:    bz
Approved by:	re
2009-09-05 17:35:31 +00:00
Bjoern A. Zeeb
e0adffb3d5 MFC r196866:
In the NEXTADDR macro use SA_SIZE() rather than directly using
  sizeof(), as introduced in r186119, for advancing the current
  position into the buffer.
  See comment in net/route.h for a description of the difference.
  This makes ndp -s work again.

   Reviewed by:	qingli

Approved by:	re (kib)
2009-09-05 17:29:08 +00:00
Edward Tomasz Napierala
b9d99ec84d MFC r196740:
Fix regression introduced with NFSv4 ACL support - make acl_to_text(3)
and acl_calc_mask(3) return error instead of crashing when acl passed
to them is NULL.

Submitted by:	markus
Reviewed by:	rwatson
Approved by:	re (kib)
2009-09-05 15:01:56 +00:00
Konstantin Belousov
a0ed3d8546 MFC r196689:
Remove spurious pfs_unlock().

Approved by:	re (rwatson)
2009-09-05 13:10:54 +00:00
Warner Losh
45f395006c MFC r196529:
Rather than having enabled/disabled, implement a max queue depth.
  While usually not an issue, this firewalls bugs in the code that may
  run us out of memory.

  Fix a memory exhaustion in the case where devctl was disabled, but the
  link was bouncing.  The check to queue was in the wrong place.

  Implement a new sysctl hw.bus.devctl_queue to control the depth.  Make
  compatibility hacks for hw.bus.devctl_disable to ease transition.

  Reviewed by:	emaste@
  Approved by:	re@ (kib)
  MFC after:	asap
2009-09-05 08:03:29 +00:00
Alexander Motin
b89c161793 MFC r196777, r196796:
ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ).

Approved by:	re (ATA-CAM blanket)
2009-09-05 06:24:28 +00:00
Ken Smith
9d4abd5433 Ready for BETA4.
Approved by:	re (implicit)
2009-09-05 00:50:08 +00:00
Jack F Vogel
0bb40ca3e0 This patch seperates the control of header split from LRO (which it
was previously dependent on), LRO gets turned off when bridging but
its been found that header split is still a performance win in that case.

Secondly, there was some interface specific control in stats code that
has been missing, and a logic error that resulted in bogus reporting.
Thanks to Manish and John of LineRateSystems for the report and help in
this code.

Approved by: re
2009-09-04 22:37:03 +00:00
Pyun YongHyeon
b3d8f9c3fc MFC r196721:
Make sure rx descriptor ring align on 16 bytes. I guess the
  alignment requirement could be multiple of 4 bytes but I think
  using descriptor size would make intention clearer.
  Previously the size of rx descriptor was not power of 2 so it
  caused panic in bus_dmamem_alloc(9).

  Reported by:	Jeff Blank (jb000003 <> mr-happy dot com)
Approved by:	re (kib)
2009-09-04 16:41:17 +00:00
Stanislav Sedov
8b3a7204a7 - MFC r196568:
- Add quirk for Sony DSC digital cameras.  This umass devices fail
    to attach without these quirks applied.

Approved by:	re (kib)
2009-09-04 11:32:05 +00:00
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