Commit Graph

175276 Commits

Author SHA1 Message Date
Attilio Rao
85e43e9636 Improve bufring impl:
- Remove unused br_prod_bufs member
- Fixup r241037: buf_ring pads br_prod_* and br_cons_* members at 128
  bytes, assuming a fixed cache line size for all the architectures.
  However, the above mentioned revision broke the padding.
  Use explicit padding to the CACHE_LINE_SIZE on the members that
  mark the initial new padded sections. Of course, the padding is not
  important for performance reasons in the DEBUG_BUFRING case, leaving
  br_cons members to share the cache line with br_lock.
- Fixup r244732: by removing incorrectly added membar in
  buf_ring_dequeue_sc() where surrounding locking shoud be enough.
- Drastically reduce the number of membar used (pratically reverting
  r244732) by switching rmb() in buf_ring_dequeue_mc() and wmb() in
  buf_ring_enqueue() to be complete barriers.  This, along with
  br_prod_bufs departure, should fix ordering issues as explained in
  the provided comments.

This patch is not targeted for MFC.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	glebius
2012-12-28 17:41:36 +00:00
Hajimu UMEMOTO
1e2c3a2917 Fix location of /var/audit/dist and /var/audit/remote.
Note that those who did installworld after r243752 should
remove wrongly created /var/dist and /var/remote.

Reviewed by:	pjd
2012-12-28 10:42:01 +00:00
Gleb Smirnoff
d8aa10cc35 In netpfil/pf:
- Add my copyright to files I've touched a lot this year.
  - Add dash in front of all copyright notices according to style(9).
  - Move $OpenBSD$ down below copyright notices.
  - Remove extra line between cdefs.h and __FBSDID.
2012-12-28 09:19:49 +00:00
Adrian Chadd
2720a0cbd9 Add the AR9280 and later spectral scan register definitions.
Obtained from:	Linux ath9k, Qualcomm Atheros (datasheet)
2012-12-28 08:00:31 +00:00
Adrian Chadd
00ba39c988 Add radar_bin_thresh_sel (bit 24:26), which defines when
to consider the radar FFT report bins as "strong".
2012-12-28 07:49:45 +00:00
Oleksandr Tymoshenko
7fc3ae51f3 Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
Oleksandr Tymoshenko
3ada2d599e Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB
code. All of them are linear framebuffers and should have common bits
moved to reusable framework.
2012-12-28 03:18:05 +00:00
David Xu
9d4bf0db7c Use strlcpy to NULL-terminate error message even if user provided a short
buffer.
2012-12-28 02:43:33 +00:00
Oleksandr Tymoshenko
0c093a7055 Fix event timer on Raspberry Pi
- Disable interrupt when updating compare value in order to
   make this operation atomical

- Increase minimum period for event timer. Systimer on BCM2835
    is compare timer, so if minimum period is too small it might
    be less then fraction of time between "read current value" and
    "set compare timer" operations. It means that when timer is armed
    actual counter value is more then compare value and it will take
    whole cycle (~32sec for 1MHz timer) to fire interrupt.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
2012-12-28 01:38:43 +00:00
Xin LI
5625bb0c36 Add derived versions for common Simplified Chinese encodings.
MFC after:	2 weeks
2012-12-28 01:23:12 +00:00
Xin LI
190fb357ca Add zh_CN.UTF-8 catalog.
Reviewed by:	alphachi <alphachi mediaspirit.org>
MFC after:	2 weeks
2012-12-28 01:09:30 +00:00
Oleksandr Tymoshenko
142043670b Add custom renderer for poor man's cursor support for framebuffer console 2012-12-28 00:55:43 +00:00
Andrey V. Elsukov
e37e7917f3 Add an ability to set net.link.stf.permit_rfc1918 from the loader.
MFC after:	2 weeks
2012-12-27 21:26:08 +00:00
Andrey V. Elsukov
51743c5f73 Add net.link.stf.permit_rfc1918 sysctl variable. It can be used to allow
the use of private IPv4 addresses with stf(4).

MFC after:	2 weeks
2012-12-27 20:59:22 +00:00
Baptiste Daroussin
5019747579 avoid arithmetic on uintptr_t
Submitted by:	pjd
Reviewed by:	jilles
2012-12-27 20:47:34 +00:00
Baptiste Daroussin
7d90019877 cast to uintptr_t to properly calculate offset
Reported by:	mdf
Submitted by:	db
2012-12-27 20:31:12 +00:00
Baptiste Daroussin
ede89d5db2 Add O_CLOEXEC to flopen
Requested by:	jilles
2012-12-27 20:24:44 +00:00
Baptiste Daroussin
b3075010f8 Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil. 2012-12-27 19:43:29 +00:00
Baptiste Daroussin
1067c64a19 gr_dup: simplify duplication of group
Submitted by:	db
2012-12-27 19:33:43 +00:00
Baptiste Daroussin
2bfeb4fe75 - Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by:	db
2012-12-27 16:51:29 +00:00
Baptiste Daroussin
0c50344969 Fix a regression in "pw group show" introduced r242349:
print a newline after printing each group line.

