dragonfly.git
4 years agoMerge branch 'vendor/TRE'
John Marino [Thu, 6 Aug 2015 22:06:35 +0000 (00:06 +0200)]
Merge branch 'vendor/TRE'

4 years agolibc/locale: Add __collate_equiv_value functionality
John Marino [Thu, 6 Aug 2015 21:21:14 +0000 (23:21 +0200)]
libc/locale: Add __collate_equiv_value functionality

This function is required for TRE bracket equivalence support.

4 years agosed(1): Move regex.h to be the last included
John Marino [Thu, 6 Aug 2015 20:11:23 +0000 (22:11 +0200)]
sed(1): Move regex.h to be the last included

The regex.h will soon include <wchar.h> which pulls in <stdio.h>.  The
main.c needs _WITH_GETLINE defined before <stdio.h> is included in order
to have getline's prototype available.  When the new regex library is
imported, sed will break unless _WITH_GETLINE is defined sooner or unless
stdio.h is included before regex.h is.  Let's just move regex.h to be
the last included header to avoid our future issue.

4 years agoImport TRE regex library v0.8.0 to vendor branch gitea/vendor/TRE origin/vendor/TRE
John Marino [Thu, 6 Aug 2015 22:04:13 +0000 (00:04 +0200)]
Import TRE regex library v0.8.0 to vendor branch

4 years agodrm/radeon: Limit HDMI to 8 bit per color
Yellow Rabbit [Thu, 6 Aug 2015 20:17:56 +0000 (22:17 +0200)]
drm/radeon: Limit HDMI to 8 bit per color

This patch prevents the calculation and use of unsupported frequency for
HDMI monitor. This is a temporary solution. We still can not do this as it
does Linux.

4 years ago<sys/bitstring.h>: Stop removing it.
Sascha Wildner [Thu, 6 Aug 2015 19:51:14 +0000 (21:51 +0200)]
<sys/bitstring.h>: Stop removing it.

This was to be in a42cf85c165bd828567c497705474634ea858d9f but seems I
forgot to push it.

4 years agonet/inet6: Add missing ;
Nuno Antunes [Thu, 6 Aug 2015 08:42:22 +0000 (09:42 +0100)]
net/inet6: Add missing ;

* Unbreaks kernel.

Pointed-out-by: YRabbit
4 years agokernel - Allow kprintf() output targets to be managed as a debugging aid.
Matthew Dillon [Thu, 6 Aug 2015 04:34:39 +0000 (21:34 -0700)]
kernel - Allow kprintf() output targets to be managed as a debugging aid.

* Add kern.kprintf_logging which is a bitmask of kprintf() logging targets.
  This can be adjusted to reduce kprintf() overhead and serialization when
  using it to debug kernel issues.

* The default value is 0x05 which outputs to the console and the
  dmesg buffer.  One can disable console logging and spin-lock
  serialization by setting this to 0x14, causing kprintf() to only
  log to the dmesg buffer.

  0x01 Output to console
  0x02 (unsafe for general kprintf operation, do not use)
  0x04 Output to dmesg buffer
  0x08 (do not use)
  0x10 Do not serialize the whole kprintf() with a spin-lock.

4 years agodrm - Bring in two haswell drm fixes from linux
Matthew Dillon [Thu, 6 Aug 2015 04:31:28 +0000 (21:31 -0700)]
drm - Bring in two haswell drm fixes from linux

* Thsi might fix a GPU-based whole system lockup which can occur on haswell
  systems while running X.  It can take several hours to manifest and
  typically occurs when scrolling or typing in firefox.

2c550183476dfa25641309ae9a28d30feed14379
  Disable PSMI sleep messages on all rings around context switches

add284a3a2481e759d6bec35f6444c32c8ddc383
  Force the CS stall for invalidate flushes

4 years agoinet6: Cosmetic clean up
Sepherosa Ziehau [Wed, 5 Aug 2015 12:28:22 +0000 (20:28 +0800)]
inet6: Cosmetic clean up

No functional changes.

Obtained-from: KAME via FreeBSD

4 years agoinet6: Style and indentation
Sepherosa Ziehau [Tue, 4 Aug 2015 13:03:43 +0000 (21:03 +0800)]
inet6: Style and indentation

Obtained-from: KAME via FreeBSD

4 years agoinet/inet6: Add IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP
Sepherosa Ziehau [Tue, 4 Aug 2015 12:46:03 +0000 (20:46 +0800)]
inet/inet6: Add IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP

Obtained-from: FreeBSD

4 years agokernel/ahd: Do not assign an uninitialized variable in early fail cases.
Sascha Wildner [Wed, 5 Aug 2015 16:43:48 +0000 (18:43 +0200)]
kernel/ahd: Do not assign an uninitialized variable in early fail cases.

