dragonfly.git
8 years agokernel/sound: Port MIDI support.
Sascha Wildner [Wed, 30 Sep 2015 17:28:34 +0000 (19:28 +0200)]
kernel/sound: Port MIDI support.

This was dropped without a clear rationale. Our uaudio(4) for example
supports a whole bunch of MIDI devices.

Tested-by: Ben Woolley <tautolog@gmail.com>
8 years agoRevert "sound: Drop midi support"
Sascha Wildner [Wed, 30 Sep 2015 17:21:39 +0000 (19:21 +0200)]
Revert "sound: Drop midi support"

This reverts commit 5bea67f41d941ba13d0b25782f6a3b9a9460e98e.

8 years agorpcbind - Fix crash
Matthew Dillon [Tue, 29 Sep 2015 22:13:06 +0000 (15:13 -0700)]
rpcbind - Fix crash

Bring in 88cb9496ec48 from the FreeBSD repo.

The Sun RPC framework uses a netbuf structure to represent the
transport specific form of a universal transport address.  The
structure is expected to be opaque to consumers.  In the current
implementation, the structure contains a pointer to a buffer
that holds the actual address.

In rpcbind(8), netbuf structures are copied directly, which would
result in two netbuf structures that reference to one shared
address buffer.  When one of the two netbuf structures is freed,
access to the other netbuf structure would result in an undefined
result that may crash the rpcbind(8) daemon.

Fix this by making a copy of the buffer that is going to be freed
instead of doing a shallow copy.

Author:     delphij <delphij@FreeBSD.org>
Security:   FreeBSD-SA-15:24.rpcbind
Security:   CVE-2015-7236

8 years agoi386 removal, part 44/x: Remove a no longer used header.
Sascha Wildner [Mon, 28 Sep 2015 19:53:24 +0000 (21:53 +0200)]
i386 removal, part 44/x: Remove a no longer used header.

8 years agokernel/drm: Use #ifdef __DragonFly__ to mark DragonFly specific stuff.
Sascha Wildner [Mon, 28 Sep 2015 16:09:22 +0000 (18:09 +0200)]
kernel/drm: Use #ifdef __DragonFly__ to mark DragonFly specific stuff.

This is better findable across the tree than some home-rolled
"XXX begin/end" markers. Also prettier.

8 years agodrm/i915: Use gtt.mappable_base
François Tigeot [Sun, 27 Sep 2015 10:16:22 +0000 (12:16 +0200)]
drm/i915: Use gtt.mappable_base

Greatly reducing dependencies on the agp driver.

8 years agodrm: Add io_mapping_map_wc()
François Tigeot [Sun, 27 Sep 2015 09:53:48 +0000 (11:53 +0200)]
drm: Add io_mapping_map_wc()

8 years agodrm: Improve the Linux IO mapping API implementation
François Tigeot [Sun, 27 Sep 2015 09:14:14 +0000 (11:14 +0200)]
drm: Improve the Linux IO mapping API implementation

* Track address space mappings for real this time

8 years agoagp: Fix a bug in intel_gtt_get()
François Tigeot [Sun, 27 Sep 2015 06:10:54 +0000 (08:10 +0200)]
agp: Fix a bug in intel_gtt_get()

mappable_base was not correctly initialized, leading to problems on
some GPU models down the line

8 years agorevoke(2): Use unix socket externalize code to handle revoke.
Sepherosa Ziehau [Thu, 24 Sep 2015 13:50:45 +0000 (21:50 +0800)]
revoke(2): Use unix socket externalize code to handle revoke.

Use revoke token in shared mode in unix socket code and in exclusive
mode in fdrevoke(); mainly to make sure that all fps externalized and
marked FREVOKED will be picked up by later allproc_scan() called by
fdrevoke().

This one greatly simplies the code on unix socket side.  The original
unix socket revoke handling was also kinda broken: it tried to hold
socket reception buffer token w/ all filedesc spin lock being held.

Go-Ahead-by: dillon@
8 years agokernel: Allow fhold() in allfiles_scan_exclusive()
Sepherosa Ziehau [Wed, 23 Sep 2015 12:26:38 +0000 (20:26 +0800)]
kernel: Allow fhold() in allfiles_scan_exclusive()

Before this commit following race could happen, if fhold() is used
during allfiles_scan_exclusive():

      Thread1                      Thread2
         :                            :
         :                      fdrop(fp)
         :                      {
    Scan all fps                  if (f_count-- == 1) {
    (*) fhold(fp) [f_count++]         :
         :                          fo_close(fp);
    Access fp                       Unlink fp from filehead;
    fdrop(fp)                       free(fp);
         :                        }
         :                      }

This could cause use-after-free or double free (since f_count == 1
when fdrop() was called in Thread1, fp will be freed again).

We now handle f_count 1->0 transition specially: hold the filehead
spin lock then do the f_count 1->0 transition, if the f_count 1->0
transition succeeds, the fp is unlinked from the filehead.  This
prevents the above race from happening.  This solution is mainly
based on dillon@'s input.

8 years agosys/vfs/hammer: Fix cppcheck warning
Tomohiro Kusumi [Tue, 22 Sep 2015 16:25:14 +0000 (01:25 +0900)]
sys/vfs/hammer: Fix cppcheck warning

Spotted-by: swildner
8 years agosbin/hammer: Cleanups
Tomohiro Kusumi [Tue, 22 Sep 2015 14:04:46 +0000 (23:04 +0900)]
sbin/hammer: Cleanups

data->inode.obj_type (ot=%02x) should equal that of elm base.

8 years agosbin/hammer: Change hammer show's printf format for elm base
Tomohiro Kusumi [Tue, 22 Sep 2015 15:52:56 +0000 (00:52 +0900)]
sbin/hammer: Change hammer show's printf format for elm base

This commit changes printf format for struct hammer_base_elm
fields. It doesn't change information to be printed, but it
does change the order.

This commit better explains how B-Tree nodes are located in
the B-Tree by having all 5 keys lo:objid:rectype:key:tid in
the same line. Since now that hammer show supports these keys
as search directives, it's better to directly reflect those
of each elm to hammer show's output.

ot (obj_type) isn't one of the 5 keys to compare node elms,
so this could(should) go to the next line.

===== (A) before this commit
...
G------ ELM  8 L lo=00000001 obj=0000000101da3ef7 rt=11 key=4c94cade3f178000 ot=00
         tids=0000000104018590:0000000000000000 suboff=8000000020c78000 mirror=0000000104018590 *
