]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix socket calls on error post-r243965.
kevlo [Fri, 21 Dec 2012 15:54:13 +0000 (15:54 +0000)]
Fix socket calls on error post-r243965.

Submitted by: Garrett Cooper

11 years agoMove the 64-bit _setjmp to lib/libstand.
rpaulo [Fri, 21 Dec 2012 15:15:35 +0000 (15:15 +0000)]
Move the 64-bit _setjmp to lib/libstand.

11 years agoRegression issue:
hselasky [Fri, 21 Dec 2012 14:17:39 +0000 (14:17 +0000)]
Regression issue:
Use a boundary of zero, hence a PAGE_SIZE boundary
is implied by all memory allocations.

Background:
Busdma has problems to allocate more than PAGE_SIZE
bytes when the boundary is PAGE_SIZE bytes too.
Initially it was thought that a boundary of PAGE_SIZE
bytes will only affect loading of DMA memory, so that
segments get split correctly, but it also affects
allocation of DMA'able memory.

Solution:
USB can detect big segments and split them as required
by the USB code.

MFC after: 1 week
Reported by: gonzo

11 years agoFixup r218424: uio_yield() was scaling directly to userland priority.
attilio [Fri, 21 Dec 2012 13:14:12 +0000 (13:14 +0000)]
Fixup r218424: uio_yield() was scaling directly to userland priority.
When kern_yield() was introduced with the possibility to specify
a new priority, the behaviour changed by not lowering priority at all
in the consumers, making the yielding mechanism highly ineffective for
high priority kthreads like bufdaemon, syncer, vlrudaemon, etc.
There are no evidences that consumers could bear with such change in
semantic and this situation could finally lead to bugs similar to the
ones fixed in r244240.
Re-specify userland pri for kthreads involved.

Tested by: pho
Reviewed by: kib, mdf
MFC after: 1 week

11 years ago Comment fix: there is no ub_ptr, instead explain meaning of uz_count
glebius [Fri, 21 Dec 2012 10:09:45 +0000 (10:09 +0000)]
  Comment fix: there is no ub_ptr, instead explain meaning of uz_count
field verbally.

11 years agoBuild a 64 bit version of the FICL library. This is need for a 64 bit
rpaulo [Fri, 21 Dec 2012 05:22:14 +0000 (05:22 +0000)]
Build a 64 bit version of the FICL library. This is need for a 64 bit
EFI bootloader (amd64 only for now).

This is not yet connected to the build.

11 years agoDivine the array size by using 'nitems(array)' instead of using magic numbers.
neel [Fri, 21 Dec 2012 04:44:40 +0000 (04:44 +0000)]
Divine the array size by using 'nitems(array)' instead of using magic numbers.

Suggested by: Garrett Cooper

11 years agoNote why fast frames is disabled for 802.11n NICs now.
adrian [Fri, 21 Dec 2012 04:28:05 +0000 (04:28 +0000)]
Note why fast frames is disabled for 802.11n NICs now.

It actually works, but net80211 handles A-MPDU and Fast frames
incorrectly; it tries enabling both in some instances, with tragic
results.

11 years agoSort default option lists
emaste [Fri, 21 Dec 2012 02:18:11 +0000 (02:18 +0000)]
Sort default option lists

11 years agoThe MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".
neel [Fri, 21 Dec 2012 01:31:56 +0000 (01:31 +0000)]
The MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".

Since the 'busses[]' and 'apics[]' arrays are indexed by these 8-bit IDs
make sure that they have enough space to accomodate up to 256 entries.

Submitted by: Ravi Shamanna
Obtained from: NetApp

11 years agoTeach acpidump to dump the DMA Remapping Reporting table (aka DMAR).
neel [Fri, 21 Dec 2012 01:19:48 +0000 (01:19 +0000)]
Teach acpidump to dump the DMA Remapping Reporting table (aka DMAR).

The DMAR table is documented in chapter 8 of the Intel VT-d specification.

Reviewed by: jhb
Obtained from: NetApp

11 years ago- Make sure that errno isn't modified before calling logerror() in error
markj [Thu, 20 Dec 2012 23:21:20 +0000 (23:21 +0000)]
- Make sure that errno isn't modified before calling logerror() in error
  conditions.
- Don't check for AF_INET6 when compiled without INET6 support.