4 years agoinet6: Nuke duplicated function and unused function
Sepherosa Ziehau [Mon, 3 Aug 2015 13:18:42 +0000 (21:18 +0800)]
inet6: Nuke duplicated function and unused function

Obtained-from: KAME via FreeBSD

4 years agoicmp6: Fix possible mbuf leakage
Sepherosa Ziehau [Mon, 3 Aug 2015 13:06:49 +0000 (21:06 +0800)]
icmp6: Fix possible mbuf leakage

Though, this will not happen in the current code, better safe than
sorry here.

Obtained-from: KAME via FreeBSD

4 years agortsock: If target cpu is not specified, stick to cpu0
Sepherosa Ziehau [Mon, 3 Aug 2015 12:52:19 +0000 (20:52 +0800)]
rtsock: If target cpu is not specified, stick to cpu0

4 years agoAdd AT&T Research regex(3) regression testsuite
John Marino [Mon, 3 Aug 2015 21:35:20 +0000 (23:35 +0200)]
Add AT&T Research regex(3) regression testsuite

Before we replace our ancient regex, we need to baseline it.
This is a well-known and maintained regex testsuite from AT&T Research.
The following commands from tools/regression/lib/libc-regex can be used:

  Make full-test-run   (this runs all tests consecutively)

  make test-basic
  make test-categorize
  make test-nullsubexpr
  make test-leftassoc
  make test-rightassoc
  make test-forcedassoc
  make test-repetition

To change the locale, set LOCALE (e.g. make LOCAL=en_US.UTF-8 test-basic)
These are the baseline results:

  basic       : TEST testregex, 539 tests,  0 errors
  categorize  : TEST testregex,  20 tests,  0 errors
  nullsubexpr : TEST testregex,  84 tests, 31 errors
  leftassoc   : TEST testregex,  12 tests, 12 errors
  rightassoc  : TEST testregex,  24 tests,  0 errors
  forcedassoc : TEST testregex,  48 tests,  8 errors
  repetition  : TEST testregex, 129 tests, 37 errors

UNSUPPORTED:
  AUGMENTED,SHELL,CLASS_ESCAPE,COMMENT,DELIMITED,DISCIPLINE,ESCAPE,LEFT,
  LENIENT,LITERAL,MINIMAL,MULTIPLE,MULTIREF,MUSTDELIM,NULL,RIGHT,
  SHELL_DOT,SHELL_ESCAPED,SHELL_GROUP,SHELL_PATH,SPAN,regnexec,
  regsubcomp,redecomp

4 years agovgrind(1): Remove unused file.
Sascha Wildner [Mon, 3 Aug 2015 18:31:04 +0000 (20:31 +0200)]
vgrind(1): Remove unused file.

4 years agotip(1): Remove another unused file.
Sascha Wildner [Mon, 3 Aug 2015 18:20:00 +0000 (20:20 +0200)]
tip(1): Remove another unused file.

4 years agotip(1): Reduce it to what we actually use from it.
Sascha Wildner [Mon, 3 Aug 2015 18:14:38 +0000 (20:14 +0200)]
tip(1): Reduce it to what we actually use from it.

Also, merge libacu remains.

No change in functionality.

4 years agolibkern: Remove unused locc() function.
Sascha Wildner [Mon, 3 Aug 2015 15:44:56 +0000 (17:44 +0200)]
libkern: Remove unused locc() function.

4 years agoipfw3: get act of the rule
Bill Yuan [Wed, 29 Jul 2015 14:16:02 +0000 (22:16 +0800)]
ipfw3: get act of the rule

4 years agoipfw3: dummynet dispatch back to the same cpu
Bill Yuan [Mon, 3 Aug 2015 15:36:21 +0000 (23:36 +0800)]
ipfw3: dummynet dispatch back to the same cpu

4 years agoi386 removal, part 29/x: Remove old serial drivers, cy(4) and stl(4).
Sascha Wildner [Mon, 3 Aug 2015 08:16:50 +0000 (10:16 +0200)]
i386 removal, part 29/x: Remove old serial drivers, cy(4) and stl(4).

stlstats(8), too.

4 years agokernel: Fix for compiling drm into the kernel.
Sascha Wildner [Mon, 3 Aug 2015 08:16:21 +0000 (10:16 +0200)]
kernel: Fix for compiling drm into the kernel.

4 years agoi386 removal, part 28/x: Remove pnpinfo(8).
Sascha Wildner [Mon, 3 Aug 2015 05:46:35 +0000 (07:46 +0200)]
i386 removal, part 28/x: Remove pnpinfo(8).

4 years agolocales: Update to CLDR version 27.0.1 (from 2.0.1)
John Marino [Mon, 3 Aug 2015 01:45:53 +0000 (03:45 +0200)]
locales: Update to CLDR version 27.0.1 (from 2.0.1)

I generates the new POSIX files from the latest CLDR release (from
June 2015) using the provided java tool, and regenerated all the
locales accordingly.