...
G------ ELM  1 R lo=00000002 obj=0000000000000001 rt=15 key=0000000000020000 ot=01
       d tids=00000001007e0ff0:000000010403b9b0

===== (B) with this commit
...
G------ ELM  8 L lo=00000001 obj=0000000101da3ef7 rt=11 key=4c94cade3f178000 tid=0000000104018590
         del=0000000000000000 ot=00 suboff=8000000020c78000 mirror=0000000104018590 *
...
G------ ELM  1 R lo=00000002 obj=0000000000000001 rt=15 key=0000000000020000 tid=00000001007e0ff0
       d del=000000010403b9b0 ot=01

8 years agosbin/hammer: Refactor get_elm_flags()/print_btree_elm() [2/2]
Tomohiro Kusumi [Tue, 22 Sep 2015 08:38:50 +0000 (17:38 +0900)]
sbin/hammer: Refactor get_elm_flags()/print_btree_elm() [2/2]

Call get_elm_flags() from print_btree_elm(). The elm flag
is used and only used when printing elm. This makes things
clear without passing the flag from one function to another.

No functional changes.

8 years agosbin/hammer: Refactor get_elm_flags()/print_btree_elm() [1/2]
Tomohiro Kusumi [Tue, 22 Sep 2015 08:21:10 +0000 (17:21 +0900)]
sbin/hammer: Refactor get_elm_flags()/print_btree_elm() [1/2]

These two functions have way too many arguments and
some of them are redundant that they could be get rid of.

No functional changes.

8 years agosys/vfs/hammer: Adjust raw kprintfs using hkprintf variants
Tomohiro Kusumi [Sat, 12 Sep 2015 23:35:27 +0000 (08:35 +0900)]
sys/vfs/hammer: Adjust raw kprintfs using hkprintf variants

This is part3 of hkprintf related after the following two.
sys/vfs/hammer: Change hkprintf() to macro and add variants [2/2]
sys/vfs/hammer: Change hkprintf() to macro and add variants [1/2]

Above two commits have replaced the existing kprintf calls
using "HAMMER:" or "HAMMER(label)" or function name prefix
with hkprintf and newly added variants, which basically didn't
change actual output other than fixing wrong function names
to the right ones, etc.

This commit continues replacing remaining kprintfs to make
output more understandable than raw kprintf calls with no clue
that they're hammer related.

For example, an error message like
"BIGBLOCK UNDERFLOW\n"
or a debug message like
"rt %3u, xt %3u, tt %3u\n"
become more understanbale with "HAMMER:" prefix or the name
of the function.

This commit is based on the followings.
1. Use hdkprintf which is hkprintf variant with __func__ prefix
   if that kprintf call is used when vfs.hammer.debug_xxx is
   enabled. This implies the messages are only for debugging
   and those are usually better and more understandable with
   a function name prefix as mentioned above. Also this is
   what's been done mostly in the existing hammer code.
2. Use hkprintf which has "HAMMER:" prefix if that kprintf
   call is a regular hammer message that appears in regular
   filesystem operations such as
   "Formatting of valid HAMMER volume %s denied. Erase with dd!\n".
3. Use h[vm]kprintf which are hkprintf variants with hammer
   label prefix "HAMMER(label)" if that kprintf can safely
   access the label via vol or hmp pointer. Some kprintfs in
   hammer does this rather than just "HAMMER:" and this seems
   to be better, however this commit doesn't go far as to
   aggressively replace the existing ones with this because
   a caller safely dereferencing hmp or vol is a different
   topic from merely replacing.

8 years agosbin/hammer: Fix and adjust hammer show's matched character '*'
Tomohiro Kusumi [Mon, 21 Sep 2015 15:00:30 +0000 (00:00 +0900)]
sbin/hammer: Fix and adjust hammer show's matched character '*'

Remove unnecessary space before '*'.
Adjust position of '*' for matched record.

8 years agosbin/hammer: Fix and change hammer show behavior when only lo is used
Tomohiro Kusumi [Mon, 21 Sep 2015 10:34:10 +0000 (19:34 +0900)]
sbin/hammer: Fix and change hammer show behavior when only lo is used

913b6663 has expanded hammer show's B-Tree directive from
lo:objid
to
lo:objid:rectype:key:tid
which allowed hammer show to filter B-Tree iteration in the
same way that the actual filesystem does on B-Tree lookup.

There was an exception in 913b6663 where one could not just
use lo directive, but was forced to use at least the first
two directives lo:objid. If objid wasn't specified then
HAMMER_MIN_OBJID was used for objid by default.

This was to keep compatibility with old behavior before
913b6663 added the rest of the directives (rectype:key:tid),
but this old behavior wasn't really useful for anything and
rather confusing given that all unspecified fields (after
the last specified field) except for objid were wildcard.
See sbin/hammer/hammer.c and sbin/hammer/cmd_show.c before
913b6663 (or really old one like v4.0 era) for details.

This commit normalizes this exceptional behavior and make
all option directives behave the same way. For example, if
*only* lo field is specified, then the rest of the fields
are wildcard. If the first n fields are specified, then the
remaining (5-n) fields are wildcard.

This does change the behavior when *only* lo is specified,
but the change should make the behavior less confusing.

Also update hammer(8) manpage since it hasn't been updated.

8 years agosbin/hammer: Cleanup search directive structure
Tomohiro Kusumi [Mon, 21 Sep 2015 10:26:43 +0000 (19:26 +0900)]
sbin/hammer: Cleanup search directive structure

Remove btree elm fields from hammer show's search directive
struct btree_search, and embed struct hammer_base_elm.

hammer show originally only had localization:obj_id fields for
search directives, so struct btree_search had these two fields,
but since 913b6663 has added (quite long time ago) all the
remaining fields rec_type:key:create_tid, struct btree_search
could simply embed struct hammer_base_elm instead of having 5
fields separately, which makes code clear.

8 years agosbin/hammer: Fix wrong next element boundary test
Tomohiro Kusumi [Mon, 21 Sep 2015 07:25:49 +0000 (16:25 +0900)]
sbin/hammer: Fix wrong next element boundary test

When elm is the current node element to be tested by
test_btree_out_of_range() by hammer show,

1. it's out of range if ((elm + 1) == search),
   if all optional search directives are used.
2. it may not be out or range if ((elm + 1) == search),
   if not all optional search directives are used.

Unused search directives are wildcard, so elm could still
have a subtree with records that meet the search condition
in above case 2.

This existed before test_btree_out_of_range() was added by
the previous commit, and because it's a different topic,
this commit is kept apart from the previous one without
squashed into one.

