]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoReplace generic ARM11 option with more specific
Oleksandr Tymoshenko [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
Oleksandr Tymoshenko [Thu, 20 Dec 2012 03:33:33 +0000 (03:33 +0000)]
Fix misleading comment

11 years agoMore constant renaming in preparation for newer features.
Pedro F. Giffuni [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.
Olivier Houchard [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.
Olivier Houchard [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.
Olivier Houchard [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().
Olivier Houchard [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
Olivier Houchard [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.
Olivier Houchard [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
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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
Rick Macklem [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
Oleksandr Tymoshenko [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 Roberson [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 Roberson [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),
Andrey V. Elsukov [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.
Andrey V. Elsukov [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,
Andrey V. Elsukov [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
Ed Maste [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
Pawel Jakub Dawidek [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.
Pawel Jakub Dawidek [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.
Pawel Jakub Dawidek [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,
Pawel Jakub Dawidek [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
Alexander Motin [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.
Alan Cox [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.
Mark Johnston [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
Olivier Houchard [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
Jim Harris [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
Oleksandr Tymoshenko [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()
Jim Harris [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
Jim Harris [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...
Eitan Adler [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
Ed Maste [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
Eitan Adler [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
Xin LI [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
Jean-Sébastien Pédron [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...
Mateusz Guzik [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 Davis [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 Al Jaberi [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 Al Jaberi [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 Al Jaberi [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 Al Jaberi [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.
Gleb Smirnoff [Tue, 18 Dec 2012 08:14:16 +0000 (08:14 +0000)]
Fix !INET6 build after r244365.

11 years agoClear correct flag in INET6 case.
Gleb Smirnoff [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
Andrey Zonov [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.
Andrey Zonov [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.
Andrey Zonov [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 Turner [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.
Kevin Lo [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.
Andrey A. Chernov [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
Rick Macklem [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
Jim Harris [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
Ed Maste [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
Andrey V. Elsukov [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:
Andrey A. Chernov [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
Andrey V. Elsukov [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.
Eitan Adler [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.
Pawel Jakub Dawidek [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().
Pawel Jakub Dawidek [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 Tjoelker [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 Kovesdan [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.
Pawel Jakub Dawidek [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 Kovesdan [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
Pyun YongHyeon [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.
Rui Paulo [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
Rick Macklem [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.
Hiroki Sato [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
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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
Eitan Adler [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.
Pawel Jakub Dawidek [Sun, 16 Dec 2012 22:59:58 +0000 (22:59 +0000)]
Sort flags properly.

Obtained from: WHEEL Systems

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

Obtained from: WHEEL Systems

11 years agoRevert r237842 and switch back to SCHED_ULE. All problems I encountered
Marius Strobl [Sun, 16 Dec 2012 20:54:07 +0000 (20:54 +0000)]
Revert r237842 and switch back to SCHED_ULE. All problems I encountered
with the latter have been fixed with r241780.

MFC after: 3 days

11 years agoRestore pre-r234898 printing of boot loader and path.
Marius Strobl [Sun, 16 Dec 2012 20:43:29 +0000 (20:43 +0000)]
Restore pre-r234898 printing of boot loader and path.

MFC after: 3 days

11 years agoMove expand_name() after process lock is released.
Pawel Jakub Dawidek [Sun, 16 Dec 2012 14:53:27 +0000 (14:53 +0000)]
Move expand_name() after process lock is released.

This fixed panic where we hold mutex (process lock) and try to obtain sleepable
lock (vnode lock in expand_name()). The panic could occur when %I was used
in kern.corefile.

Additionally we avoid expand_name() overhead when coredumps are disabled.

Obtained from: WHEEL Systems

11 years agoWhen growing a filesystem, don't leave unused space at the end
Edward Tomasz Napierala [Sun, 16 Dec 2012 14:37:25 +0000 (14:37 +0000)]
When growing a filesystem, don't leave unused space at the end
if there is not enough room for a full cylinder group.

Reviewed by: mckusick@

11 years agoDon't add audit record when coredumps are disabled or name cannot be expanded.
Pawel Jakub Dawidek [Sun, 16 Dec 2012 14:24:59 +0000 (14:24 +0000)]
Don't add audit record when coredumps are disabled or name cannot be expanded.

Discussed with: rwatson
Obtained from: WHEEL Systems

11 years agoMake the check easier to read.
Pawel Jakub Dawidek [Sun, 16 Dec 2012 14:14:18 +0000 (14:14 +0000)]
Make the check easier to read.

Obtained from: WHEEL Systems

11 years agoUse 'cred' variable.
Pawel Jakub Dawidek [Sun, 16 Dec 2012 13:56:38 +0000 (13:56 +0000)]
Use 'cred' variable.

Obtained from: WHEEL Systems

11 years agoFix comment to represent actual file purpose
Oleksandr Tymoshenko [Sun, 16 Dec 2012 00:20:16 +0000 (00:20 +0000)]
Fix comment to represent actual file purpose

Spotted by: gavin@

11 years agosbuf_trim() cannot be used on sbuf with drain function set.
Pawel Jakub Dawidek [Sat, 15 Dec 2012 22:26:16 +0000 (22:26 +0000)]
sbuf_trim() cannot be used on sbuf with drain function set.
This fixes panic when listing sysctls on INVARIANTS-enabled kernel while
having wbwd loaded.

This panic was not fatal, at worst one additional space was printed.

Also sbuf_trim() makes some sense even if drain function is set. The drain
function is called only when buffer is to be expanded. So we could still trim
existing buffer before drain is called. In this case it worked just fine - the
trailing space was correctly trimmed.

Obtained from: WHEEL Systems
MFC after: 1 week

11 years agoIgnore a warning in ubldr where clang doesn't understand the %D printf
Andrew Turner [Sat, 15 Dec 2012 21:47:05 +0000 (21:47 +0000)]
Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.

11 years agoAlso remove -Werror on arm with clang as there are warnings.
Andrew Turner [Sat, 15 Dec 2012 21:33:12 +0000 (21:33 +0000)]
Also remove -Werror on arm with clang as there are warnings.

11 years agoDon't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
Andrew Turner [Sat, 15 Dec 2012 21:24:31 +0000 (21:24 +0000)]
Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
built with clang. When these are defined the lists are defined similar to:

asm(".section .ctors");
STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };
asm(".section .dtors");
STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };

The problem is clang will move the two arrays out of the .ctors and .dtors
sections causing these sections to contain a single null address. By not
defining these macros we use the version of the code that places the arrays
is their sections by using __attribute__((section(".ctors"))) and similar
for .dtors.

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoRecognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
Andrew Turner [Sat, 15 Dec 2012 21:12:13 +0000 (21:12 +0000)]
Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
these even when building soft floating-point code

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoFix a comment in an asm block to work with compilers other than GCC
Andrew Turner [Sat, 15 Dec 2012 21:06:14 +0000 (21:06 +0000)]
Fix a comment in an asm block to work with compilers other than GCC

11 years agoIn additional to the tailq of IPv6 addresses add the hash table.
Andrey V. Elsukov [Sat, 15 Dec 2012 20:04:24 +0000 (20:04 +0000)]
In additional to the tailq of IPv6 addresses add the hash table.
For now use 256 buckets and fnv_hash function. Use xor'ed 32-bit
s6_addr32 parts of in6_addr structure as a hash key. Update
in6_localip and in6_is_addr_deprecated to use hash table for fastest
lookup.

Sponsored by: Yandex LLC
Discussed with: dwmalone, glebius, bz

11 years agoChange `iostat -Ix` to display total duration of transactions instead
Mikolaj Golub [Sat, 15 Dec 2012 18:21:09 +0000 (18:21 +0000)]
Change `iostat -Ix` to display total duration of transactions instead
of average duration, and total busy time instead of %.

This looks more useful when one runs `iostat -Ix` periodically to
collect statistics: e.g. now it is possible to calculate busy %
between two runs subtracting total busy times and dividing per time
period.

Average duration and % busy are still available via `iostat -x`.

11 years agoNew devstat metrics for devstat_compute_statistics():
Mikolaj Golub [Sat, 15 Dec 2012 18:19:48 +0000 (18:19 +0000)]
New devstat metrics for devstat_compute_statistics():

  DSM_TOTAL_DURATION
  DSM_TOTAL_DURATION_READ
  DSM_TOTAL_DURATION_WRITE
  DSM_TOTAL_DURATION_FREE
  DSM_TOTAL_DURATION_OTHER
  DSM_TOTAL_BUSY_TIME

11 years agoUpdate to the new and brighter pkg world
Poul-Henning Kamp [Sat, 15 Dec 2012 17:54:29 +0000 (17:54 +0000)]
Update to the new and brighter pkg world

11 years agoIn pfioctl, if the permission checks failed we returned with vnet context
Mikolaj Golub [Sat, 15 Dec 2012 17:19:36 +0000 (17:19 +0000)]
In pfioctl, if the permission checks failed we returned with vnet context
set.

As the checks don't require vnet context, this is fixed by setting
vnet after the checks.

PR: kern/160541
Submitted by: Nikos Vassiliadis (slightly different approach)

11 years agoFour .c files from OpenBSM are used, in modified form, by the kernel to
Robert Watson [Sat, 15 Dec 2012 15:21:09 +0000 (15:21 +0000)]
Four .c files from OpenBSM are used, in modified form, by the kernel to
implement the BSM audit trail format.  Rename the kernel versions of the
files to match the userspace filenames so that it's easier to work out
what they correspond to, and therefore ensure they are kept in-sync.

Obtained from: TrustedBSD Project

11 years agoMerge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
Robert Watson [Sat, 15 Dec 2012 14:59:00 +0000 (14:59 +0000)]
Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
included various upstreamed patches from the FreeBSD base to make OpenBSM
compile more easily with bmake, higher warning levels, clang, and several
other loose ends.

Obtained from: TrustedBSD Project

11 years agoVendor import of OpenBSM 1.2-alpha3. This eliminates most local patches
Robert Watson [Sat, 15 Dec 2012 13:27:45 +0000 (13:27 +0000)]
Vendor import of OpenBSM 1.2-alpha3.  This eliminates most local patches
made relative to OpenBSM 1.2-alpha2 in order to build OpenBSM as part of
the FreeBSD base.

Obtained from: TrustedBSD Project

11 years agoRegenerate usb.conf
Hans Petter Selasky [Sat, 15 Dec 2012 10:56:16 +0000 (10:56 +0000)]
Regenerate usb.conf

MFC after: 1 week

11 years agoMFV r244245:
Martin Matuska [Sat, 15 Dec 2012 10:02:11 +0000 (10:02 +0000)]
MFV r244245:

Merge two zdb bugfixes from vendor (illumos)

illumos-gate 13894:f4af77f6bbd2
3397 zdb <pool> <objnum> output is too verbose
3398 zdb can't dump feature flags zap objects

References:
https://www.illumos.org/issues/3397
https://www.illumos.org/issues/3398

MFC after: 1 week

11 years agoPush vendor/illumos/dist to illumos-gate 13894:f4af77f6bbd2
Martin Matuska [Sat, 15 Dec 2012 09:50:31 +0000 (09:50 +0000)]
Push vendor/illumos/dist to illumos-gate 13894:f4af77f6bbd2
(illumos zfs issues #3397 #3398)

11 years agoFix extending filesystems of weird size by making sure the actual size
Edward Tomasz Napierala [Sat, 15 Dec 2012 08:53:58 +0000 (08:53 +0000)]
Fix extending filesystems of weird size by making sure the actual size
is always multiple of fragment size.