Note that kk_KZ has been renamed to kk_Cyrl_KZ.

4 years agolocales: Update ctype charmaps with CLDR 27 data
John Marino [Mon, 3 Aug 2015 01:40:05 +0000 (03:40 +0200)]
locales: Update ctype charmaps with CLDR 27 data

4 years agocldr2def: Update Makefile to generate new POSIX source files
John Marino [Mon, 3 Aug 2015 00:51:51 +0000 (02:51 +0200)]
cldr2def: Update Makefile to generate new POSIX source files

We've been using CLDR v2.0.1 because it was the last version that
provided generated POSIX source files.  (The next release, v21, only
provided the java tool to generate them).  The last release is version
27.0.1.  This alternation to the makefile allows the generation of the
desired 72 base locales with a single command (after the tool is
downloaded and installed in the same CLDR release directory)

Note that kk_KZ locale is changing to kk_Cyrl_KZ.

While here, make the necessary updates to charmaps.xml to generate
to locale source files.

4 years agossh - Fix an openssh vulnerability
Matthew Dillon [Mon, 3 Aug 2015 01:08:56 +0000 (18:08 -0700)]
ssh - Fix an openssh vulnerability

* Note that this vulnerability cannot occur with
  DragonFly's defaults.

Security:   CVE-2015-5600
Security:   FreeBSD-SA-15:16.openssh

4 years agodrm/i915: Fix core-2 ring buffer init
Matthew Dillon [Mon, 3 Aug 2015 00:49:41 +0000 (17:49 -0700)]
drm/i915: Fix core-2 ring buffer init

* Fix a ring buffer initialization issue with core-2 by using a read-back
  to enforce order.

* Taken-from linux, checked linux-current and same fix is still there.

Taken-from: a4acb8d0933f89 (linux)
Reported-by: davshao bug #2834
4 years agokernel/devfs: style(9) fixes.
Sascha Wildner [Sun, 2 Aug 2015 20:12:55 +0000 (22:12 +0200)]
kernel/devfs: style(9) fixes.

4 years agounbreak 4 LC categories
John Marino [Sun, 2 Aug 2015 14:50:26 +0000 (16:50 +0200)]
unbreak 4 LC categories

My regular expression was wrong and all the comments were not getting
stripped.  This broke LC_MONETARY, LC_NUMERIC, LC_MESSAGES, and
LC_TIMEDEF.  Fix cldr2def tool and regenerate makefiles.

4 years agogdb: Fix quickworld failure.
Sascha Wildner [Sun, 2 Aug 2015 11:34:00 +0000 (13:34 +0200)]
gdb: Fix quickworld failure.

xml-builtin.c couldn't be regenerated via 'quickworld' because the
feature_to_c.sh script refuses to overwrite it if it does already
exist.

4 years agostrcoll(1): Fix named locale case where conversion fails
John Marino [Sun, 2 Aug 2015 11:19:16 +0000 (13:19 +0200)]
strcoll(1): Fix named locale case where conversion fails

When strcoll is used with a locale other than C/POSIX, it uses the
mbsrtowcs_l(1) function which can alter the src pointer upon failure.
If that happens in the current implementation of strcoll, a null pointer
is send to strcmp (resulting in wrong answer) and it will change the s
or s2 argument of strcoll(1), which is not behavior expected by the POSIX
standard.

Using a copy of the s and s2 arguments prevents this situation.  Note that
Illumos, which which the source came, still has this vulnerability.

Reported by: Romick (YRabbit) on IRC

4 years agolocales: create short names for the 9 new base locales
John Marino [Sun, 2 Aug 2015 09:32:43 +0000 (11:32 +0200)]
locales: create short names for the 9 new base locales

4 years agolocales: Fix pt_BR.ISO8859-15, remove UTF-8
John Marino [Sun, 2 Aug 2015 09:02:21 +0000 (11:02 +0200)]
locales: Fix pt_BR.ISO8859-15, remove UTF-8

The pt_BR.ISO8859-15 locale was not properly defined because it's
directory was not pre-created (fixed now).  The UTF-8 CTYPE is no longer
used (every locale explicitly is accounted for) so let's remove it.

The Brazilian locale won't always be fixed under quickworld, it will
require a full build in some cases.

4 years agosys/vfs/hammer: Fix potential wrong error message
Tomohiro Kusumi [Sun, 2 Aug 2015 06:41:27 +0000 (15:41 +0900)]
sys/vfs/hammer: Fix potential wrong error message

It's not always because of volume not empty.

4 years agosys/vfs/hammer: Minor optimization on layer1/2 iteration
Tomohiro Kusumi [Fri, 31 Jul 2015 21:03:27 +0000 (06:03 +0900)]
sys/vfs/hammer: Minor optimization on layer1/2 iteration

Layer1 and layer2 metadata are clustered in each big-block,
so use different buffers for layer1 and layer2 to prevent
unnecessary buffer release/get. This is what newfs_hammer
does on bootstrap in userspace and this function basically
does the same thing via ioctl.