PR: bin/173930
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoDon't reload syslogd after rotating sendmail.st, as this file isn't
markj [Thu, 20 Dec 2012 23:18:36 +0000 (23:18 +0000)]
Don't reload syslogd after rotating sendmail.st, as this file isn't
managed by syslogd.

PR: conf/169973
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years ago- Change the memory heuristics to an actually working one
gabor [Thu, 20 Dec 2012 22:30:40 +0000 (22:30 +0000)]
- Change the memory heuristics to an actually working one

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Prodded by: kib

11 years agorename the 'tag' and 'map' fields used the rx ring to their
luigi [Thu, 20 Dec 2012 22:26:03 +0000 (22:26 +0000)]
rename the 'tag' and 'map' fields used the rx ring to their
previous names, 'ptag' and 'pmap' -- p stands for packet.

This change reduces the difference between the code in stable/9
and head, and also helps using the same ixgbe_netmap.h on both branches.

Approved by: Jack Vogel

11 years agoAdd etc/periodic/daily/220.backup-pkgdb to OptionalObsoleteFiles.inc
bapt [Thu, 20 Dec 2012 22:07:47 +0000 (22:07 +0000)]
Add etc/periodic/daily/220.backup-pkgdb to OptionalObsoleteFiles.inc

11 years agoRewrite fdgrowtable() so common mortals can actually understand what
des [Thu, 20 Dec 2012 20:18:27 +0000 (20:18 +0000)]
Rewrite fdgrowtable() so common mortals can actually understand what
it does and how, and add comments describing the data structures and
explaining how they are managed.

11 years agoMake SES driver to not fall out on some errors in Additional Status page.
mav [Thu, 20 Dec 2012 19:51:32 +0000 (19:51 +0000)]
Make SES driver to not fall out on some errors in Additional Status page.
This allows CAM devices still get their physical paths even if status of
later elements it corrupted.

Sponsored by: iXsystems, Inc.

11 years agoMake sure all USB drivers allocate buffer memory
hselasky [Thu, 20 Dec 2012 18:38:02 +0000 (18:38 +0000)]
Make sure all USB drivers allocate buffer memory
through the USB API and/or busdma.

The following assumptions have been made:
umass - buffers passed from CAM/SCSI layer are OK
network - mbufs are OK.

Some other nits while at it.

MFC after: 1 week
Suggested by: imp

11 years agoAllocate separate USB buffers for DMA'ed data, so that
hselasky [Thu, 20 Dec 2012 18:13:37 +0000 (18:13 +0000)]
Allocate separate USB buffers for DMA'ed data, so that
DMA data does not reside next to non DMA data. This
might cause more memory to be allocated, but solves
problems on platforms using manual cache
synchronization.

Add a convenience function to get the buffer only
from a USB transfer's page cache structure.

MFC after: 1 week
Suggested by: imp

11 years agoMake bsdgrep behave as gnugrep and as documented: -m should only stop
eadler [Thu, 20 Dec 2012 17:38:14 +0000 (17:38 +0000)]
Make bsdgrep behave as gnugrep and as documented: -m should only stop
reading the specific file, not any file.

Tested by: frogs (irc)
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agoAdd support for throttling UMASS.
hselasky [Thu, 20 Dec 2012 17:14:10 +0000 (17:14 +0000)]
Add support for throttling UMASS.
Mostly useful for debugging purposes.

MFC after: 1 week

11 years agoMake sure we block recursion on TTY's inwakeup callback
hselasky [Thu, 20 Dec 2012 16:21:02 +0000 (16:21 +0000)]
Make sure we block recursion on TTY's inwakeup callback

Suggested by: davide
MFC after: 1 week

11 years agomake installation of the 220.backup-pkgdb periodic script depend on PKGTOOLS
bapt [Thu, 20 Dec 2012 11:39:20 +0000 (11:39 +0000)]
make installation of the 220.backup-pkgdb periodic script depend on PKGTOOLS
knob

11 years agoRecognize 5720S PHY and treat it as 5708S PHY.
yongari [Thu, 20 Dec 2012 05:02:12 +0000 (05:02 +0000)]
Recognize 5720S PHY and treat it as 5708S PHY.
Unfortunately 5720S uses 5709S PHY id so add a hack to detect 5720S
PHY by checking parent device name.  5720S PHY does not support 2500SX.