8 years agosbin/hammer: Add B-Tree helper functions and cleanups
Tomohiro Kusumi [Mon, 21 Sep 2015 05:28:07 +0000 (14:28 +0900)]
sbin/hammer: Add B-Tree helper functions and cleanups

and some cleanups that make no functional changes.

This makes B-Tree search/filtering code using optional search
directives much more readable. Also this makes it easier to
do fix in the next commit (fix wrong next elm boundary test).

8 years agosbin/hammer: Make B-Tree walk a bit more effective
Tomohiro Kusumi [Sun, 20 Sep 2015 07:53:25 +0000 (16:53 +0900)]
sbin/hammer: Make B-Tree walk a bit more effective

hammer show recursively calls print_btree_node() when node
type is internal. If the node is not internal (leaf), it just
prints records with no further B-Tree walk.

Having
node->type == HAMMER_BTREE_TYPE_INTERNAL
check outside the
for (i = 0; i < node->count; ++i) {
is more effective since it doesn't go through unnecessary
for loop (with max count=63) if the node isn't internal.

Also note this looks more sane in the sense that node
contains elms[] and node->type determines union type of elms,
instead of node->type depends on each elms[i].

8 years agosbin/hammer: Fix minor memory leak
Tomohiro Kusumi [Sun, 20 Sep 2015 07:33:03 +0000 (16:33 +0900)]
sbin/hammer: Fix minor memory leak

8 years agosbin/newfs_hammer: Adjust output of -E
Tomohiro Kusumi [Tue, 22 Sep 2015 04:34:24 +0000 (13:34 +0900)]
sbin/newfs_hammer: Adjust output of -E

This commit adjusts and aligns output of -E option of
newfs_hammer with the previous line.

It should use vol->type instead of typing "Device" in
lowercase, since this is what the vol->type is really
made for.

===== before this commit
  # newfs_hammer -E -L TEST /dev/da1 /dev/da2 /dev/da3
  Volume 0 DEVICE /dev/da1        size 111.79GB
  Trimming Device:/dev/da1, sectors (0 -234441648)
  Volume 1 DEVICE /dev/da2        size 111.79GB
  Trimming Device:/dev/da2, sectors (0 -234441648)
  Volume 2 DEVICE /dev/da3        size 111.79GB
  Trimming Device:/dev/da3, sectors (0 -234441648)
  ...

===== with this commit, looks more sane
  # newfs_hammer -E -L TEST /dev/da1 /dev/da2 /dev/da3
  Volume 0 DEVICE /dev/da1        size 111.79GB
  Trimming DEVICE /dev/da1, sectors (0 -234441648)
  Volume 1 DEVICE /dev/da2        size 111.79GB
  Trimming DEVICE /dev/da2, sectors (0 -234441648)
  Volume 2 DEVICE /dev/da3        size 111.79GB
  Trimming DEVICE /dev/da3, sectors (0 -234441648)
  ...

8 years agosbin/newfs_hammer: Remove global variable Eflag
Tomohiro Kusumi [Sun, 20 Sep 2015 04:57:19 +0000 (13:57 +0900)]
sbin/newfs_hammer: Remove global variable Eflag

Eflag could be a local variable after ff8644cb merged
two check_volume() into one.

8 years agosys/vfs/hammer: Remove ambiguous comment
Tomohiro Kusumi [Sat, 19 Sep 2015 06:47:03 +0000 (15:47 +0900)]
sys/vfs/hammer: Remove ambiguous comment

Upper 16 bits of val[1] is always 0 (which equals pfs id of pfs0)
regardless of how many pfs there are.

8 years agosys/vfs/hammer: Fix wrong comment on ambiguous variable name
Tomohiro Kusumi [Sat, 19 Sep 2015 06:28:34 +0000 (15:28 +0900)]
sys/vfs/hammer: Fix wrong comment on ambiguous variable name

hammer_volume_ondisk::vol_name[] is a filesystem label string
specified by newfs_hammer via -L option (see below), but not
the name of the volume like "/dev/da1".

  # grep "ondisk->vol_name" sbin/newfs_hammer -rI
  sbin/newfs_hammer/newfs_hammer.c:       \
  snprintf(ondisk->vol_name, sizeof(ondisk->vol_name), "%s", label);

8 years agosys/vfs/hammer: Fix wrong comment on B-Tree node count
Tomohiro Kusumi [Mon, 21 Sep 2015 04:41:58 +0000 (13:41 +0900)]
sys/vfs/hammer: Fix wrong comment on B-Tree node count

cursor->node->base->count
was right in the early stage of hammer devel,
but it has changed to
cursor->node->ondisk->count

8 years agohammer: Print "B-Tree" (conform to hammer specification)
Tomohiro Kusumi [Sat, 19 Sep 2015 04:35:39 +0000 (13:35 +0900)]
hammer: Print "B-Tree" (conform to hammer specification)

Hammer specification, manpage, comments, etc mostly use
"B-Tree" instead of "btree" or "b-tree".

This commit replaces "btree" and "b-tree" strings that appear
in printf() and hammer(8) with "B-Tree", assuming no user or
userspace triggers anything by these strings.

8 years agohammer: Cleanup hammer(8) manpage
Tomohiro Kusumi [Mon, 21 Sep 2015 11:59:29 +0000 (20:59 +0900)]
hammer: Cleanup hammer(8) manpage

hammer(8) uses "PFS" but not "pfs" unless "pfs" appears in a path.

8 years agohammer: Update hammer(5) manpage
Tomohiro Kusumi [Fri, 18 Sep 2015 23:41:41 +0000 (08:41 +0900)]
hammer: Update hammer(5) manpage

Update links to publication by
dillon@ in 2008
mneumann@ in 2010

8 years agosbin/mount_hammer: Minor fixes and cleanups
Tomohiro Kusumi [Thu, 24 Sep 2015 12:18:29 +0000 (21:18 +0900)]
sbin/mount_hammer: Minor fixes and cleanups

8 years agosbin/mount_hammer: Add CFLAGS+= -I${.CURDIR}/../../sys
Tomohiro Kusumi [Thu, 17 Sep 2015 22:18:14 +0000 (07:18 +0900)]
sbin/mount_hammer: Add CFLAGS+= -I${.CURDIR}/../../sys

just like sbin/hammer and sbin/newfs_hammer.

8 years agosbin/hammer: Remove -DALIST_NO_DEBUG
Tomohiro Kusumi [Thu, 17 Sep 2015 21:44:53 +0000 (06:44 +0900)]
sbin/hammer: Remove -DALIST_NO_DEBUG

-DALIST_NO_DEBUG is no longer necessary.

sys/kern/subr_alist.c was only used in the early stage
of hammer devel, and no longer used.

  # grep ALIST_NO_DEBUG . -rI
  ./sbin/newfs_hammer/Makefile:CFLAGS+= -I${.CURDIR}/../../sys -I${.CURDIR}/../hammer -DALIST_NO_DEBUG
  ./sbin/hammer/Makefile:CFLAGS+= -I${.CURDIR}/../../sys -DALIST_NO_DEBUG
  ./sys/kern/subr_alist.c:#ifndef ALIST_NO_DEBUG

8 years agosbin/newfs_hammer: Remove a local header newfs_hammer.h
Tomohiro Kusumi [Fri, 18 Sep 2015 13:55:04 +0000 (22:55 +0900)]
sbin/newfs_hammer: Remove a local header newfs_hammer.h

newfs_hammer.c is the only file that needs newfs_hammer.h,
and all it does is include other headers, so we really
don't need to have this as a separate header.

Also note that mount_hammer, newfs_hammer2, mount_hammer2
don't have .h as well.

8 years agosys/vfs/hammer: Fix incomplete mountctl(2) vop behavior
Tomohiro Kusumi [Thu, 17 Sep 2015 10:31:56 +0000 (19:31 +0900)]
sys/vfs/hammer: Fix incomplete mountctl(2) vop behavior

mount(8) is unable to print nomirror mount option while other
two (nohistory, master=) are properly printed. This is because
hammer's mountctl and mount flags aren't implemented the way
vfs expects them to be. mount(8) generates option strings by
mountctl(2).

===== missing nomirror string
  # mount_hammer -o nohistory -o master=5 -o nomirror /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # mount | grep /HAMMER
  TEST on /HAMMER (hammer, local, nohistory, master)

===== using this commit
  # mount_hammer -o nohistory -o master=5 -o nomirror /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # mount | grep /HAMMER
  TEST on /HAMMER (hammer, local, nohistory, master, nomirror)

This commit adds HMNT_NOMIRROR using a reserved HMNT_RESERVED
and assigns HMNT_NOMIRROR to nomirror. This is necessary since
two options (master=, nomirror) using the same HMNT_MASTERID
is the root cause of above behavior.

This change would affect userspace in theory, however the only
userspace that would actually use these mount option flags is
mount command itself (for inbox userspace programs at least).
It's more important that hammer properly handles mount(8).

This commit also adds a missing nomirror mountctl element in
hammer_vop_mountctl() using HMNT_NOMIRROR so mountctl becomes
aware of nomirror option.

The reason nomirror needs to use HMNT_NOMIRROR instead of
HMNT_MASTERID is because vfs_flagstostr() assumes each option
has an unique flag (see vfs_flagstostr() where it does the
following).
  flags &= ~optp->o_opt;

This could have been fixed by changing above vfs code, but
fixing hammer code is probably the right approach. Also note
that master= and nomirror options aren't alias of each other.
These two are similar but they do have different purpose, which
should make sense to have independent flags, and that's what
vfs expects.

8 years agosys/vfs/hammer: Rename HMNT_EXPORTREQ to HMNT_RESERVED
Tomohiro Kusumi [Wed, 16 Sep 2015 22:04:05 +0000 (07:04 +0900)]
sys/vfs/hammer: Rename HMNT_EXPORTREQ to HMNT_RESERVED

This was added in 513ca7d7 for NFS support but never used.
Change it (0x00000004) to HMNT_RESERVED.

8 years agosys/vfs/hammer: Conform to style(9)
Tomohiro Kusumi [Wed, 16 Sep 2015 22:53:46 +0000 (07:53 +0900)]
sys/vfs/hammer: Conform to style(9)

Remove unnecessary {} for a switch case element.

8 years agosys/vfs/hammer: Add hpanic() [2/2]
Tomohiro Kusumi [Fri, 11 Sep 2015 22:21:12 +0000 (07:21 +0900)]
sys/vfs/hammer: Add hpanic() [2/2]

Apply hpanic() to remaining several raw panic() calls.

8 years agosys/vfs/hammer: Add hpanic() [1/2]
Tomohiro Kusumi [Fri, 11 Sep 2015 22:14:03 +0000 (07:14 +0900)]
sys/vfs/hammer: Add hpanic() [1/2]

This commit does the following.

1. Add a macro hpanic() which is a wrapper for panic()
   that embed the following prefix.
   "function_name: ..."
2. Replace raw panic() calls that have above prefix with
   hpanic().
3. Fix some wrong function name literals using __func__.

8 years agosys/vfs/hammer: Change hkprintf() to macro and add variants [2/2]
Tomohiro Kusumi [Tue, 15 Sep 2015 22:11:42 +0000 (07:11 +0900)]
sys/vfs/hammer: Change hkprintf() to macro and add variants [2/2]

This commit does the following.

1. Add macros hdkprintf() and hdkrateprintf() that embed
   the following prefix.
   "function_name: ..."
2. Replace raw kprintf() calls that have above prefix with
   newly added macros.
3. Fix some wrong function name literals using __func__.

8 years agosys/vfs/hammer: Change hkprintf() to macro and add variants [1/2]
Tomohiro Kusumi [Fri, 11 Sep 2015 18:06:24 +0000 (03:06 +0900)]
sys/vfs/hammer: Change hkprintf() to macro and add variants [1/2]

This commit does the following.

1. Remove an inline function hkprintf().
2. Add a macro version of hkprintf() and its variants that
   embed the following prefix.
   "HAMMER: ..."
   "HAMMER(label) ..."
3. Replace raw kprintf() calls that have above prefix with
   newly added macros.

hkprintf() macro doesn't use hammer_debug_debug flag that was
used by the inline function version of hkprintf(), but this
doesn't make much difference from the way hkprintf() and
hammer_debug_debug have been used.

8 years agosbin/mount_hammer: Remove typedef ary_ptr_t
Tomohiro Kusumi [Tue, 15 Sep 2015 09:44:18 +0000 (18:44 +0900)]
sbin/mount_hammer: Remove typedef ary_ptr_t

It makes code more clear and readable without this typedef
which is only used for the first arg of extract_volumes().

info.volumes is char**, and an array internally used within
the function is char**, then using char*** for the first arg
is better than using typedef for char**.

8 years agosbin/hammer: Make hammer history support per-path @offset,length
Tomohiro Kusumi [Sun, 13 Sep 2015 23:00:26 +0000 (08:00 +0900)]
sbin/hammer: Make hammer history support per-path @offset,length

This commit allows each arg of the hammer history to take
@offset,length attribute. It was strange behavior that the
command takes a global @offset,length attribute while the
command supports multiple paths to lookup history for.

This commit doesn't break the existing behavior where one
specifies @offset,length attribute as a part of the command
name as "history@offset,length".

If the old style attribute (history@offset,length) is used,
then the command doesn't parse per-path attribute, but sees
the whole string as a path. Otherwise the command parses
per-path attribute and uses offset,length unique to each,
unless the whole string including the attribute part exists
as a path (can stat(2)).

=====
  # touch /HAMMER/out1
  # touch /HAMMER/out2
  # for x in {1..5}; do
  > cat dragonfly/sys/vfs/hammer/hammer.h >> /HAMMER/out1
  > sync; sync; sync; sync; sleep 1
  > done
  # for x in {1..5}; do
  > cat dragonfly/sys/vfs/hammer/hammer.h >> /HAMMER/out2
  > sync; sync; sync; sync; sleep 1
  > done
  # hammer history /HAMMER/out1 /HAMMER/out2
  /HAMMER/out1    0000000184acac5e clean {
      0000000184b59b00 15-Sep-2015 03:56:46
      0000000184b59b20 15-Sep-2015 03:56:47
      0000000184b59c80 15-Sep-2015 03:56:48
      0000000184b59dc0 15-Sep-2015 03:56:49
      0000000184b59f20 15-Sep-2015 03:56:50
      0000000184b5a060 15-Sep-2015 03:56:51
  }
  /HAMMER/out2    0000000184acaca6 clean {
      0000000184b59b00 15-Sep-2015 03:56:46
      0000000184b5a1c0 15-Sep-2015 03:57:02
      0000000184b5a320 15-Sep-2015 03:57:03
      0000000184b5a460 15-Sep-2015 03:57:04
      0000000184b5a5c0 15-Sep-2015 03:57:05
      0000000184b5a700 15-Sep-2015 03:57:06
  }
  # hammer history@50000,1000 /HAMMER/out1 /HAMMER/out2
  /HAMMER/out1    0000000184acac5e clean {
      0000000184b59b20 15-Sep-2015 03:56:47
      0000000184b59c80 15-Sep-2015 03:56:48
  }
  /HAMMER/out2    0000000184acaca6 clean {
      0000000184b5a1c0 15-Sep-2015 03:57:02
      0000000184b5a320 15-Sep-2015 03:57:03
  }
  # hammer history /HAMMER/out1@50000,1000 /HAMMER/out2@50000,1000
  /HAMMER/out1    0000000184acac5e clean {
      0000000184b59b20 15-Sep-2015 03:56:47
      0000000184b59c80 15-Sep-2015 03:56:48
  }
  /HAMMER/out2    0000000184acaca6 clean {
      0000000184b5a1c0 15-Sep-2015 03:57:02
      0000000184b5a320 15-Sep-2015 03:57:03
  }
  # hammer history /HAMMER/out1@50000,1000 /HAMMER/out2@200000,1000
  /HAMMER/out1    0000000184acac5e clean {
      0000000184b59b20 15-Sep-2015 03:56:47
      0000000184b59c80 15-Sep-2015 03:56:48
  }
  /HAMMER/out2    0000000184acaca6 clean {
      0000000184b5a5c0 15-Sep-2015 03:57:05
  }
  # hammer history@50000,1000 /HAMMER/out1@50000,1000 /HAMMER/out2@200000,1000
  /HAMMER/out1@50000,1000 No such file or directory
  /HAMMER/out2@200000,1000        No such file or directory
  # touch /HAMMER/out1@50000,1000
  # sync; sync; sync; sync; sleep 1
  # touch /HAMMER/out2@200000,1000
  # sync; sync; sync; sync; sleep 1
  # hammer history /HAMMER/out1@50000,1000 /HAMMER/out2@200000,1000
  /HAMMER/out1@50000,1000 0000000184acaca7 clean {
      0000000184b6ae20 15-Sep-2015 04:05:09
  }
  /HAMMER/out2@200000,1000        0000000184acae20 clean {
      0000000184b6b180 15-Sep-2015 04:06:11
  }

8 years agosbin/hammer: Remove obsolete option -s
Tomohiro Kusumi [Mon, 14 Sep 2015 15:52:16 +0000 (00:52 +0900)]
sbin/hammer: Remove obsolete option -s

-s was added in da804f11 in the early stage of hammer devel
but no longer used. Using -s does nothing after b5aaba7f.

(b5aaba7f did remove -s from hammer(8) manpage)

8 years agosbin/hammer: Remove prototype of not existing function
Tomohiro Kusumi [Mon, 14 Sep 2015 15:49:31 +0000 (00:49 +0900)]
sbin/hammer: Remove prototype of not existing function

8 years agosbin/hammer: Sync hammer usage() with hammer(8) manpage
Tomohiro Kusumi [Mon, 14 Sep 2015 20:20:03 +0000 (05:20 +0900)]
sbin/hammer: Sync hammer usage() with hammer(8) manpage

A function usage() in sbin/hammer/hammer.c is missing several
options that exist in hammer(8) manpage. Add missing ones and
sync with manpage.

8 years agosbin/hammer: Update hammer usage()
Tomohiro Kusumi [Mon, 14 Sep 2015 15:48:44 +0000 (00:48 +0900)]
sbin/hammer: Update hammer usage()

Add one line that was missing in 3f760d89.

8 years agosbin/hammer: Make a global variable static
Tomohiro Kusumi [Sun, 13 Sep 2015 16:04:08 +0000 (01:04 +0900)]
sbin/hammer: Make a global variable static

8 years agosbin/hammer: Separate read/write inode ops on hammer *stats
Tomohiro Kusumi [Sun, 13 Sep 2015 17:06:37 +0000 (02:06 +0900)]
sbin/hammer: Separate read/write inode ops on hammer *stats

It should show read and write inode ops separately since
the original hammer sysctl accounts have them separately
(just like all other fields printed by *stats command),
and it's trivial to add these two to get total inode ops.

8 years agosbin/hammer: Cleanup hammer *stats commands
Tomohiro Kusumi [Sun, 13 Sep 2015 12:33:08 +0000 (21:33 +0900)]
sbin/hammer: Cleanup hammer *stats commands

8 years agosys/vfs/hammer: Fix error message when volumes are already mounted
Tomohiro Kusumi [Tue, 15 Sep 2015 22:10:16 +0000 (07:10 +0900)]
sys/vfs/hammer: Fix error message when volumes are already mounted

It should show volumes are mounted instead of "No root volume"
when the volumes are hammer volumes and failed with EBUSY.

  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
  mount_hammer: Unknown error: Device busy
  # dmesg | tail -1
  hammer_mount: The volumes are probably mounted

8 years agosys/vfs/hammer: Add HAMMER_DIR_INODE_LOCALIZATION()
Tomohiro Kusumi [Sat, 12 Sep 2015 15:08:15 +0000 (00:08 +0900)]
sys/vfs/hammer: Add HAMMER_DIR_INODE_LOCALIZATION()

Move ondisk definition part of hammer_dir_localization()
to sys/vfs/hammer/hammer_disk.h.

It's better to separate kernel fs code from ondisk spec
(and that's what hammer.h and hammer_disk.h are made for).

8 years agosys/vfs/hammer: Remove #if 1 that no longer has any meaning
Tomohiro Kusumi [Sat, 12 Sep 2015 23:48:53 +0000 (08:48 +0900)]
sys/vfs/hammer: Remove #if 1 that no longer has any meaning

8 years agosys/vfs/hammer: Remove obsolete macro HAMMER_HEAD|TAIL_ONDISK_SIZE
Tomohiro Kusumi [Sat, 12 Sep 2015 14:17:07 +0000 (23:17 +0900)]
sys/vfs/hammer: Remove obsolete macro HAMMER_HEAD|TAIL_ONDISK_SIZE

These macros are no longer used and not necessary.

These are only used in the early stage of hammer devel and
macro values do not reflect hammer implementation today.

8 years agosbin/hammer: Fix comment on how to compile sbin/hammer/test_dupkey.c
Tomohiro Kusumi [Mon, 7 Sep 2015 16:18:28 +0000 (01:18 +0900)]
sbin/hammer: Fix comment on how to compile sbin/hammer/test_dupkey.c

This comment was never updated after icrc32.c was added.

8 years agosbin/hammer: Cleanup header includes regarding hammer_util.h
Tomohiro Kusumi [Mon, 7 Sep 2015 15:43:34 +0000 (00:43 +0900)]
sbin/hammer: Cleanup header includes regarding hammer_util.h

8 years agosbin/hammer: Cleanup header includes regarding hammer.h
Tomohiro Kusumi [Mon, 7 Sep 2015 14:29:25 +0000 (23:29 +0900)]
sbin/hammer: Cleanup header includes regarding hammer.h

8 years agosys/vfs/hammer: Fix possible race on volume-del
Tomohiro Kusumi [Mon, 7 Sep 2015 14:11:29 +0000 (23:11 +0900)]
sys/vfs/hammer: Fix possible race on volume-del

hmp->volume_to_remove should get reset to -1 only after the
volume is successfully removed. Otherwise there is a possible
race between this and blockmap allocation code who checks if
hmp->volume_to_remove is the volume being removed.

Spotted-by: dillon
8 years agosys/vfs/hammer: Remove unnecessary header includes
Tomohiro Kusumi [Sun, 6 Sep 2015 19:12:53 +0000 (04:12 +0900)]
sys/vfs/hammer: Remove unnecessary header includes

8 years agosys/vfs/hammer: Remove header includes from hammer.h
Tomohiro Kusumi [Sun, 6 Sep 2015 17:48:34 +0000 (02:48 +0900)]
sys/vfs/hammer: Remove header includes from hammer.h

Remove
 #include <sys/buf2.h>
 #include <sys/mountctl.h>
 #include <sys/globaldata.h>
 #include <vm/vm_page2.h>
from sys/vfs/hammer/hammer.h

8 years agosys/vfs/hammer: Add header includes to hammer.h
Tomohiro Kusumi [Sun, 6 Sep 2015 17:12:45 +0000 (02:12 +0900)]
sys/vfs/hammer: Add header includes to hammer.h

Add
 #include <sys/fcntl.h>
 #include <sys/dirent.h>
 #include <sys/sysctl.h>
 #include <sys/event.h>
 #include <sys/file.h>
 #include <vm/swap_pager.h>
to sys/vfs/hammer/hammer.h

8 years agosys/vfs/hammer: Add hammer_data_zone(_index) macros
Tomohiro Kusumi [Sun, 6 Sep 2015 13:59:27 +0000 (22:59 +0900)]
sys/vfs/hammer: Add hammer_data_zone(_index) macros

since now that all hammer code selects data zone to
allocate blockmap space based on the following basic
rule without an exception (that is actually the same).

zone = (data_len >= 16KB ? LARGE_DATA : SMALL_DATA);

8 years agosys/vfs/hammer: Remove exceptional zone selection case
Tomohiro Kusumi [Sun, 6 Sep 2015 13:00:07 +0000 (22:00 +0900)]
sys/vfs/hammer: Remove exceptional zone selection case

hammer_alloc_data() has an unusual and exceptional way to
determine data zone (i.e. LARGE_DATA or SMALL_DATA) as shown
in below (B). This commit changes that to the normal way of
selecting the data zone to use as shown in (A). It's simply
better not to use an exceptional rule when that doesn't
make any difference as explained below. Also see 901e04c7.

=====(A)
Hammer is designed to use LARGE_DATA zone for >=16KB
length data, and SMALL_DATA zone for <16KB length data.
zone = (data_len >= 16KB ? ZONE_LARGE_DATA_INDEX : ZONE_SMALL_DATA_INDEX);
=====

=====(B)
An exceptional case that doesn't follow an above rule.
zone = (data_len > 8KB ? ZONE_LARGE_DATA_INDEX : ZONE_SMALL_DATA_INDEX);
=====

hammer_alloc_data() using (B) actually doesn't make any
difference because strategy write has already rounded up the
data size to hammer's buf size if data_len is >8KB as shown
below, by the time hammer mirror write code (which is the only
caller with a record type of HAMMER_RECTYPE_DATA) allocates
blockmap space to write the original-rounded-up src data to
the dst fs.

hammer_vop_strategy_write()
> if (bio->bio_offset || ip->ino_data.size > HAMMER_HBUFSIZE)
> bytes = bp->b_bufsize;

In other words, data_len is never going to be
(data_len > 8KB && data_len < 16KB)
when hammer_alloc_data() is called with the record type
of HAMMER_RECTYPE_DATA. If that's the case (A) just works.

8 years agosys/vfs/hammer: Remove prototype of not existing function
Tomohiro Kusumi [Mon, 7 Sep 2015 13:21:03 +0000 (22:21 +0900)]
sys/vfs/hammer: Remove prototype of not existing function

8 years agosys/vfs/hammer: Remove HAMMER_BUFFER_BITS
Tomohiro Kusumi [Sun, 6 Sep 2015 11:17:33 +0000 (20:17 +0900)]
sys/vfs/hammer: Remove HAMMER_BUFFER_BITS

This macro is only used by compile time sanity check,
and the check is way too obvious that it can be get rid of.

Hammer code used to use this macro to right-shift offset
(>>14 had meaning in the early stage of hammer devel),
and it made sense to have the compile time sanity check,
but not really when having a way too obvious check is
the only use case.

8 years agosys/vfs/hammer: Add HAMMER_HBUFSIZE
Tomohiro Kusumi [Sun, 6 Sep 2015 10:58:47 +0000 (19:58 +0900)]
sys/vfs/hammer: Add HAMMER_HBUFSIZE

Add HAMMER_HBUFSIZE which is 1/2 of HAMMER_BUFSIZE.

8KB (HAMMER_BUFSIZE / 2) is somewhat important number as
vfs opses use this value to round up a size to allocate
within blockmap address space.

8 years agosys/vfs/hammer: Adjust and cleanup _KERNEL
Tomohiro Kusumi [Sat, 5 Sep 2015 19:47:16 +0000 (04:47 +0900)]
sys/vfs/hammer: Adjust and cleanup _KERNEL

Remove no longer necessary _KERNEL that was originally
added for usr.bin/fstat/hammer.c to include
<vfs/hammer/hammer.h> by 872a7eee.

<vfs/hammer/hammer.h> isn't supposed to be necessary by
userspace except for a few (actually only above file)
unusual userspace programs that want to access in-kernel
data structures (like incore inode), so it's better not
to pollute <vfs/hammer/hammer.h> with bunch of _KERNEL
ifdefs in the first place if possible.

Also see 23e66b3b and 1caa2035.

8 years agosys/vm: Adjust position to define _KERNEL
Tomohiro Kusumi [Sat, 5 Sep 2015 19:43:21 +0000 (04:43 +0900)]
sys/vm: Adjust position to define _KERNEL

Do the same as what sys/sys/buf2.h does.

Userspace can't include <sys/spinlock2.h> anyway, so this
commit doesn't make much difference. It's either including
<sys/vm/vm_page2.h> does nothing or results compile time
error.

8 years agosbin/hammer: Add ifndef/define/endif for headers
Tomohiro Kusumi [Sat, 5 Sep 2015 18:50:39 +0000 (03:50 +0900)]
sbin/hammer: Add ifndef/define/endif for headers

Some headers are missing this, so add it to those.

8 years agosys/vfs/hammer: Add ifndef/define/endif for headers
Tomohiro Kusumi [Sat, 5 Sep 2015 19:00:56 +0000 (04:00 +0900)]
sys/vfs/hammer: Add ifndef/define/endif for headers

Some headers are missing this, so add it to those.

8 years agosys/vfs/hammer: Erase btype of a new boundary on internal split
Tomohiro Kusumi [Sat, 5 Sep 2015 14:12:18 +0000 (23:12 +0900)]
sys/vfs/hammer: Erase btype of a new boundary on internal split

It's more sane to erase btype of RBN of the original node
on internal split than only erasing subtree_offset.
(subtree_offset==0 means the elm has no child, but btype
not being 0 means its child is either leaf or internal node
which is insane if not a bug)

This doesn't affect comparison of nodes because btype is
not a part of keys to determine > or = or < of nodes.

This also makes possible to write non-ambiguous test code
in userspace as it eliminates multiple possible ways that
test code needs to deal with and be more explicit, which is
considered a good thing if the kernel change doesn't degrade
performance, etc. Also see 6580f642.

8 years agolibc/sysctl: Fix the user.* branch.
Sascha Wildner [Thu, 24 Sep 2015 12:54:00 +0000 (14:54 +0200)]
libc/sysctl: Fix the user.* branch.

This is a combination of FreeBSD's r285188 and more work by myself.
After r285188, FreeBSD still has issues with most user.posix2_* values
(due to a leading _ missing in the define names; they also need to be
checked for being > 0).

Partially-taken-from: FreeBSD

8 years agogetconf(1): Add _POSIX2_PBS*.
Sascha Wildner [Thu, 24 Sep 2015 12:50:08 +0000 (14:50 +0200)]
getconf(1): Add _POSIX2_PBS*.

8 years ago<unistd.h>: Clean up the _POSIX2_* defines (Shells and Utilities options).
Sascha Wildner [Wed, 23 Sep 2015 18:52:40 +0000 (20:52 +0200)]
<unistd.h>: Clean up the _POSIX2_* defines (Shells and Utilities options).

* Bump the _POSIX2_C_BIND, _POSIX2_FORT_RUN and _POSIX2_UPE defines to
  200809.

* Define _POSIX2_C_DEV, _POSIX2_LOCALEDEF and _POSIX2_SW_DEV to 200809.

* Improve comments.

Things I know of that we still have to do:

* For 100% _POSIX2_UPE conformance we still need to implement at least
  sh(1)'s HISTFILE and MAILCHECK environment variables.

* For 100% _POSIX2_SW_DEV conformance we still need to implement at
  least make(1)'s -p option.

8 years agorevoke(2): Replace 'count' w/ a boolean 'found'
Sepherosa Ziehau [Tue, 22 Sep 2015 14:06:28 +0000 (22:06 +0800)]
revoke(2): Replace 'count' w/ a boolean 'found'

8 years agortadvctl.8: Use Mt for email addresses.
Sascha Wildner [Tue, 22 Sep 2015 15:48:18 +0000 (17:48 +0200)]
rtadvctl.8: Use Mt for email addresses.

8 years agokernel: Handle zero-length ELF sections better
John Marino [Mon, 21 Sep 2015 15:48:53 +0000 (17:48 +0200)]
kernel: Handle zero-length ELF sections better

FreeBSD simply skips all zero-length ELF sections when scanning an
REL type file.  The first time we tried it, DF panicked with a lost
bigs message.  It turns out this was because the skip should have been
applied in 3 places and we missed the first one.

The same approach is needed by the boot loader as well.

8 years agoBad commits always come in threes (copied lined instead of moving it)
John Marino [Tue, 22 Sep 2015 00:20:18 +0000 (02:20 +0200)]
Bad commits always come in threes (copied lined instead of moving it)

8 years agoFix mis-paste (move section down 1 line)
John Marino [Tue, 22 Sep 2015 00:16:27 +0000 (02:16 +0200)]
Fix mis-paste (move section down 1 line)

8 years agokernel: Fix loading of gold-linked modules
John Marino [Tue, 22 Sep 2015 00:03:26 +0000 (02:03 +0200)]
kernel: Fix loading of gold-linked modules

Kernel modules linked by gold differed from those modules linked by ld.bfd in that
the .note.GNU-stack section on ld.bfd were set as size "1" whereas on gold this section
was size "0".  The object loading code was not set handle sizes less than 1, causing
module loading failure.

The fix of ensuring the smallest alignment to be zero by checking for -1 is required
over FreeBSD's technique of continuing if the section size is zero because an internal
check causes a "lost progbits" panic when FreeBSD's method is used.

This adjustment should enable a fully functional world and kernel to be built by gold
linker using WORLD_LDVER=ld.gold in make.conf.  Before this, only the world worked;
the kernel could not be booted.

Approved by: dillon

8 years agortadvd - Import newer rtadvd, add rtadvctl from FreeBSD-10
Matthew Dillon [Mon, 21 Sep 2015 00:59:44 +0000 (17:59 -0700)]
rtadvd - Import newer rtadvd, add rtadvctl from FreeBSD-10

* This patch updates the rtvdvd daemon and adds the rtadvctl
  utility to the base system. Both of these are from
  FreeBSD-10.2-RELEASE.  The intent is to add RFC 6106 functionality
  (DNS information distributed via router advertisements) to the
  system

Submitted-by: Charles Musser <cmusser@sonic.net>
8 years agokernel/vga: Remove a no longer needed variable.
Sascha Wildner [Sun, 20 Sep 2015 10:21:20 +0000 (12:21 +0200)]
kernel/vga: Remove a no longer needed variable.

It was used until 4e193d20af and I oversaw that it could be removed.

8 years agoi386 removal, part 43/x: Remove/change i386 specific info in manual pages.
Sascha Wildner [Sat, 19 Sep 2015 23:40:47 +0000 (01:40 +0200)]
i386 removal, part 43/x: Remove/change i386 specific info in manual pages.

8 years agoiwm - DragonFly cleanup (no functional changes)
Matthew Dillon [Fri, 18 Sep 2015 20:38:29 +0000 (13:38 -0700)]
iwm - DragonFly cleanup (no functional changes)

* Cleanup and document iwm work.

* Remove test fences that aren't needed.

8 years agouipc: Rework unp_pcblist() to make it MPSAFE
Sepherosa Ziehau [Fri, 18 Sep 2015 11:42:29 +0000 (19:42 +0800)]
uipc: Rework unp_pcblist() to make it MPSAFE

8 years agouipc: Make unp_discard MPSAFE by deferring closef to a dedicated taskqueue
Sepherosa Ziehau [Fri, 18 Sep 2015 11:41:46 +0000 (19:41 +0800)]
uipc: Make unp_discard MPSAFE by deferring closef to a dedicated taskqueue

8 years agoAdd iwm.4 and iwmfw.4 manual pages (taken from FreeBSD).
Sascha Wildner [Fri, 18 Sep 2015 08:27:59 +0000 (10:27 +0200)]
Add iwm.4 and iwmfw.4 manual pages (taken from FreeBSD).

8 years agoi915kms.4: Add missing .El
Sascha Wildner [Fri, 18 Sep 2015 08:27:34 +0000 (10:27 +0200)]
i915kms.4: Add missing .El

8 years agokernel: Make iwm compilable into the kernel and add it to LINT64.
Sascha Wildner [Fri, 18 Sep 2015 08:14:46 +0000 (10:14 +0200)]
kernel: Make iwm compilable into the kernel and add it to LINT64.

8 years agoiwm - DragonFly modifications and a bug fix
Matthew Dillon [Fri, 18 Sep 2015 05:56:20 +0000 (22:56 -0700)]
iwm - DragonFly modifications and a bug fix

* Modifications to make iwm build for DragonFly.

* Fix a serious bug, iwm_stop_device() must clear the rxq stat
  data primarily to reset to hw rx ring index to 0.  Otherwise
  all packets already handled from 0 to the current hw rx ring index
  will be reprocessed on restart.

* Implement iwmsleep() instead of using msleep().  iwmsleep() will
  handle exiting and re-entering the wlan_serializer.  Without this
  we can easily deadlock on the double lock.

* Implement Makefile infrastructure.

* Revert the FreeBSD patch to remove the per-debvice netif, since our
  802.11 infrastructure has not yet been updated for that.

* Purge the ifq on start if the interface is not running.

* Misc other DragonFly adjustments.

8 years agowlan - Import if_iwm from FreeBSD (base)
Matthew Dillon [Fri, 18 Sep 2015 05:53:32 +0000 (22:53 -0700)]
wlan - Import if_iwm from FreeBSD (base)

8 years agowlan - Minor updates for if_iwm import.
Matthew Dillon [Fri, 18 Sep 2015 05:49:41 +0000 (22:49 -0700)]
wlan - Minor updates for if_iwm import.

* Add PCIM_STATUS_INTxSTATE

* Expose ieee80211broadcastaddr[]

8 years agoi386 removal, part 42/x: Remove i386 info from the syscall(9) manpage.
Sascha Wildner [Thu, 17 Sep 2015 12:37:43 +0000 (14:37 +0200)]
i386 removal, part 42/x: Remove i386 info from the syscall(9) manpage.

8 years agoRemove libcom_err.so{,.3} via 'make upgrade' too.
Sascha Wildner [Thu, 17 Sep 2015 12:09:29 +0000 (14:09 +0200)]
Remove libcom_err.so{,.3} via 'make upgrade' too.

8 years agokernel/dup: Correct dup{,2}()'s fd params to int in the syscall glue.
Sascha Wildner [Wed, 16 Sep 2015 22:35:57 +0000 (00:35 +0200)]
kernel/dup: Correct dup{,2}()'s fd params to int in the syscall glue.

8 years agouipc: Allow fdalloc() to fail in unp_externalize()
Sepherosa Ziehau [Tue, 15 Sep 2015 14:42:11 +0000 (22:42 +0800)]
uipc: Allow fdalloc() to fail in unp_externalize()

While I'm here, add comment about never reached code.

8 years agouipc: White space
Sepherosa Ziehau [Tue, 15 Sep 2015 13:14:52 +0000 (21:14 +0800)]
uipc: White space

8 years agokernel: Use fhold() instead of increasing f_count manually
Sepherosa Ziehau [Tue, 15 Sep 2015 12:49:30 +0000 (20:49 +0800)]
kernel: Use fhold() instead of increasing f_count manually