4 years agosys/vfs/hammer: Add test_free_callback()
Tomohiro Kusumi [Wed, 29 Jul 2015 17:09:34 +0000 (02:09 +0900)]
sys/vfs/hammer: Add test_free_callback()

Add test_free_callback() and remove dry run code from
free_callback() which has been used for both testing
and actual ondisk modification. It makes free_callback()
more simple and clearer with no flag and null-checks
that were necessary to make it work for both purposes.

4 years agosbin/mount_hammer: Fix error messages
Tomohiro Kusumi [Sun, 2 Aug 2015 05:38:37 +0000 (14:38 +0900)]
sbin/mount_hammer: Fix error messages

It's possible that open(2) and signature check do not fail
but mount(2) still fails possibly because of fs's bug.
When that happens (it actually did happen right now) fdevs
remains with no valid string strcatted. Add an error message
for such case.

Also change printf(); to fprintf(stderr);.

4 years agosbin/mount_hammer: Fix upper limit of volume num
Tomohiro Kusumi [Sun, 2 Aug 2015 05:32:15 +0000 (14:32 +0900)]
sbin/mount_hammer: Fix upper limit of volume num

(ac - 1) is for the command arg which is in blkdevs format.
info.nvolumes is the number of volumes after dissecting blkdevs format.

4 years agosys/vfs/hammer: Fix wrong function name in kprintf
Tomohiro Kusumi [Wed, 29 Jul 2015 19:13:56 +0000 (04:13 +0900)]
sys/vfs/hammer: Fix wrong function name in kprintf

4 years agosys/vfs/hammer: Add cond to kprintf("\n"); on volume-del
Tomohiro Kusumi [Wed, 29 Jul 2015 17:54:36 +0000 (02:54 +0900)]
sys/vfs/hammer: Add cond to kprintf("\n"); on volume-del

Should print \n only when count>=5 otherwise it generates
a blank line in dmesg.

4 years agosys/vfs/hammer: Fix comment on localization
Tomohiro Kusumi [Thu, 30 Jul 2015 11:16:12 +0000 (20:16 +0900)]
sys/vfs/hammer: Fix comment on localization

Add missing tid.

4 years agodrm/i915: experimental adapter->name to sc->name patch
zrj [Fri, 31 Jul 2015 09:47:01 +0000 (12:47 +0300)]
drm/i915: experimental adapter->name to sc->name patch

4 years agodrm/i915: use drm_asprintf() in ivybridge_parity_work
zrj [Fri, 31 Jul 2015 09:09:49 +0000 (12:09 +0300)]
drm/i915: use drm_asprintf() in ivybridge_parity_work

  Useless kmalloc/kfree but useful to test drm_asprintf() itself

4 years agodrm: add connector/encoder name creation
zrj [Fri, 31 Jul 2015 09:00:57 +0000 (12:00 +0300)]
drm: add connector/encoder name creation

  This implements name creation using drm_asprintf() helper function.
  For now skip "adapter->name".

4 years agodrm: init unused_nodes list for drm/ttm from FreeBSD times
zrj [Tue, 28 Jul 2015 14:24:50 +0000 (17:24 +0300)]
drm: init unused_nodes list for drm/ttm from FreeBSD times

4 years agodrm/i915: Avoid releasing non acquired lock for eDP systems
zrj [Fri, 24 Jul 2015 09:26:04 +0000 (12:26 +0300)]
drm/i915: Avoid releasing non acquired lock for eDP systems

4 years agodrm/i915: Fix i915_gem_fault()
Matthew Dillon [Sat, 25 Jul 2015 06:23:05 +0000 (08:23 +0200)]
drm/i915: Fix i915_gem_fault()

The retry loop in i915_gem_fault() was very seriously broken for EINTR
or ERETRYSYS (which is also basically EINTR)
It loops with gem mostly left locked, doesn't sleep, so it live locks a
cpu if it ever gets hit

The best solution is to disallow EINTR / ERESTARTSYS entirely.
The implementation is crazy... normal drm locks are allowed to PCATCH
and fail with EINTR.  That's just insane

Stability is better with some hacks added.  I'm unwinding all the locks,
sleeping for one tick, and then retrying.
Horrible hack but so far it works

4 years agodrm/i915: Update to Linux 3.16
François Tigeot [Fri, 24 Jul 2015 08:44:53 +0000 (10:44 +0200)]
drm/i915: Update to Linux 3.16

* Much improved support for Broadwell GPUs. Acceleration should now be fully
  operational and the giant L4 eDRAM cache is now enabled when present.

* Baytrail/Valleyview support improvements

* prelimary support for Cherryview (14nm Atom SOCs)

* Various fixes and performance improvements on most other GPU generations

* Improved runtime power management

* 5.4GHz DisplayPort support