Tested by: Geans Pin < geanspin <> broadcom dot com >

11 years agoFor fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
yongari [Thu, 20 Dec 2012 04:47:31 +0000 (04:47 +0000)]
For fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
so do not touch it.

11 years agoReplace generic ARM11 option with more specific
gonzo [Thu, 20 Dec 2012 04:32:02 +0000 (04:32 +0000)]
Replace generic ARM11 option with more specific
support for ARM1136 and ARM1176

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Obtained from: NetBSD

11 years agoFix misleading comment
gonzo [Thu, 20 Dec 2012 03:33:33 +0000 (03:33 +0000)]
Fix misleading comment

11 years agoMore constant renaming in preparation for newer features.
pfg [Thu, 20 Dec 2012 02:22:36 +0000 (02:22 +0000)]
More constant renaming in preparation for newer features.

We also try to make better use of the fs flags instead of
trying adapt the code according to the fs structures. In
the case of subsecond timestamps and birthtime we now
check that the feature is explicitly enabled: previously
we only checked that the reserved space was available and
silently wrote them.

This approach is much safer, especially if the filesystem
happens to use embedded inodes or support EAs.

Discussed with: Zheng Liu
MFC after: 5 days

11 years agoWe want to build subr_busdma_bufalloc.c on arm.
cognet [Thu, 20 Dec 2012 00:57:24 +0000 (00:57 +0000)]
We want to build subr_busdma_bufalloc.c on arm.

11 years agoUse C comments instead of C++ comments.
cognet [Thu, 20 Dec 2012 00:50:04 +0000 (00:50 +0000)]
Use C comments instead of C++ comments.

Spotted out by: gonzo (thanks, man)

11 years agoBusdma enhancements, especially for managing small uncacheable buffers.
cognet [Thu, 20 Dec 2012 00:38:08 +0000 (00:38 +0000)]
Busdma enhancements, especially for managing small uncacheable buffers.

- Use the new architecture-agnostic buffer pool manager that uses uma(9)
  to manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

- Create pools of buffers backed by both regular and uncacheable memory,
  and use them to handle regular versus BUS_DMA_COHERENT allocations.