PR:		bin/174731
Submitted by:	Jan Beich <jbeich@tormail.org>
2012-12-27 14:44:13 +00:00
Baptiste Daroussin
460a6dac0b Simplify the code by using the new gr_add function 2012-12-27 14:35:06 +00:00
Baptiste Daroussin
be49c83011 New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by:	db
2012-12-27 14:30:19 +00:00
Baptiste Daroussin
98e79fb122 Use flopen(3) instead of open(2) + flock(2) 2012-12-27 14:09:50 +00:00
Jilles Tjoelker
a68c6b5790 test(1): Document == alias for =.
Reviewed by:	gjb
Requested by:	gjb
MFC after:	1 week
2012-12-27 13:21:37 +00:00
Attilio Rao
ad9505aae7 Remove an unused var.
Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-27 12:53:46 +00:00
Attilio Rao
30c7dd147c br_prod_tail and br_cons_tail members are used as barrier to
signal bug_ring ownership. However, instructions can be reordered
around members write leading to stale values for ie. br_prod_bufs.

Use correct memory barriers to ensure proper ordering of the
ownership tokens updates.

Sponsored by:	EMC / Isilon storage division
MFC after:	2 weeks
2012-12-27 12:36:58 +00:00
Luigi Rizzo
9aff36d897 use nanosecond resolution, make sure gettimeofday
is called at most every 100 packets.
2012-12-27 09:15:21 +00:00
Michael Tuexen
11e03b3200 Some cleanups.
MFC after: 3 days
2012-12-27 08:10:58 +00:00
Michael Tuexen
72c123a8b4 Minor cleanups of debug messages.
MFC after: 3 days
2012-12-27 08:06:58 +00:00
Michael Tuexen
2c2e3218cb Fix a copy and paste error.
MFC after: 3 days
2012-12-27 08:02:58 +00:00
Devin Teske
d1bb7cca77 Comments and fit to 80-columns. 2012-12-27 07:52:50 +00:00
Baptiste Daroussin
ae61f4dda6 Simplify copying of group members by using memcpy
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:16:24 +00:00
Baptiste Daroussin
c195c1ba19 Fix off-by-one error in memory allocation: j entries, one new and a null
terminator is j + 2.

Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:14:33 +00:00
Mark Johnston
7716eb4c40 Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
typically do not handle the SYNCHRONIZE_CACHE command - they either
return an error or the firmware enters a reset loop.

Reviewed by:	hselasky
Approved by:	rstone (co-mentor)
MFC after:	2 weeks
2012-12-26 22:21:27 +00:00
Pawel Jakub Dawidek
6011443800 Reset provider-specific fields when resending I/O request in low memory
conditions. This fixes assertion which checks those fields when kernel is
compiled with DIAGNOSTIC.

Reported by:	kib, pho
MFC after:	1 week
2012-12-26 20:07:47 +00:00
Raphael Kubo da Costa
b42a2049f1 Use DEVMETHOD_END, as suggested by hselasky@.
Approved by:	glebius
2012-12-26 19:14:21 +00:00
Raphael Kubo da Costa
ac76cdc670 Use the correct USB interface macros instead of USB_IF_CSI.
As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want
to declare the device's interface class, subclass and protocol, not class,
subclass and driver info.

Follow-up to r244704.

PR:		kern/174707
Approved by:	glebius
MFC after:	1 week
2012-12-26 19:12:31 +00:00
Baptiste Daroussin
0083d61abc In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.
2012-12-26 18:28:17 +00:00
Baptiste Daroussin
dc0f2b4217 Fix creating a user and adding it to a group
Reported by:	"Sam Fourman Jr." <sfourman@gmail.com>, dim
2012-12-26 18:14:45 +00:00
Attilio Rao
c92c859b7b Fixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
case. There is no point in optimizing further the code and use a TRUE
litteral for a path that does heavyweight stuff anyway (like lock acq),
at the price of obfuscated code.

Use the appropriate check where necessary and remove a macro.

Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-26 15:20:32 +00:00
Gleb Smirnoff
70a0e3403a Add vendor IDs for Broadcom USB dongles (BCM20702).
PR:		kern/174707
Submitted by:	rakuco
2012-12-26 15:10:20 +00:00
David Xu
fee3029ce7 Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine
panics with:
   free: address xxx(yyy) has not been allocated.
it can be triggered by hald.
2012-12-26 13:07:17 +00:00
Sergey Kandaurov
322f22f7b5 Fix libproc test case to work with clang premature optimization
observed with -O2 (used by default).
Avoid function inlining for t1_bkpt_t on which we set a breakpoint.
Otherwise the address of the function is never called thus the
breakpoint never triggers.

Reported by:	zont
Reviewed by:	rpaulo
2012-12-26 05:11:48 +00:00
Rick Macklem
659cf796d3 Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after:	2 weeks
2012-12-25 22:47:49 +00:00
Rick Macklem
211024e9b6 Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after:	2 weeks
2012-12-25 22:34:43 +00:00
Antoine Brodin
3496d72c48 Use correct size in snprintf.
Remove unused buffer.

PR:		174631
Submitted by:	Henning Petersen
MFC after:	1 month
2012-12-25 17:06:05 +00:00
Gleb Smirnoff
c4d0697685 Garbage collect carp_cksum(). 2012-12-25 14:29:38 +00:00
Jilles Tjoelker
cdbd40cbb2 sh: Prefer strsignal() to accessing sys_siglist directly.
Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsignal() will put in the signal number for
unknown signals (FreeBSD-specific) so we need not do that ourselves.

Unfortunately, there is no function for sys_signame.
2012-12-25 14:17:09 +00:00
Gleb Smirnoff
7951008b47 Change net.inet.carp.demotion sysctl to add the supplied value
to the current demotion factor instead of assigning it.

  This allows external scripts to control demotion factor together
with kernel in a raceless manner.
2012-12-25 14:08:13 +00:00