* Large cursor support (up to 256x256 pixels), useful for high-dpi displays.

* Mapping of user pages into video memory (userptr)
  This allows zero-copy downloads and efficient readback to/from the GPU,
  allowing faster rendering of client-side software rasterisers, mitigation
  of stalls due to read back and faster pipelining of texture data (such as
  pixel buffer objects in GL or data blobs in CL). Mixed CPU/GPU operations
  become more efficient in general.

4 years agohammer - Allow PVFSROOT to have more refs when upgrading
Matthew Dillon [Sun, 2 Aug 2015 03:43:31 +0000 (20:43 -0700)]
hammer - Allow PVFSROOT to have more refs when upgrading

* When upgrading a PFS from slave to master, allow the PVFSROOT
  to have refs and a vnode because the hammer pfs-upgrade command
  itself might have it open.

4 years agokernel - Disable swapcache once paniced or if dumping
Matthew Dillon [Sun, 2 Aug 2015 02:39:15 +0000 (19:39 -0700)]
kernel - Disable swapcache once paniced or if dumping

* Make sure we do not attempt to read or write via the swapcache if the
  machine is paniced or has been dumped via the debugger.  This avoids
  corrupting the dump and avoids corrupting reads shortcut through the
  swapcache under these conditions.

4 years agoboot - Fix gzipped initrd.img loading
Matthew Dillon [Sun, 2 Aug 2015 00:39:12 +0000 (17:39 -0700)]
boot - Fix gzipped initrd.img loading

* Fix tests in libstand filesystems against f_flags.  Previous tests
  were f_flags != F_READ, which does not work properly when other flags
  are present.  Change to ((f_flags & (F_READ|F_WRITE)) != F_READ).

* Skip whiteout entries in UFS.  These could lead to false positives.

4 years agoAdd 17 new locales and really remove Latin
John Marino [Sat, 1 Aug 2015 23:13:15 +0000 (01:13 +0200)]
Add 17 new locales and really remove Latin

Now that locale defintions are generates, it's easy to add more.
I've added the following new locale defintions:

  * en_HK ISO-8859-1  (Hong Kong/English)
  * en_HK UTF-8
  * en_PH ISO-8859-1  (Phillipines/English)
  * en_PH UTF-8
  * en_SG ISO-8859-1  (Singapore/English)
  * en_SG UTF-8
  * es_AR ISO-8859-1  (Argentina/Spanish)
  * es_AR UTF-8
  * es_CR ISO-8859-1  (Costa Rica/Spanish)
  * es_CR UTF-8
  * es_MX ISO-8859-1  (Mexico/Spanish)
  * es_MX UTF-8
  * se_FI UTF-8       (Finland/Northern Sami)
  * se_NO UTF-8       (Norway/Northern Sami)
  * sv_FI ISO-8859-1  (Finland/Swedish)
  * sv_FI ISO-8859-15
  * sv_FI UTF-8

There were a few places la_LN (Latin) was hidden so I've really
removed it now.

4 years agoRemove kk_KZ.PT154 and all latin locales
John Marino [Sat, 1 Aug 2015 22:00:20 +0000 (00:00 +0200)]
Remove kk_KZ.PT154 and all latin locales

Latin, strangely enough, is not covered by CLDR POSIX files.  Thus,
it is impossible to completely load the locales.  Both LC_CTYPE and
LC_COLLATE need updated files.  Thus, all version of the Latin
locales needs to go.

The kk_KZ locale just came back with the UTF-8 codeset, but there are
character maps for PT154, so it's impossible to continue to have this
locale.

4 years agolocales: also update lv_LV, pt_BR and kk_KZ
John Marino [Sat, 1 Aug 2015 21:46:16 +0000 (23:46 +0200)]
locales: also update lv_LV, pt_BR and kk_KZ

These were stuck with old definitions due to the cldr2def's configure
file missing these three locales.

4 years agoActivate kk_KZ, lv_LV, and pt_BR locales
John Marino [Sat, 1 Aug 2015 21:40:45 +0000 (23:40 +0200)]
Activate kk_KZ, lv_LV, and pt_BR locales

These three locales already existed, but they weren't being updated.
I've adjusted the xml configuration to get them building (minus the
kk_KZ.PT154 locale which will be removed).

While here, update the tools/tools/locale Makefile to replace all
six LC categories in /usr/src/share with the "make install" target,
and then install them on a live system with "make post-install" target.

4 years agoRemove obsolete mklocale directory and its old src files
John Marino [Sat, 1 Aug 2015 18:45:59 +0000 (20:45 +0200)]
Remove obsolete mklocale directory and its old src files

4 years agoUse localedef(1) to generate LC_CTYPE, switch off mklocale
John Marino [Sat, 1 Aug 2015 18:43:29 +0000 (20:43 +0200)]
Use localedef(1) to generate LC_CTYPE, switch off mklocale