- Use uma(9) to manage a pool of bus_dmamap structs instead of local code
  to manage a static list of 500 items (it took 3300 maps to get to
  multi-user mode, so the static pool wasn't much of an optimization).

- Small BUS_DMA_COHERENT allocations no longer waste an entire page per
  allocation, or set pages to uncached when they contain data other than
  DMA buffers.  There's no longer a need for drivers to work around the
  inefficiency by allocing large buffers then sub-dividing them.

- Because we know the alignment and padding of buffers allocated by
  bus_dmamem_alloc() (whether coherent or regular memory, and whether
  obtained from the pool allocator or directly from the kernel) we
  can avoid doing partial cacheline flushes on them.

- Add a fast-out to _bus_dma_could_bounce() (and some comments about
  what the routine really does because the old misplaced comment was wrong).

- Everywhere the dma tag alignment is used, the interpretation is that
  an alignment of 1 means no special alignment.  If the tag is created
  with an alignment argument of zero, store it in the tag as one, and
  remove all the code scattered around that changed 0->1 at point of use.

- Remove stack-allocated arrays of segments, use a local array of two
  segments within the tag struct, or dynamically allocate an array at first
  use if nsegments > 2.  On an arm system I tested, only 5 of 97 tags used
  more than two segments.  On my x86 desktop it was only 7 of 111 tags.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoUse the new allocator in bus_dmamem_alloc().
cognet [Thu, 20 Dec 2012 00:35:26 +0000 (00:35 +0000)]
Use the new allocator in bus_dmamem_alloc().

11 years agoCreate an architecture-agnostic buffer pool manager that uses uma(9) to
cognet [Thu, 20 Dec 2012 00:34:54 +0000 (00:34 +0000)]
Create an architecture-agnostic buffer pool manager that uses uma(9) to
manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

This allows the caller to provide the back-end allocator uma allocator,
allowing full control of the memory pages backing the pool.  For
convenience, it provides an optional builtin allocator that provides pages
allocated with the VM_MEMATTR_UNCACHEABLE attribute, for managing pools of
DMA buffers for BUS_DMA_COHERENT or BUS_DMA_NOCACHE.

This also allows the caller to specify a minimum alignment, and it ensures
that all buffers start on a boundary and have a length that's a multiple of
that value, to avoid using buffers that trigger partial cache line flushes.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoGet the old NFSCLIENT to compile by adding now needed files.
cognet [Thu, 20 Dec 2012 00:06:24 +0000 (00:06 +0000)]
Get the old NFSCLIENT to compile by adding now needed files.

11 years agoReplace expand_name() function with corefile_open() function, which not
pjd [Wed, 19 Dec 2012 23:59:48 +0000 (23:59 +0000)]
Replace expand_name() function with corefile_open() function, which not
only returns name, but also vnode of corefile to use.

This simplifies the code and closes few races, especially in %I handling.

Reviewed by: kib
Obtained from: WHEEL Systems

11 years agoUse correct file permissions when looking for available core file if
pjd [Wed, 19 Dec 2012 23:40:02 +0000 (23:40 +0000)]
Use correct file permissions when looking for available core file if
kern.corefile contains %I.

Obtained from: WHEEL Systems

11 years agoPost r243965 the nfsd daemon will not start up for kernels
rmacklem [Wed, 19 Dec 2012 21:00:22 +0000 (21:00 +0000)]
Post r243965 the nfsd daemon will not start up for kernels
built without "options INET6". This patch fixes the problem.

Reported by: avg
Tested by: avg
MFC after: 2 weeks

11 years agoUse NFSCL since NFSCLIENT build is broken at the moment
gonzo [Wed, 19 Dec 2012 20:33:16 +0000 (20:33 +0000)]
Use NFSCL since NFSCLIENT build is broken at the moment

11 years ago - Add new machine parsable KTR macros for timing events.
jeff [Wed, 19 Dec 2012 20:10:00 +0000 (20:10 +0000)]
 - Add new machine parsable KTR macros for timing events.
 - Use this new format to automatically handle syscalls and VOPs.  This
   changes the earlier format but is still human readable.

Sponsored by: EMC / Isilon Storage Division

11 years ago - Correctly handle EWOULDBLOCK in quiesce_cpus
jeff [Wed, 19 Dec 2012 20:08:06 +0000 (20:08 +0000)]
 - Correctly handle EWOULDBLOCK in quiesce_cpus

Discussed with: mav

11 years agoWhen we have some address to forward (e.g. it was specified with ipfw fwd),
ae [Wed, 19 Dec 2012 17:28:17 +0000 (17:28 +0000)]
When we have some address to forward (e.g. it was specified with ipfw fwd),
we should pass it as first argument into in6_selectroute_fib function to
initiate new route lookup.

MFC after: 1 week

11 years agoMake dst_sa initialization only when it is actually needed.
ae [Wed, 19 Dec 2012 17:08:49 +0000 (17:08 +0000)]
Make dst_sa initialization only when it is actually needed.

MFC after: 1 week

11 years agoThe selectroute functions does own account of EHOSTUNREACH errors,
ae [Wed, 19 Dec 2012 17:02:07 +0000 (17:02 +0000)]
The selectroute functions does own account of EHOSTUNREACH errors,
no need to do it twice.

MFC after: 1 week

11 years agoSupport restrict qualifier in dwarf debug info
emaste [Wed, 19 Dec 2012 16:23:20 +0000 (16:23 +0000)]
Support restrict qualifier in dwarf debug info

Newer clang/llvm emit DW_TAG_restrict_type, which wasn't handled by gdb.
Import support from Apple's gdb-1822:

|  2009-03-24  Jason Molenda  (jmolenda@apple.com)
|
|    * gdbtypes.c (make_cv_type): Rename this function to make_cvr_type to
|    also handle restrict qualifiers.
|    (check_typedef): Handle TYPE_RESTRICT.
|    * gdbtypes.h (TYPE_FLAG_RESTRICT, TYPE_RESTRICT): New.
|    * hpread.c (hpread_type_lookup): Update to use make_cvr_type.
|    * stabsread.c (read_type): Pass the restrict qualifiers along.
|    * parse.c (follow_types): Pass the restrict qualifiers along.
|    * dwarf2read.c (read_tag_const_type): Call make_cvr_type.
|    (read_tag_volatile_type): Same.
|    (read_tag_restrict_type): New function.
|    (read_type_die): Handle DW_TAG_restrict_type.

Obtained from: Apple
Sponsored by: ADARA Networks

11 years agoThe 'flags' argument can be modified in vn_open_cred(), so we need to
pjd [Wed, 19 Dec 2012 12:14:08 +0000 (12:14 +0000)]
The 'flags' argument can be modified in vn_open_cred(), so we need to
set it for every loop interation.

Pointed out by: kib

11 years agoDo not audit paths we try when kern.corefile contains %I.
pjd [Wed, 19 Dec 2012 12:12:53 +0000 (12:12 +0000)]
Do not audit paths we try when kern.corefile contains %I.

Obtained from: WHEEL Systems

11 years agoStyle cleanups.
pjd [Wed, 19 Dec 2012 12:10:14 +0000 (12:10 +0000)]
Style cleanups.

11 years agoThe expand_name() function isn't called with the process lock held anymore,
pjd [Wed, 19 Dec 2012 12:00:09 +0000 (12:00 +0000)]
The expand_name() function isn't called with the process lock held anymore,
so we can safely use malloc(M_WAITOK) now.

Pointed out by: kib

11 years agoFix bug in r242720, that caused additional status page to not be used if
mav [Wed, 19 Dec 2012 09:55:13 +0000 (09:55 +0000)]
Fix bug in r242720, that caused additional status page to not be used if
descriptor page is supported.

11 years agoEliminate some definitions that haven't been used in a decade or more.
alc [Wed, 19 Dec 2012 05:07:27 +0000 (05:07 +0000)]
Eliminate some definitions that haven't been used in a decade or more.

11 years agoAdd myself as a new src committer.
markj [Wed, 19 Dec 2012 04:18:21 +0000 (04:18 +0000)]
Add myself as a new src committer.

Approved by: emaste (co-mentor)

11 years agoProperly implement pmap_[get|set]_memattr
cognet [Wed, 19 Dec 2012 00:24:31 +0000 (00:24 +0000)]
Properly implement pmap_[get|set]_memattr

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoMap BAR 4/5, because NVMe spec says devices may place the MSI-X table
jimharris [Tue, 18 Dec 2012 23:27:18 +0000 (23:27 +0000)]
Map BAR 4/5, because NVMe spec says devices may place the MSI-X table
behind BAR 4/5, rather than in BAR 0/1 with the control/doorbell registers.

Sponsored by: Intel

11 years agoAdd sysctls for changing GPIO pins function
gonzo [Tue, 18 Dec 2012 22:18:54 +0000 (22:18 +0000)]
Add sysctls for changing GPIO pins function

Submitted by: Luiz Otavio O Souza

11 years agoSimplify module definition by adding nvme_modevent to DRIVER_MODULE()
jimharris [Tue, 18 Dec 2012 22:10:40 +0000 (22:10 +0000)]
Simplify module definition by adding nvme_modevent to DRIVER_MODULE()
definition.

Submitted by:   Carl Delsey <carl.r.delsey@intel.com>

11 years agoDo not use taskqueue to defer completion work when using INTx. INTx now
jimharris [Tue, 18 Dec 2012 21:50:48 +0000 (21:50 +0000)]
Do not use taskqueue to defer completion work when using INTx.  INTx now
matches MSI-X behavior.

Sponsored by: Intel

11 years agoAdd an additional regression tests for other cases to ensure these do not get fixed...
eadler [Tue, 18 Dec 2012 21:42:45 +0000 (21:42 +0000)]
Add an additional regression tests for other cases to ensure these do not get fixed by accident.

11 years agoNo reason to install debug data with the schg flag
emaste [Tue, 18 Dec 2012 21:13:03 +0000 (21:13 +0000)]
No reason to install debug data with the schg flag

11 years agoPOSIX requires that non-existent or null arguments be treated as if a
eadler [Tue, 18 Dec 2012 21:02:38 +0000 (21:02 +0000)]
POSIX requires that non-existent or null arguments be treated as if a
zero argument were supplied.

Add a regression test to catch this case as well.

PR: bin/174521
Submitted by: Daniel Shahaf <danielsh@elego.de> (pr)
Submitted by: Mark Johnston <markjdb@gmail.com> (initial patch)
Reviewed by: jilles
Approved by: cperciva (implicit)
MFC after: 3 weeks

11 years agoUpdate arcmsr(4) to vendor version 1.20.00.26, this adds
delphij [Tue, 18 Dec 2012 20:47:23 +0000 (20:47 +0000)]
Update arcmsr(4) to vendor version 1.20.00.26, this adds
support for their new RAID adapter ARC-1214.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 Ching-Lung Huang <ching2048 areca com tw>
MFC after: 2 weeks

11 years agopsm: Support detection of Synaptics touchpad v7.5 and above
dumbbell [Tue, 18 Dec 2012 20:02:53 +0000 (20:02 +0000)]
psm: Support detection of Synaptics touchpad v7.5 and above

Starting with firmware v7.5, the "Read TouchPad Modes" ($01) and "Read
Capabilities" ($02) commands changed: previously constant bytes now
carry variable information.

We now compare those bytes to expected constants only for firmware prior
to v7.5.

Tested by: Zeus Panchenko <zeus@gnu.org.ua>
MFC after: 1 week

11 years agoprison_racct_detach can be called for not fully initialized jail, so make it check...
mjg [Tue, 18 Dec 2012 18:34:36 +0000 (18:34 +0000)]
prison_racct_detach can be called for not fully initialized jail, so make it check that the jail has racct before doing anything

PR: kern/174436
Reviewed by: trasz
MFC after: 3 days

11 years agoReplace our implementation of the vis(3) and unvis(3) APIs with
brooks [Tue, 18 Dec 2012 16:37:24 +0000 (16:37 +0000)]
Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.

11 years agowtap should not set the IEEE80211_F_DATAPAD flag;
monthadar [Tue, 18 Dec 2012 16:15:20 +0000 (16:15 +0000)]
wtap should not set the IEEE80211_F_DATAPAD flag;

Approved by: adrian (mentor)

11 years agowtap fix malloc/free.
monthadar [Tue, 18 Dec 2012 16:11:13 +0000 (16:11 +0000)]
wtap fix malloc/free.

* Remove malloc/free pointer cast;
* Check return value from malloc;

Submitted by: glebius
Approved by: adrian (mentor)

11 years agowtap should check if ieee80211_vap_setup fails.
monthadar [Tue, 18 Dec 2012 08:44:59 +0000 (08:44 +0000)]
wtap should check if ieee80211_vap_setup fails.

* If ieee80211_vap_setup fails, we free allocated M_80211_VAP
  memory and return NULL;

Approved by: adrian (mentor)

11 years agowtap: fix clang warning.
monthadar [Tue, 18 Dec 2012 08:41:23 +0000 (08:41 +0000)]
wtap: fix clang warning.

* The warning message was:
    'warning error: format string is not a string literal';
* Changed how make_dev is called, now a string literal
  for formatting is used;

Approved by: adrian (mentor)

11 years agoFix !INET6 build after r244365.
glebius [Tue, 18 Dec 2012 08:14:16 +0000 (08:14 +0000)]
Fix !INET6 build after r244365.

11 years agoClear correct flag in INET6 case.
glebius [Tue, 18 Dec 2012 08:09:44 +0000 (08:09 +0000)]
Clear correct flag in INET6 case.

11 years ago- Add sysctl to allow unprivileged users to call mlock(2)-family system
zont [Tue, 18 Dec 2012 07:36:45 +0000 (07:36 +0000)]
- Add sysctl to allow unprivileged users to call mlock(2)-family system
  calls and turn it on.
- Do not allow to call them inside jail. [1]

Pointed out by: trasz [1]
Reviewed by: avg
Approved by: kib (mentor)
MFC after: 1 week

11 years ago- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
zont [Tue, 18 Dec 2012 07:35:01 +0000 (07:35 +0000)]
- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

Reviewed by: avg, trasz
Approved by: kib (mentor)
MFC after: 1 week

11 years ago- Set memorylocked limit to 64Kb for default login class.
zont [Tue, 18 Dec 2012 07:27:50 +0000 (07:27 +0000)]
- Set memorylocked limit to 64Kb for default login class.
  This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Suggested by: avg
Approved by: kib (mentor)
MFC after: 1 week

11 years agoGet libcompiler-rt and libgcc building on ARM with clang.
andrew [Tue, 18 Dec 2012 07:26:55 +0000 (07:26 +0000)]
Get libcompiler-rt and libgcc building on ARM with clang.

* Don't provide clear_cache or the __sync_* functions on ARM with clang as
  they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
  extensions.

11 years agoFix typo in comment.
kevlo [Tue, 18 Dec 2012 06:37:23 +0000 (06:37 +0000)]
Fix typo in comment.

Reviewed by: thompsa

11 years agoMore correct version of prev. fix.
ache [Tue, 18 Dec 2012 04:44:36 +0000 (04:44 +0000)]
More correct version of prev. fix.

11 years agoPiete.Brooks at cl.cam.ac.uk reported via email a crash which was
rmacklem [Tue, 18 Dec 2012 00:25:48 +0000 (00:25 +0000)]
Piete.Brooks at cl.cam.ac.uk reported via email a crash which was
caused by use of an invalid kgss_gssd_handle during an upcall to
the gssd daemon when it has exited. This patch seems to avoid the
crashes by holding a reference count on the kgss_gssd_handle until
the upcall is done. It also adds a new mutex kgss_gssd_lock used to
make manipulation of kgss_gssd_handle SMP safe.

Tested by: Illias A. Marinos, Herbert Poeckl
Reviewed by: jhb
MFC after: 2 weeks

11 years agoUse CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
jimharris [Tue, 18 Dec 2012 00:00:07 +0000 (00:00 +0000)]
Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
LUNs for the virtual processor device.  This removes lots of CAM warnings,
and follows similar recent changes to tws(4) and twa(4) drivers.

Also fix case where CAM_REQ_CMP was getting OR'd with CAM_DEV_NOT_THERE
in the nonexistent LUN case, resulting in different CAM status (CAM_UA_TERMIO)
getting reported to CAM.  This issue existing previously, but was more subtle
because it changed CAM_SEL_TIMEOUT to CAM_CMD_TIMEOUT.

Sponsored by: Intel
Reported and tested by: Willem Jan Withagen <wjw@digiware.nl>
MFC after: 1 week

11 years agoHide OBJCOPY and others in POSIX mode
emaste [Mon, 17 Dec 2012 21:09:44 +0000 (21:09 +0000)]
Hide OBJCOPY and others in POSIX mode

Submitted by: Garrett Cooper

11 years agoSince we use different flags to detect tcp forwarding, and we share the
ae [Mon, 17 Dec 2012 20:55:33 +0000 (20:55 +0000)]
Since we use different flags to detect tcp forwarding, and we share the
same code for IPv4 and IPv6 in tcp_input, we should check both
M_IP_NEXTHOP and M_IP6_NEXTHOP flags.

MFC after: 3 days

11 years agoFix:
ache [Mon, 17 Dec 2012 19:17:10 +0000 (19:17 +0000)]
Fix:
line 11: Malformed conditional
(${TARGET} == "arm" || ${TARGET_ARCH} == "powerpc64")

11 years agoUse M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for
ae [Mon, 17 Dec 2012 14:36:56 +0000 (14:36 +0000)]
Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for
M_AUTHIPHDR.

Pointy hat to: ae
Reported by: Vadim Goncharov
MFC after: 3 days

11 years agoFix warning from valgrind when a failed entry is tested.
eadler [Mon, 17 Dec 2012 12:57:36 +0000 (12:57 +0000)]
Fix warning from valgrind when a failed entry is tested.

PR: kern/173008
Submitted by: Zhihao Yuan <lichray@gmail.com>
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agoMinor style tweaks.
pjd [Mon, 17 Dec 2012 10:51:22 +0000 (10:51 +0000)]
Minor style tweaks.

Obtained from: WHEEL Systems

11 years agoBetter variables naming in expand_name() to be more consistent with coredump().
pjd [Mon, 17 Dec 2012 10:48:10 +0000 (10:48 +0000)]
Better variables naming in expand_name() to be more consistent with coredump().

Obtained from: WHEEL Systems

11 years agolibc/iconv: Fix race condition with setting FD_CLOEXEC.
jilles [Mon, 17 Dec 2012 10:38:51 +0000 (10:38 +0000)]
libc/iconv: Fix race condition with setting FD_CLOEXEC.

A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and as a side effect simplifies the code.

NetBSD already had this (I checked this after making the change myself).

Reviewed by: gabor

11 years ago- Fix handling of .mps files
gabor [Mon, 17 Dec 2012 10:12:12 +0000 (10:12 +0000)]
- Fix handling of .mps files

PR: bin/161454
Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>

11 years agoWarn about reaching various PF limits.
pjd [Mon, 17 Dec 2012 10:10:13 +0000 (10:10 +0000)]
Warn about reaching various PF limits.

Reviewed by: glebius
Obtained from: WHEEL Systems

11 years ago- Use unsigned int for values obtained with sysctlbyname(). This fixes
gabor [Mon, 17 Dec 2012 09:36:43 +0000 (09:36 +0000)]
- Use unsigned int for values obtained with sysctlbyname().  This fixes
  sparc64 performance problems.

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Tested by: trasz

11 years agoMake sure to stop both TX and RX MACs in ale_stop_mac(). Previously
yongari [Mon, 17 Dec 2012 06:01:57 +0000 (06:01 +0000)]
Make sure to stop both TX and RX MACs in ale_stop_mac(). Previously
it used to stop TX MAC only such that MAC reconfiguration after
getting a link didn't work as expected.

PR: kern/173652

11 years agoamd64 only has rela sections.
rpaulo [Mon, 17 Dec 2012 00:34:07 +0000 (00:34 +0000)]
amd64 only has rela sections.

11 years agoFix the gssd daemon so that it uses syslog() to report
rmacklem [Mon, 17 Dec 2012 00:31:55 +0000 (00:31 +0000)]
Fix the gssd daemon so that it uses syslog() to report
an error instead of calling err() when it is daemonized,
so that the error gets logged.

Discussed with: rwatson, jhb
Tested by: Illias A. Marinos, Herbert Poeckl
MFC after: 2 weeks

11 years ago- Fix strtol() error handling.
hrs [Sun, 16 Dec 2012 23:46:59 +0000 (23:46 +0000)]
- Fix strtol() error handling.
- Add a range condition of given FIB number and the related error messages.
- Fix free() problem.

Spotted by: Artyom Mirgorodskiy
Discussed with: glebius

11 years agoUse new savecore(8) option and limit number of kernel dumps that will
pjd [Sun, 16 Dec 2012 23:29:56 +0000 (23:29 +0000)]
Use new savecore(8) option and limit number of kernel dumps that will
be kept around to the 10 most recent ones.

Add UPDATING entry with info how to return to the previous behaviour (no
limits).

Obtained from: WHEEL Systems

11 years agoWith rotating kernel dumps the higest dump number is not necessarily the
pjd [Sun, 16 Dec 2012 23:09:27 +0000 (23:09 +0000)]
With rotating kernel dumps the higest dump number is not necessarily the
last one. To make it easier to find the last one create symlinks with 'last'
suffix that will point to the files of the last coredump, eg.:

info.last -> info.5
textdump.tar.last.gz -> textdump.tar.5.gz

Reviewed by: avg
Obtained from: WHEEL Systems

11 years agoImplement -m option to savecore(8) that allows to limit number of kernel
pjd [Sun, 16 Dec 2012 23:06:12 +0000 (23:06 +0000)]
Implement -m option to savecore(8) that allows to limit number of kernel
dumps stored. Once the limit is reached it restarts from 0.

Reviewed by: avg
Obtained from: WHEEL Systems

11 years agoMake use of the fact that we changed working directory to the dump directory
pjd [Sun, 16 Dec 2012 23:04:31 +0000 (23:04 +0000)]
Make use of the fact that we changed working directory to the dump directory
earlier.

Obtained from: WHEEL Systems

11 years agoMinor wording improvments to some manual pages
eadler [Sun, 16 Dec 2012 23:00:13 +0000 (23:00 +0000)]
Minor wording improvments to some manual pages

Approved by: bcr (mentor)
Obtained from: DragonflyBSD (a5294ca835317c68c919ab43936da4f05ab6e926)
MFC after: 3 days

11 years agoSort flags properly.
pjd [Sun, 16 Dec 2012 22:59:58 +0000 (22:59 +0000)]
Sort flags properly.

Obtained from: WHEEL Systems

11 years agoPrefer snprintf() over sprintf().
pjd [Sun, 16 Dec 2012 22:59:25 +0000 (22:59 +0000)]
Prefer snprintf() over sprintf().

Obtained from: WHEEL Systems