Commit Graph

184335 Commits

Author SHA1 Message Date
pfg
bd8e345ca3 gcc: avoid generating negative values to DW_AT_byte_size.
The previous change was actually a NOP because size is
unsigned and compilers are dumb.

Submitted by:	Christoph Mallon
MFC after:	1 week
2012-12-28 22:06:50 +00:00
gjb
cb6e785025 Fix wording nit.
PR:		174787
Submitted by:	Cody Rank
MFC after:	3 days
2012-12-28 22:06:33 +00:00
bapt
b3ae40e771 Fix typo in comment.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-28 21:59:47 +00:00
delphij
142067f4d7 Add DEVICE_IDENTIFY method for wbwd(4), required on most of recent
Supermicro motherboards.

Tested on X8STi and X8DTH boards.

Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2012-12-28 21:35:47 +00:00
delphij
8223ea30bc Use DEVMETHOD_END.
MFC after:	2 weeks
2012-12-28 20:44:23 +00:00
bapt
9db4d3200a Simplify pointing dst after the end of all the gr_mem pointers in newgr
Submitted by:	pjd
Reviewed by:	db
2012-12-28 20:44:10 +00:00
bapt
3c6bd22efe errno = ENOMEM was supposed to be removed not return (NULL);
Submitted by:	gcooper
2012-12-28 20:30:04 +00:00
bapt
83035e8984 malloc() sets errno to ENOMEM already.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-28 20:21:14 +00:00
bapt
b69ff2af2f Do not leave parts of the new group uninitialized in gr_dup().
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Reported by:	pjd
2012-12-28 20:19:54 +00:00
pfg
618ba5b4be gcc: avoid generating negative values to DW_AT_byte_size.
There is a bug in gcc (GCC/35998) where dwarf reports
sizes of unsigned -1 (0xffffffff).

On NetBSD this generated a faulty CTF entry which then
caused a segfault in ctfmerge. The issue was worked
around in NetBSD's Dtrace but since the issue originated
in gcc, it seems reasonable to fix it here.

Upstream gcc has been slow to react to this issue and
the author that submitted the patch is not interested
in licensing the change to us, so I did an independent
workaround for the issue.

MFC after:	1 week
2012-12-28 19:02:28 +00:00
attilio
5da31a9936 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
ume
1bd72ff3fb 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
glebius
52213d7415 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
fb3ba4e829 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
75c668d7f6 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
gonzo
0875ed61b8 Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
gonzo
1231ad9b21 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
davidxu
b7760e9ec4 Use strlcpy to NULL-terminate error message even if user provided a short
buffer.
2012-12-28 02:43:33 +00:00
gonzo
bda4c885f5 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
delphij
ab5f5cd77f Add derived versions for common Simplified Chinese encodings.
MFC after:	2 weeks
2012-12-28 01:23:12 +00:00
delphij
b179cbf13b Add zh_CN.UTF-8 catalog.
Reviewed by:	alphachi <alphachi mediaspirit.org>
MFC after:	2 weeks
2012-12-28 01:09:30 +00:00
gonzo
6274b9f3de Add custom renderer for poor man's cursor support for framebuffer console 2012-12-28 00:55:43 +00:00
ae
f89408c03e 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
ae
6064718574 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
bapt
9708a96be5 avoid arithmetic on uintptr_t
Submitted by:	pjd
Reviewed by:	jilles
2012-12-27 20:47:34 +00:00
bapt
85f7f7664e cast to uintptr_t to properly calculate offset
Reported by:	mdf
Submitted by:	db
2012-12-27 20:31:12 +00:00
bapt
85a7bc8863 Add O_CLOEXEC to flopen
Requested by:	jilles
2012-12-27 20:24:44 +00:00
bapt
cdddb6f42a Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil. 2012-12-27 19:43:29 +00:00
bapt
2f0af9e7e5 gr_dup: simplify duplication of group
Submitted by:	db
2012-12-27 19:33:43 +00:00
bapt
247c2a4086 - Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by:	db
2012-12-27 16:51:29 +00:00
bapt
a7f43aa146 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
bapt
e5fca3f7cb Simplify the code by using the new gr_add function 2012-12-27 14:35:06 +00:00
bapt
b63557c001 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
bapt
925e83c0bd Use flopen(3) instead of open(2) + flock(2) 2012-12-27 14:09:50 +00:00
jilles
e2e297c506 test(1): Document == alias for =.
Reviewed by:	gjb
Requested by:	gjb
MFC after:	1 week
2012-12-27 13:21:37 +00:00
attilio
6570808ee2 Remove an unused var.
Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-27 12:53:46 +00:00
attilio
623f494155 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
eb65fddc45 use nanosecond resolution, make sure gettimeofday
is called at most every 100 packets.
2012-12-27 09:15:21 +00:00
tuexen
c79f406296 Some cleanups.
MFC after: 3 days
2012-12-27 08:10:58 +00:00
tuexen
9b6fdf83a8 Minor cleanups of debug messages.
MFC after: 3 days
2012-12-27 08:06:58 +00:00
tuexen
86859ae7b8 Fix a copy and paste error.
MFC after: 3 days
2012-12-27 08:02:58 +00:00
dteske
29c6e27591 Comments and fit to 80-columns. 2012-12-27 07:52:50 +00:00
bapt
219a9acfae Simplify copying of group members by using memcpy
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:16:24 +00:00
bapt
bc1ecc20ad 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
markj
6b14b2464d 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
pjd
a86b6e7ae5 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
rakuco
5f0225e4d6 Use DEVMETHOD_END, as suggested by hselasky@.
Approved by:	glebius
2012-12-26 19:14:21 +00:00
rakuco
bb2a206235 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
bapt
13dabd466a 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
bapt
d1e0080a5e 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