Active the new share/ctypedef directory and deactivate share/mklocale.
This means the LC_CTYPE files will be generated by localedef(1) now.
As a result, remove mklocale from bootstrap tools and remove it via
"make upgrade"

4 years agolibc/locale: Revamp CTYPE support (from Illumos)
John Marino [Sat, 1 Aug 2015 18:36:42 +0000 (20:36 +0200)]
libc/locale: Revamp CTYPE support (from Illumos)

The LC_CTYPE format didn't change, but libc stills needs a revamp
to properly use the new LC_CTYPE files that localedef(2) generates.

4 years agoFix cldr2def tool and regenerate 2 makefiles as a result
John Marino [Sat, 1 Aug 2015 19:37:53 +0000 (21:37 +0200)]
Fix cldr2def tool and regenerate 2 makefiles as a result

I accidently changed the wrong makefile so both colldef and ctype makefiles
wrong wrong.  I adjusted the tool and regenerated the makefiles.

While here, remove the unused map.UTF-8 that should have been removed
earlier but wasn't due to a git misuse.

4 years agoUnbreak world
John Marino [Sat, 1 Aug 2015 19:24:08 +0000 (21:24 +0200)]
Unbreak world

I didn't mean to update the share/colldef Makefile yet, and an
incorrect version got committed.  This should fix world.

4 years agobuildworld - Fix bootstrapping from older worlds
Matthew Dillon [Sat, 1 Aug 2015 18:51:39 +0000 (11:51 -0700)]
buildworld - Fix bootstrapping from older worlds

* __returns_twice doesn't exist in older sys/cdefs.h, fix bootstrapping by
  shoehorning a default if it does not exist.

4 years agolibc/locale: Replace ascii.c, it was removed too soon
John Marino [Sat, 1 Aug 2015 18:12:12 +0000 (20:12 +0200)]
libc/locale: Replace ascii.c, it was removed too soon

I am not sure what happened, I limited the commit commit but somehow
this deleted file got included in a recent commit.  It will be removed
again shortly.

4 years agoAdd share/ctypedef directory (it will replace mklocale)
John Marino [Sat, 1 Aug 2015 17:49:02 +0000 (19:49 +0200)]
Add share/ctypedef directory (it will replace mklocale)

This directory will generate new LC_CTYPE files.  They require a
significant update to libc/locale so it is not hooked into the
build yet.  This the the produce of the clr2def tool upgrade
and the generated codeset maps at tools/tools/locale/etc/final-maps.

4 years agoPregenerate maps for LC_CTYPE generation
John Marino [Sat, 1 Aug 2015 17:41:45 +0000 (19:41 +0200)]
Pregenerate maps for LC_CTYPE generation

These are the products of the new convert_map.pl which localedef
will use to generate LC_CTYPE.  To avoid duplication, these maps
will be used where they are (in tools/tools/locale/etc/final-maps)

It turns out that the widths.txt file is only used for LC_CTYPE,
so it's being moved as well as being removed from share/colldef.

4 years agoFix three clr2def2 character maps
John Marino [Sat, 1 Aug 2015 17:37:45 +0000 (19:37 +0200)]
Fix three clr2def2 character maps

The localedef(1) tool does not allow two symbols to be mapped to
the same unicode character.  I actually don't know if this is really
"wrong", but I had to adjust a couple of character sets that
violated this rule: ARMSCII-8 and Big5HKSCS.  Neither are present
on Illumos so that may explain why localedef(1) wasn't prepared
to do anything except throw an error.

The CP866 charset had a trailing garbage at the end of the file that
localedef didn't like, so I removed it.

4 years agoclr2def: Add LC_CTYPE source file generation support
John Marino [Sat, 1 Aug 2015 17:27:04 +0000 (19:27 +0200)]
clr2def: Add LC_CTYPE source file generation support

I added the capability to generate LC_CTYPE source files (really this is
basically extracting a section from the POSIX files) but there was some
logic to figure out how to use the least amount of files because some of
them are large.

I compromised on a scheme that makes two reductions.  The first eliminates
true duplicates and uses the SAME+= mechanism to create symlinks.  However,
this leaves still some duplicates because while the output is distinct,
the source files are the same (e.g. en_US.ISO8859* uses the same input file
as en_US.UTF-8 locale, but the LC_CTYPE products differ.  The script
identifies those are replaces them with symlinks.  So it looks like a lot
of files but really it's only about 12 or so.

During the actual LC_CTYPE generating, character maps are needed.  I added
a Illumos tool to do this, which I had to modify.  Unlike Illumos, we will
pregenerate the maps that the tool (convert_map.pl) produces.  I had to
spend hours troubleshooting various "invalid" inputs so this is definitely
something that should not be repeated in the build.

4 years agoFix zh_Hans_CN.GB2312 locale
John Marino [Sat, 1 Aug 2015 17:12:21 +0000 (19:12 +0200)]
Fix zh_Hans_CN.GB2312 locale

It turns out that using a commented source file for LC_* file generation
really isn't a good idea.  In the cldr2def tool's charmap.xls, the
low ASCII is transformed to the "Full width" versions, but the first
byte just happens to be "#".  Yes, that's right, the comment character.

Since all comments are either "#" or or followed by a space, I can fix
the resulting broken zh_Hans_CN.GB2312 by alterning the grep instruction.
However, if we ever have a legitimate single "#" character as input, then
this won't work anymore.

The Armenian changes are a result to a tool correction that will be
commited shortly.

4 years agokernel/dsched: Use <machine/inttypes.h>, not <inttypes.h>.
Sascha Wildner [Sat, 1 Aug 2015 17:54:41 +0000 (19:54 +0200)]
kernel/dsched: Use <machine/inttypes.h>, not <inttypes.h>.

4 years agokernel/vfs_quota: Remove unneeded <inttypes.h> inclusion.
Sascha Wildner [Sat, 1 Aug 2015 17:53:41 +0000 (19:53 +0200)]
kernel/vfs_quota: Remove unneeded <inttypes.h> inclusion.

4 years agokernel: Use <sys/stdbool.h> in kernel code, not <stdbool.h>.
Sascha Wildner [Sat, 1 Aug 2015 17:39:20 +0000 (19:39 +0200)]
kernel: Use <sys/stdbool.h> in kernel code, not <stdbool.h>.

4 years agokernel/iscsi: Remove unneeded <signal.h> inclusion.
Sascha Wildner [Sat, 1 Aug 2015 17:17:02 +0000 (19:17 +0200)]
kernel/iscsi: Remove unneeded <signal.h> inclusion.

4 years agokernel: Use <sys/bitstring.h> instead of <bitstring.h>.
Sascha Wildner [Sat, 1 Aug 2015 17:02:46 +0000 (19:02 +0200)]
kernel: Use <sys/bitstring.h> instead of <bitstring.h>.

4 years ago<bitstring.h>: Move it to /usr/src/sys/sys so kernel files can use it too.
Sascha Wildner [Sat, 1 Aug 2015 17:01:14 +0000 (19:01 +0200)]
<bitstring.h>: Move it to /usr/src/sys/sys so kernel files can use it too.

To avoid using userspace headers in the kernel.

4 years agoagp: Remove some debugging printfs
François Tigeot [Sat, 1 Aug 2015 07:56:38 +0000 (09:56 +0200)]
agp: Remove some debugging printfs

4 years agodrm: Add linux/hashtable.h
François Tigeot [Sat, 1 Aug 2015 07:16:24 +0000 (09:16 +0200)]
drm: Add linux/hashtable.h

4 years agokernel/usb4bsd: Install gadget example drivers and fix usbtest.
Sascha Wildner [Sat, 1 Aug 2015 06:23:24 +0000 (08:23 +0200)]
kernel/usb4bsd: Install gadget example drivers and fix usbtest.

Taken-from: FreeBSD

4 years agokernel/usb4bsd: Set USB_HAVE_MSCTEST_DETACH and adjust include guard.
Sascha Wildner [Sat, 1 Aug 2015 05:16:50 +0000 (07:16 +0200)]
kernel/usb4bsd: Set USB_HAVE_MSCTEST_DETACH and adjust include guard.

4 years agoinet6: Simplify nd6_dad_ns_output() interface
Sepherosa Ziehau [Fri, 31 Jul 2015 14:08:21 +0000 (22:08 +0800)]
inet6: Simplify nd6_dad_ns_output() interface

4 years agoinet6: Make DAD lockless MPSAFE
Sepherosa Ziehau [Fri, 31 Jul 2015 14:08:04 +0000 (22:08 +0800)]
inet6: Make DAD lockless MPSAFE

4 years agonet: Factor out ASSERT_IN_NETISR and ASSERT_IS_NETISR
Sepherosa Ziehau [Fri, 31 Jul 2015 14:07:41 +0000 (22:07 +0800)]
net: Factor out ASSERT_IN_NETISR and ASSERT_IS_NETISR

4 years agoi386 removal, part 27/x: Remove i386 specific stuff from the RAID drivers.
Sascha Wildner [Fri, 31 Jul 2015 19:31:41 +0000 (21:31 +0200)]
i386 removal, part 27/x: Remove i386 specific stuff from the RAID drivers.

pst(4) goes completely.

4 years agokernel: Uncomment VINUMDEBUG in LINT64. It compiles now.
Sascha Wildner [Fri, 31 Jul 2015 19:08:43 +0000 (21:08 +0200)]
kernel: Uncomment VINUMDEBUG in LINT64. It compiles now.

4 years agokernel: Add prototypes for setjmp()/longjmp() to <sys/systm.h>.
Sascha Wildner [Fri, 31 Jul 2015 19:08:00 +0000 (21:08 +0200)]
kernel: Add prototypes for setjmp()/longjmp() to <sys/systm.h>.

Used by ddb and vinum. Remove the inclusion of the <setjmp.h> userspace
header.

4 years agoregcomp: limit comparison to C locale only
John Marino [Fri, 31 Jul 2015 13:00:23 +0000 (15:00 +0200)]
regcomp: limit comparison to C locale only

The regex code does not work with multibyte codesets like UTF-8.  In fact,
it doesn't even work with single-byte codesets like ISO-8859-1.  The
comparison blows up at index 128 (the range is 0 to UCHAR_MAX (255).

As a temporary workaround, all comparisons will be done in C locale
regardless of the environment setting.  The regex library needs to be
updated to handle all codesets.

4 years agolibc/collcmp: Fix initialization of s2
John Marino [Fri, 31 Jul 2015 11:23:18 +0000 (13:23 +0200)]
libc/collcmp: Fix initialization of s2

4 years agolibc/regex: Sync with FreeBSD
John Marino [Fri, 31 Jul 2015 10:00:55 +0000 (12:00 +0200)]
libc/regex: Sync with FreeBSD

4 years agolibc/xdr: Sync xdr_sizeof.c with FreeBSD and add it to the build. v4.3.1
Sascha Wildner [Thu, 30 Jul 2015 22:21:20 +0000 (00:21 +0200)]
libc/xdr: Sync xdr_sizeof.c with FreeBSD and add it to the build.

FreeBSD did so too after our last upgrade. Shouldn't hurt.

4 years agogcc50: Adjust makefiles for new file locations
John Marino [Thu, 30 Jul 2015 21:30:40 +0000 (23:30 +0200)]
gcc50: Adjust makefiles for new file locations

4 years agogcc50: Remove generic versions of added files
John Marino [Thu, 30 Jul 2015 20:22:02 +0000 (22:22 +0200)]
gcc50: Remove generic versions of added files

These files can probably stay in place with .PATH and -I order giving
preference to "dragonfly" over "generic", but let's go ahead and just
remove them from contrib to avoid any possible confusion.

4 years agogcc50: Add proper locale support to libstdc++ (local mod)
John Marino [Thu, 30 Jul 2015 20:03:21 +0000 (22:03 +0200)]
gcc50: Add proper locale support to libstdc++ (local mod)

These patches will be sent upstream soon.  DragonFly is the only BSD
with c++ local support.  The exception is "messages".  The glibc has
gettext functions incorporated to support it, but we can't used libintl
because that would require linking it to every c++ executable.

4 years agolibc/calloc: Remove calloc.c, which has been unbuilt since 82949828d.
Sascha Wildner [Thu, 30 Jul 2015 19:44:36 +0000 (21:44 +0200)]
libc/calloc: Remove calloc.c, which has been unbuilt since 82949828d.

calloc() is part of nmalloc.c as well as of dmalloc.c

4 years agomake upgrade: Stop removing hi_IN.UTF-8 and la_LN.UTF-8
John Marino [Thu, 30 Jul 2015 19:38:19 +0000 (21:38 +0200)]
make upgrade: Stop removing hi_IN.UTF-8 and la_LN.UTF-8

These old upgrade entries were removing newly installed locales.

Reported-by: swildner
4 years agoi386 removal, part 26/x: Remove i386 specific lib/libc/quad.
Sascha Wildner [Thu, 30 Jul 2015 17:35:45 +0000 (19:35 +0200)]
i386 removal, part 26/x: Remove i386 specific lib/libc/quad.

None of the platforms which lead to it being compiled into FreeBSD's
libc look too interesting, so remove it.

Also remove copies of a number of those functions residing in libkern
and stop compiling one of these files into libstand. Libstand also
has a quad.h header. Shrink it together to what is actually needed
(not much), while here.

4 years agosocket: Close the soreference() race against socket owner netisr sofree()
Sepherosa Ziehau [Thu, 30 Jul 2015 15:24:37 +0000 (23:24 +0800)]
socket: Close the soreference() race against socket owner netisr sofree()

The race is kinda like this:

    Other thread/netisrN         netisrM (so->so_pcb owner)
             :                              :
      getpooltoken(head);                   :
      so->so_head = NULL;                   :
             :                          sofree(so); (*)
      soreference(so);                      :
      relpooltoken(head);                   :

(*)
sofree(so) frees the socket, since so->so_head is NULL and
getpooltoken(head) is not called.

Reported-by: dillon@
4 years agosocket: Group accept queue operations together
Sepherosa Ziehau [Thu, 30 Jul 2015 15:16:33 +0000 (23:16 +0800)]
socket: Group accept queue operations together

4 years agosocket: Nuke unused so_pru_abort()
Sepherosa Ziehau [Thu, 30 Jul 2015 15:02:58 +0000 (23:02 +0800)]
socket: Nuke unused so_pru_abort()