dragonfly.git
5 years agogames: Fix real bugs on three games (found by gcc 5.0)
John Marino [Wed, 11 Feb 2015 08:03:31 +0000 (09:03 +0100)]
games: Fix real bugs on three games (found by gcc 5.0)

I had NO_GAMES set so I missed these bugs yesterday.  Adventure, Fortune,
and Mille all had bugs in them  (the latter had two).

Now gcc-5.0 can build the entire world and kernel.
I still need to verify that a gcc-5.0 built world and kernel is bootable
and works though.

5 years agoecc/memtemp/e5: Prepare for E5 v3 support
Sepherosa Ziehau [Sun, 8 Feb 2015 13:49:48 +0000 (21:49 +0800)]
ecc/memtemp/e5: Prepare for E5 v3 support

5 years agokern ath drivers: Fix loops bounds (real bug x2) + source
John Marino [Wed, 11 Feb 2015 01:59:18 +0000 (02:59 +0100)]
kern ath drivers: Fix loops bounds (real bug x2) + source

The ar9300 source had a couple of logic ambiguities causing
[-Werror=logical-not-parenthesis] warnings.  The other two used the
wrong variable for the upper bounds of the loop.  I assume it was
correct once but the code changed, and the author neglected to use the
next edges max value.

5 years agokern: Fix [-Werror=aggressive-loop-optimizations]
John Marino [Wed, 11 Feb 2015 01:57:59 +0000 (02:57 +0100)]
kern: Fix [-Werror=aggressive-loop-optimizations]

These were basic upper bound checking errors on loops

5 years agokernel: Fix -Wmaybe-unitialized
John Marino [Wed, 11 Feb 2015 01:51:05 +0000 (02:51 +0100)]
kernel: Fix -Wmaybe-unitialized

Likely there was never a bug here, so explicitly initializing won't
make a difference other than make gcc 5.0 happy.

5 years agokern: Fix [-Werror=logical-not-parenthesis]
John Marino [Wed, 11 Feb 2015 01:48:43 +0000 (02:48 +0100)]
kern: Fix [-Werror=logical-not-parenthesis]

Since the whole point of this error is that logic order can be
ambiguous, I'm not 100% sure confident in these fixes, but they are
required to get the kernel to build with gcc 5.0.

5 years agogcc50: local mod to support kernel printf formats
John Marino [Tue, 10 Feb 2015 22:42:37 +0000 (23:42 +0100)]
gcc50: local mod to support kernel printf formats

The diff from gcc47 patched without issues (only line offsets).

5 years agokern: Make sure gcc47 - gcc50 don't check for set-not-used
John Marino [Tue, 10 Feb 2015 23:28:25 +0000 (00:28 +0100)]
kern: Make sure gcc47 - gcc50 don't check for set-not-used

5 years agokern: Address set-but-unused warnings (mostly)
John Marino [Tue, 10 Feb 2015 23:04:33 +0000 (00:04 +0100)]
kern: Address set-but-unused warnings (mostly)

On of these is an [-Werror=logical-not-parenthesis] error.
This is as far as I can get without implementing %r format again.

5 years agorwhod(8): Lower WARNS to 2 (masks -Wmaybe-uninitialized)
John Marino [Tue, 10 Feb 2015 22:26:16 +0000 (23:26 +0100)]
rwhod(8): Lower WARNS to 2 (masks -Wmaybe-uninitialized)

5 years agopflogd(8): lower WARNS and fix logic errors
John Marino [Tue, 10 Feb 2015 22:17:53 +0000 (23:17 +0100)]
pflogd(8): lower WARNS and fix logic errors

The contrib files trigger a new -Wunused-value warning, so lower WARNS
to 3 to suppress that.  Also, a [logical-not-parenthesis] error was
triggering [-Werror=bool-compare].  Fixing it fixed the compare too.

5 years agobsd.sys.mk: Teach it about -Wunused-value (new with gcc4.9)
John Marino [Tue, 10 Feb 2015 22:16:21 +0000 (23:16 +0100)]
bsd.sys.mk: Teach it about -Wunused-value (new with gcc4.9)

5 years agokeyserv(8): Fix size argument on debugging output
John Marino [Tue, 10 Feb 2015 22:01:25 +0000 (23:01 +0100)]
keyserv(8): Fix size argument on debugging output

This was another size of pointer problem.

5 years agotruss(1): remove inline directive to fix [-Werror=inline]
John Marino [Tue, 10 Feb 2015 21:49:25 +0000 (22:49 +0100)]
truss(1): remove inline directive to fix [-Werror=inline]

GCC 5.0 thinks inlining the usage function will fail and only cause the
program to get bigger.  Minor, but I'll following GCC's advice.

5 years agoopiekey (contrib): Fix serious (?) [-Wsizeof-pointer-memaccess]
John Marino [Tue, 10 Feb 2015 21:38:44 +0000 (22:38 +0100)]
opiekey (contrib): Fix serious (?) [-Wsizeof-pointer-memaccess]

On a password verification function of opiekey, the amount of bytes
allocated to a secret was 4 bytes of i386 and 8 bytes of x86-64.  Memset
was using the size of the pointer to allocate memory.

Change 3 instances of this to size OPIE_SECRET_MAX + 1 to fix it.
FYI this vendor branch is like 16 years old...

5 years agosysctl(8): fix [-Werror=logical-not-parentheses] error
John Marino [Tue, 10 Feb 2015 21:18:18 +0000 (22:18 +0100)]
sysctl(8): fix [-Werror=logical-not-parentheses] error

5 years agortsol(8): Fix loop bug (aggressive-loop-optimizations)
John Marino [Tue, 10 Feb 2015 21:15:00 +0000 (22:15 +0100)]
rtsol(8): Fix loop bug (aggressive-loop-optimizations)

The index was being checked for validity after the array was accessed,
putting the check first makes gcc 5.0 happy.

5 years agonewfs_hammer(8): fix [-Wsizeof-pointer-memaccess]
John Marino [Tue, 10 Feb 2015 20:57:32 +0000 (21:57 +0100)]
newfs_hammer(8): fix [-Wsizeof-pointer-memaccess]

The device type comparison only worked by accident on x86-64 and not
reliability on i386 because the sizeof function returned the size of
the address rather than the size of the vol->type string.  Fix by
specifying the size of "DEVICE" to strncmp instead.

5 years agonatacontrol(8): Fix [-Werror=logical-not-parentheses] error
John Marino [Tue, 10 Feb 2015 20:55:23 +0000 (21:55 +0100)]
natacontrol(8): Fix [-Werror=logical-not-parentheses] error

5 years agodevd(8): Lower WARNS from 5 to 2 (has unused local typedefs)
John Marino [Tue, 10 Feb 2015 20:18:09 +0000 (21:18 +0100)]
devd(8): Lower WARNS from 5 to 2 (has unused local typedefs)

GCC 5.0 has detected local unused typedefs, so lower the warnings so
that compiler can build it.

5 years agobsd.sys.mk: support -Wunused-local-typedef
John Marino [Tue, 10 Feb 2015 20:22:58 +0000 (21:22 +0100)]
bsd.sys.mk: support -Wunused-local-typedef

Add support to bsd.sys.mk for a new warning, unused-local-typedef.  This
warning showed up in gcc 4.8 and is included in -Wall.  Hopefully I did
this correctly, but if not, swildner will soon correct it. :)

5 years agoFix static archive libstdc++.a for gcc 5.0
John Marino [Tue, 10 Feb 2015 19:28:22 +0000 (20:28 +0100)]
Fix static archive libstdc++.a for gcc 5.0

The libstdc++ libaries for gcc 5.0 are built differently than they have
been in the past, and closely mirror what the vendor build system does.
Three "convenience" librarys are built first: c++98, c++11, and supc++.
Both static and PIC versions are built.  The final library combines the
three components along with about 10 unique objects.

It worked fine for the shared version (libstd.so.9) but the static
version was unreadable.  I fixed it by creating a dedicated "ar" script
to dictate what gets assembled in the new static archive.  It would
have been a sweet solution has "ar" not had an incredible limitation:
The script can not have consecutive "+" characters on any line.  To
work around this, I had to:
  1) rename the 3 component libraries (all had ++ in the name)
  2) rename the output library (libstdc++.a => libstdcxx.a)
  3) copy all the cc files with "++" in their names to a new filename.
     This affected about 3-4 files.
  4) move the output library back to the proper name of libstdc++.a

What a pain those hacks were, but it works and gcc-5.0 can now build
itself.  It still can't complete world due to Werror trigging on new
warnings, but it's a good fix.

5 years agobsd.lib.mk: Allow for possibility to override static lib target
John Marino [Tue, 10 Feb 2015 19:24:32 +0000 (20:24 +0100)]
bsd.lib.mk: Allow for possibility to override static lib target

The upcoming fix for gcc 5.0 libstdc++.a requires a dedicated static
library target.  Up until now this hasn't been possible without bmake
screaming about duplicate targets (although it does work).  Add a simple
"if not target defined" check to bsd.lib.mk to avoid these warnings.

5 years agoAdd two more files to contrib/gcc-5.0/README.DELETED
John Marino [Tue, 10 Feb 2015 19:22:31 +0000 (20:22 +0100)]
Add two more files to contrib/gcc-5.0/README.DELETED

These were removed from the vendor branch to avoid the makefiles
accidentally picking up the generic version instead of the dfly version.
They were libstdc++ source files.

5 years agoMerge branch 'vendor/GCC50'
John Marino [Tue, 10 Feb 2015 19:21:01 +0000 (20:21 +0100)]
Merge branch 'vendor/GCC50'

5 years agoRemove two generic configure files for libstdc++
John Marino [Tue, 10 Feb 2015 19:16:45 +0000 (20:16 +0100)]
Remove two generic configure files for libstdc++

They are superceded by DragonFly-specific files

5 years agoif_rum - Reapply ratectl fix from 12ae2d804aa2cd27a8e9884f125d484784e76e75.
Imre Vadasz [Tue, 10 Feb 2015 15:42:41 +0000 (16:42 +0100)]
if_rum - Reapply ratectl fix from 12ae2d804aa2cd27a8e9884f125d484784e76e75.

5 years agoHook gcc 5.0 (pre-release) in build, unhook gcc 4.4
John Marino [Tue, 10 Feb 2015 14:13:34 +0000 (15:13 +0100)]
Hook gcc 5.0 (pre-release) in build, unhook gcc 4.4

Effectively replace GCC 4.4 with the 1 February 2015 snapshot of the
pre-release GCC 5.0.  This compiler is in pretty good shape, but it is
not perfect.  It cannot fully build world if WORLD_CCCVER is set to
GCC50.  This compiler import is a work in progress.

* The old compiler has been unhooked.
* The gcc44 sources may be removed soon
* Obviously NO_GCC44 doesn't work anymore
* NO_GCC50 has been created and should work
* NO_CXX was never documented and has been removed
* NO_OBJC was not deemed worthwhile and it has been removed
* man pages have been updated accordingly
* default make.conf has been updated accordingly
* Per bsd.sys.mk, gcc50 behaves just like gcc47
* Actually, all CCVER starting with "gcc" now behave like gcc47
* The proper CCVER value is "gcc50".  If "gcc5" is specified, the
  dports compiler lang/gcc5 will be used.

Iterating: THIS IS AN EXPERIMENTAL COMPILER!  It's not ready for
prime-time yet.  Do NOT set WORLD_CCVER to "gcc50".

5 years agoAdd README's to new vendor/GCC50 branch and one local mod
John Marino [Tue, 10 Feb 2015 13:46:24 +0000 (14:46 +0100)]
Add README's to new vendor/GCC50 branch and one local mod

Since GCC 5.0 will be the first release to officially support DragonFly,
there are very few local modifications planned, three.  At this time,
I'm only adding the first which defines the default search directories
for gcc libraries and programs.

5 years agoMerge branch 'vendor/GCC50' - gcc 5.0 snapshot 1 FEB 2015
John Marino [Tue, 10 Feb 2015 13:44:04 +0000 (14:44 +0100)]
Merge branch 'vendor/GCC50' - gcc 5.0 snapshot 1 FEB 2015

5 years agoImport pre-release gcc-5.0 to new vendor branch
John Marino [Tue, 10 Feb 2015 13:36:59 +0000 (14:36 +0100)]
Import pre-release gcc-5.0 to new vendor branch

5 years agogcc50: Bring in makefiles but leave them unhooked
John Marino [Tue, 10 Feb 2015 13:06:06 +0000 (14:06 +0100)]
gcc50: Bring in makefiles but leave them unhooked

The pre-release version of GCC 5.0 will be brought into base soon.  This
commit brings in the makefiles that build it, but they are not hooked
into the build in any way.  Before that happens, the vendor branch needs
to be merged into base, and dozens for files need to be simultaneously
changed.  GCC 4.4 will be unhooked at the same time.

The GCC releases provide pre-generated man pages, but the pre-releases do
not.  To support this, a switch has been added that installs man pages
from these directories.  When GCC 5.0 is released, those man pages will
be removed and the man pages will be installed from contrib/gcc-5.0

5 years agolibevtr: Fix loop properly
John Marino [Tue, 10 Feb 2015 11:51:37 +0000 (12:51 +0100)]
libevtr: Fix loop properly

The bruteforce fix should have used elements 0 - 2 because the strings
array was defined as EVTR_NS_MAX - 1, not EVTR_NS_MAX.  So the fix was
wrong, but it exposed the problem with the original code: the upper bound
of the loop was set to EVTR_NS_MAX, not EVTR_NS_MAX - 1 like the "maps"
version below it.

This commit reverts the previous change and fixes the problem with the
original code.

spotted-by: ivadasz

5 years agosh (1): Remove -Werror conditionally due to seven clobber candidates
John Marino [Tue, 10 Feb 2015 10:29:03 +0000 (11:29 +0100)]
sh (1): Remove -Werror conditionally due to seven clobber candidates

GCC 5.0 is screaming about sh potentially getting clobbered by longjmp.
I don't know how to fix this and the WARNS system doesn't cover
-Wclobbered so I'm turning -Werror off forcibly until somebody else can
fix it.  The error messages are:

/usr/src/bin/sh/eval.c: In function 'exphere':
/usr/src/bin/sh/eval.c:496:6: warning: variable 'need_longjmp' might be
  clobbered by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/eval.c: In function 'evalcommand':
/usr/src/bin/sh/eval.c:794:6: warning: variable 'mode' might be clobbered
  by 'lngjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/eval.c:799:17: warning: variable 'savehandler' might be
  clobberd by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/histedit.c: In function 'histcmd':
/usr/src/bin/sh/histedit.c:192:8: error: variable 'pat' might be
  clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
/usr/src/bin/sh/histedit.c:198:8: error: variable 'efp' might be
  clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
/usr/src/bin/sh/parser.c: In function 'parsebackq':
/usr/src/bin/sh/parser.c:982:6: warning: variable 'saveprompt' might be
  clobbered by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/parser.c:973:18: warning: argument 'out' might be
  clobbered by longjmp' or 'vfork' [-Wclobbered]

5 years agoed(1): Fix [-Werror=logical-not-parentheses]
John Marino [Tue, 10 Feb 2015 09:51:33 +0000 (10:51 +0100)]
ed(1): Fix [-Werror=logical-not-parentheses]

/usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to the
left hand side of comparison [-Werror=logical-not-parentheses]

Putting parenthese around the comparison makes gcc happy.

5 years agowlan: Let driver holds WLAN serializer for ieee80211_ifattach
Sepherosa Ziehau [Tue, 10 Feb 2015 09:47:21 +0000 (17:47 +0800)]
wlan: Let driver holds WLAN serializer for ieee80211_ifattach

Looks like almost all building drivers (except, ndis(4) and wpi(4))
hold WLAN serializer for ieee80211_ifattach(), so we release the
WLAN serializer in ieee80211_ifattach() before the if_attach().

This reverts 4109d03b12096f353e4036119a0d6357fa1ec67e and
part of a583ece6b440118aa26f3eb162a1df7f2821f923.

Reported-by: marino@
5 years agolibstand: Fix loop with undefined optimized behavior
John Marino [Tue, 10 Feb 2015 09:32:02 +0000 (10:32 +0100)]
libstand: Fix loop with undefined optimized behavior

With gcc 4.8+, libstand fails to build with "interation 8u involved in
undefined behavior [-Werror=aggressive-loop-optimizations]".  I figured
out that problem was the code was intentionally defining two fields in
the same structure with a single loop.

The "name" field is an array of size 8 while the "ext" field is an array
of size 3.  The loop in question iterated 11 times to initialize both,
relying on contiguous memory to work.  Apparently this leads to undefined
behavior, so I altered the line to explicitly define the correct element
on the correct field.

5 years agolibevtr: Remove loop with undefined optimized behavior
John Marino [Tue, 10 Feb 2015 09:00:05 +0000 (10:00 +0100)]
libevtr: Remove loop with undefined optimized behavior

Starting with gcc 4.8 I believe, one particular loop in evtr.c fails to
compile.  The error is "interation 3u involved undefined behavior
[-Werror=aggressive-loop-optimizations]".

No alternative I tried worked, so I finally just removed the loop since
it only iterates 4 times.  It's brute force but the code is correct.

5 years agoncurses: Apply patch from upstream to allow building by gcc 5.0
John Marino [Tue, 10 Feb 2015 01:41:18 +0000 (02:41 +0100)]
ncurses: Apply patch from upstream to allow building by gcc 5.0

The gcc 5.0 processor will mangle the headers produced by this script.
It has already been fixed in official patches from upstream.  Applying
the appropriate patch will allow gcc 5.0 to build ncurses, and gcc 4.7
has been verified to continue to work as well.

5 years agolibc: Silence a bunch of set-but-not-used errors found by gcc 5.0
John Marino [Mon, 9 Feb 2015 23:36:18 +0000 (00:36 +0100)]
libc: Silence a bunch of set-but-not-used errors found by gcc 5.0

During testing of upcoming base gcc 5.0, several libc files failed to
compile with -Werror set.  This commit will silence the errors.  For the
majority of these, I designed the variables as "__unused" so the compiler
knows that their (lack of) use is intentional.  For the rest, I just
removed the variables completely.

5 years agoe1000 (em, emx, ig_hal): Sync w/ intel em-7.4.2
Michael Neumann [Sat, 7 Feb 2015 21:11:21 +0000 (22:11 +0100)]
e1000 (em, emx, ig_hal): Sync w/ intel em-7.4.2

This adds support for network chips based on PCH_I218_{LM2,V2,LM3,V3}.

Tested with:
  * 82571, 82573, 82574 (sephe)
  * emx: I217_V (dillon)
  * em/emx: 82574L, I218_V2 (mneumann)

5 years agokernel/sound: Add missing unlock (we panic on lockuninit() on a held lock).
Sascha Wildner [Sun, 8 Feb 2015 22:33:39 +0000 (23:33 +0100)]
kernel/sound: Add missing unlock (we panic on lockuninit() on a held lock).

5 years agomemtemp.4: Add manpage for memtemp
Sepherosa Ziehau [Sun, 8 Feb 2015 12:30:25 +0000 (20:30 +0800)]
memtemp.4: Add manpage for memtemp

5 years agoifnet: Make ifnet and ifindex2ifnet MPSAFE
Sepherosa Ziehau [Thu, 22 Jan 2015 13:28:43 +0000 (21:28 +0800)]
ifnet: Make ifnet and ifindex2ifnet MPSAFE

- Accessing to these two global variables from non-netisr threads uses
  ifnet lock.  This kind of accessing is from
- Accessing to ifindex2ifnet from netisrs are lockless MPSAFE.
- Netisrs no longer access ifnet, instead they access ifnet array as of
  this commit, which is lockless MPSAFE.

Rules for accessing ifnet and ifindex2ifnet is commented near the
declaration of the related global variables/functions in net/if_var.h.

5 years agoidr: Remove a debugging message
François Tigeot [Sat, 7 Feb 2015 21:41:45 +0000 (22:41 +0100)]
idr: Remove a debugging message

5 years agokernel/x86_64: Add SDBG to Features2.
Sascha Wildner [Sun, 8 Feb 2015 00:15:26 +0000 (01:15 +0100)]
kernel/x86_64: Add SDBG to Features2.

From Intel 64 and IA-32 Architectures Software Developer's Manuals:

"A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE MSR
 for silicon debug."

Found in the Xeon E3-1226 v3.

5 years agodrm: Reintroduce drm_kms_free()
François Tigeot [Sat, 7 Feb 2015 16:57:28 +0000 (17:57 +0100)]
drm: Reintroduce drm_kms_free()

* The Linux version of kfree() is a macro with one argument.

* The real kfree() function takes two arguments.

* kfree() cannot be simply called via a function pointer from
  Linux code.

* Re-add the special purpose drm_kms_free() wrapper function
  to handle this situation. It was wrongly removed when drm_crtc.c
  was last synced to Linux.

Reported-by: jh32
5 years agodrm: Start using idr_alloc()
François Tigeot [Sat, 7 Feb 2015 10:11:17 +0000 (11:11 +0100)]
drm: Start using idr_alloc()

5 years agodrm: Sync drm_context.c with Linux 3.10
François Tigeot [Sat, 7 Feb 2015 09:58:06 +0000 (10:58 +0100)]
drm: Sync drm_context.c with Linux 3.10

5 years agoidr: Implement idr_alloc()
François Tigeot [Sat, 7 Feb 2015 09:37:27 +0000 (10:37 +0100)]
idr: Implement idr_alloc()

5 years agoiwn: Release WLAN serializer before ieee80211_ifattach()
Sepherosa Ziehau [Sat, 7 Feb 2015 14:38:52 +0000 (22:38 +0800)]
iwn: Release WLAN serializer before ieee80211_ifattach()

Mainly to avoid dead-locking domsg to netisrs in ieee80211_ifattach()

Reported-by: Rolinh on IRC
5 years agoecc/e5: Strip comma from device description
Sepherosa Ziehau [Fri, 6 Feb 2015 13:12:05 +0000 (21:12 +0800)]
ecc/e5: Strip comma from device description

5 years agoecc/e5: Declare dimmmtr near its usage
Sepherosa Ziehau [Fri, 6 Feb 2015 13:06:13 +0000 (21:06 +0800)]
ecc/e5: Declare dimmmtr near its usage

5 years agoecc/e5: No need to check rank disabled bits
Sepherosa Ziehau [Fri, 6 Feb 2015 13:00:34 +0000 (21:00 +0800)]
ecc/e5: No need to check rank disabled bits

5 years agomemtemp: Add Intel E5 v2 memory thermal sensor support
Sepherosa Ziehau [Fri, 6 Feb 2015 12:49:06 +0000 (20:49 +0800)]
memtemp: Add Intel E5 v2 memory thermal sensor support

5 years agoSync intel_sdvo.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 18:05:49 +0000 (19:05 +0100)]
Sync intel_sdvo.c with Linux 3.10

5 years agolib/libhammer: don't hide sysctlbyname(3) results
Tomohiro Kusumi [Mon, 26 Jan 2015 18:20:38 +0000 (03:20 +0900)]
lib/libhammer: don't hide sysctlbyname(3) results

This patch makes libhammer_btree_stats() and libhammer_io_stats() check
return value of each sysctlbyname(3) instead of only returning the last
result.

Closes: #2779

5 years agohammer: fix terminology of "large block"
Tomohiro Kusumi [Sat, 31 Jan 2015 21:35:10 +0000 (06:35 +0900)]
hammer: fix terminology of "large block"

This cleanup patch changes terminology "large block" to "big block".

- Both "large block" and "big block" are widely used in hammer source from
kernel to userspace, however these two refer to the same data structure which
is a 8MB sized chunk within low level blockmapped storage layer.

- The original design document https://www.dragonflybsd.org/hammer/hammer.pdf
uses big block for this data structure. Having two expressions in its
implementation is confusing and makes grep difficult.

Closes: #2782

5 years agolibhammer - Fix a fd leak on the previous commit
Antonio Huete Jimenez [Sat, 7 Feb 2015 11:04:04 +0000 (12:04 +0100)]
libhammer - Fix a fd leak on the previous commit

- Also check fd just in case it's invalid

Submitted-by: tkusumi (with modification)
Closes: #2784

5 years agolibc - Disallow an excessively large pattern space
Matthew Dillon [Sat, 7 Feb 2015 06:16:40 +0000 (22:16 -0800)]
libc - Disallow an excessively large pattern space

* Disallow pattern spaces which would cause intermediate calculations
  to overflow size_t.

* Since the pattern length must be in the hundreds of megabytes to trigger
  the issue on a 32-bit machine (and something insane on a 64-bit machine),
  it is unlikely that any software is at risk.  But still a good idea to
  deal with the case.

CERT: VU#695940

5 years agoRemove no longer used posix4(9) manual page.
Sascha Wildner [Sat, 7 Feb 2015 04:23:09 +0000 (05:23 +0100)]
Remove no longer used posix4(9) manual page.

5 years agodrm/i915: Remove intel_encoder_noop and intel_crtc_noop()
François Tigeot [Fri, 6 Feb 2015 16:48:41 +0000 (17:48 +0100)]
drm/i915: Remove intel_encoder_noop and intel_crtc_noop()

Reducing differences with Linux 3.10

5 years agodrm: Sync drm_buffer.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 16:23:36 +0000 (17:23 +0100)]
drm: Sync drm_buffer.c with Linux 3.10

5 years agodrm: Sync drm_crtc.c and drm_crtc_helper.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 16:14:47 +0000 (17:14 +0100)]
drm: Sync drm_crtc.c and drm_crtc_helper.c with Linux 3.10

5 years agodrm/i915: Use kzalloc()
François Tigeot [Fri, 6 Feb 2015 15:50:03 +0000 (16:50 +0100)]
drm/i915: Use kzalloc()

Fix little differences with Linux 3.10 when appropriate.

5 years agodrm: Implement kzalloc()
François Tigeot [Fri, 6 Feb 2015 15:44:33 +0000 (16:44 +0100)]
drm: Implement kzalloc()

5 years agoacpica: Fix 3abee989bb021ca7a77508792e45828ce9d53b28
Sepherosa Ziehau [Fri, 6 Feb 2015 06:27:28 +0000 (14:27 +0800)]
acpica: Fix 3abee989bb021ca7a77508792e45828ce9d53b28

STDERR_FILENO instead of magic number 1 should be used.

5 years agoacpica: Unbreak iasl compile
Sepherosa Ziehau [Fri, 6 Feb 2015 05:17:06 +0000 (13:17 +0800)]
acpica: Unbreak iasl compile

5 years agowlan: Destroy main ifp until all vaps are destroyed
Sepherosa Ziehau [Thu, 5 Feb 2015 13:17:27 +0000 (21:17 +0800)]
wlan: Destroy main ifp until all vaps are destroyed

The main ifp is referenced by ieee80211_vap_destroy(), so it must
be destroyed _after_ all vaps are destroyed.

Tested-by: dillon@
5 years agoem/emx: Apply the same TSO workaround as 82571/82572 for i217/i218
Sepherosa Ziehau [Thu, 5 Feb 2015 13:16:52 +0000 (21:16 +0800)]
em/emx: Apply the same TSO workaround as 82571/82572 for i217/i218

Tested-by: dillon@ on i217
5 years agoecc.4: Adjust according to the recent changes
Sepherosa Ziehau [Thu, 5 Feb 2015 14:38:12 +0000 (22:38 +0800)]
ecc.4: Adjust according to the recent changes

5 years agoprocfs - Properly return error codes for ioctl calls
Antonio Huete Jimenez [Thu, 5 Feb 2015 23:29:55 +0000 (00:29 +0100)]
procfs - Properly return error codes for ioctl calls

5 years agokern_clock.c: Clarify that my last commit msg meant to say 'time_uptime'.
Sascha Wildner [Thu, 5 Feb 2015 22:49:01 +0000 (23:49 +0100)]
kern_clock.c: Clarify that my last commit msg meant to say 'time_uptime'.

Also fix some typos in the comments.

5 years agoSync ACPICA with Intel's version 20150204.
Sascha Wildner [Thu, 5 Feb 2015 18:59:20 +0000 (19:59 +0100)]
Sync ACPICA with Intel's version 20150204.

* A raw gpe handling mechanism was created to allow better handling of
  GPE storms that aren't easily managed by the normal handler. The raw
  handler allows disabling/renabling of the the GPE so that interrupt
  storms can be avoided in cases where events cannot be timely serviced.

* Always modify GPE registers under the GPE lock.

* Various small bug fixes.

* Update copyrights.

5 years agolibhammer - Change the way PFS mounts are detected
Antonio Huete Jimenez [Thu, 5 Feb 2015 15:28:14 +0000 (16:28 +0100)]
libhammer - Change the way PFS mounts are detected

- libhammer_find_pfs_mount() now takes a single argument which
  is the unique_uuid used for the search.
- This solves a problem when passing the path of a PFS to commands
  like 'hammer info' which mistakenly took the argument as the PFS#0.
- Adjust manpage to reflect current status.

5 years agokernel/clock: Also document that time_second is since booting.
Sascha Wildner [Thu, 5 Feb 2015 21:27:24 +0000 (22:27 +0100)]
kernel/clock: Also document that time_second is since booting.

5 years agokernel - Fix documentation for time_second
Matthew Dillon [Thu, 5 Feb 2015 20:27:55 +0000 (12:27 -0800)]
kernel - Fix documentation for time_second

* time_second was improperly documented as an uptime.  It is not.
  It is an approximate real time and might not be monotonic.
  time_uptime should be used if an approximate monotonic uptime is
  desired.

5 years agokernel/wlan: Remove an unused malloc type.
Sascha Wildner [Thu, 5 Feb 2015 08:43:28 +0000 (09:43 +0100)]
kernel/wlan: Remove an unused malloc type.

5 years agowlan: Make sure that WLAN serializer is not held for if_{detach,attach}()
Sepherosa Ziehau [Wed, 4 Feb 2015 14:01:19 +0000 (22:01 +0800)]
wlan: Make sure that WLAN serializer is not held for if_{detach,attach}()

Tested-by: dillon@
5 years agoecc: Support Intel E5 v2 memory controller
Sepherosa Ziehau [Wed, 4 Feb 2015 12:40:26 +0000 (20:40 +0800)]
ecc: Support Intel E5 v2 memory controller

5 years agobuild: Unbreak GENERIC building; LINT seems fine.
Sepherosa Ziehau [Wed, 4 Feb 2015 02:44:59 +0000 (10:44 +0800)]
build: Unbreak GENERIC building; LINT seems fine.

5 years agox86_64: Disable mwait extention if there is no sub-states for C1
Sepherosa Ziehau [Tue, 3 Feb 2015 12:42:39 +0000 (20:42 +0800)]
x86_64: Disable mwait extention if there is no sub-states for C1

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2781

5 years agokernel/iwn: Comment out IWN_DEBUG in the Makefile.
Sascha Wildner [Tue, 3 Feb 2015 22:14:01 +0000 (23:14 +0100)]
kernel/iwn: Comment out IWN_DEBUG in the Makefile.

5 years agokernel/wlan: Re-fix printf issues in debug messages.
Sascha Wildner [Tue, 3 Feb 2015 22:11:25 +0000 (23:11 +0100)]
kernel/wlan: Re-fix printf issues in debug messages.

5 years agokernel/ath: Disallow overriding ATH_RXBUF and ATH_TXBUF.
Sascha Wildner [Tue, 3 Feb 2015 22:20:55 +0000 (23:20 +0100)]
kernel/ath: Disallow overriding ATH_RXBUF and ATH_TXBUF.

They are now forced to 512.

5 years agokernel/ath: Fix building with AH_DEBUG.
Sascha Wildner [Tue, 3 Feb 2015 21:56:02 +0000 (22:56 +0100)]
kernel/ath: Fix building with AH_DEBUG.

5 years agoiwn/wpi: Fix building firmwares into the kernel.
Sascha Wildner [Tue, 3 Feb 2015 21:29:04 +0000 (22:29 +0100)]
iwn/wpi: Fix building firmwares into the kernel.

5 years agokernel/iwn - Fix MAC address printing in verbose mode
Johannes Hofmann [Fri, 30 Jan 2015 19:30:11 +0000 (20:30 +0100)]
kernel/iwn - Fix MAC address printing in verbose mode

* Fix MAC address printing in verbose mode after report
  from FreeBSD

5 years agokernel/wpi - Add back ASSERT_ALTQ_SQ_DEFAULT
Johannes Hofmann [Thu, 29 Jan 2015 22:27:18 +0000 (23:27 +0100)]
kernel/wpi - Add back ASSERT_ALTQ_SQ_DEFAULT

* Add back ASSERT_ALTQ_SQ_DEFAULT to wpi_start()

5 years agokernel/wpi - Use IFNET_STAT_INC macros
Johannes Hofmann [Thu, 29 Jan 2015 22:19:25 +0000 (23:19 +0100)]
kernel/wpi - Use IFNET_STAT_INC macros

* Switch back to use IFNET_STAT_INC macros

5 years agokernel/wpi - Update wpi firmware to iwlwifi-3945-15.32.2.9
Johannes Hofmann [Thu, 29 Jan 2015 22:00:32 +0000 (23:00 +0100)]
kernel/wpi - Update wpi firmware to iwlwifi-3945-15.32.2.9

* Update wpi firmware to iwlwifi-3945-15.32.2.9

Taken-from: FreeBSD

5 years agokernel/wpi - Report wpi from FreeBSD
Johannes Hofmann [Thu, 29 Jan 2015 21:55:08 +0000 (22:55 +0100)]
kernel/wpi - Report wpi from FreeBSD

* Report wpi from FreeBSD as of FreeBSD git revision d692929f2

5 years agowlan - update README.DRAGONFLY for driver porting
Matthew Dillon [Tue, 20 Jan 2015 23:51:44 +0000 (15:51 -0800)]
wlan - update README.DRAGONFLY for driver porting

* Update README.DRAGONFLY to describe in detail how to port
  low level wifi drivers.

5 years agokernel/ath - export athdev_printf()
Matthew Dillon [Tue, 20 Jan 2015 22:22:30 +0000 (14:22 -0800)]
kernel/ath - export athdev_printf()

* Fix the export of athdev_printf() so it is unconditional.

5 years agowlan - export ieee80211_add_ssid()
Matthew Dillon [Tue, 20 Jan 2015 22:21:04 +0000 (14:21 -0800)]
wlan - export ieee80211_add_ssid()

* Export ieee80211_add_ssid() so iwn can use it.

5 years agokernel/iwn - Report iwn from FreeBSD
Matthew Dillon [Tue, 20 Jan 2015 22:20:09 +0000 (14:20 -0800)]
kernel/iwn - Report iwn from FreeBSD

* Report iwn from FreeBSD

5 years agokernel/ath - Synchronize with FreeBSD
Matthew Dillon [Tue, 20 Jan 2015 16:51:00 +0000 (08:51 -0800)]
kernel/ath - Synchronize with FreeBSD

* Synchronize ath with FreeBSD.

5 years agowlan - Finish ieee80211_realign()
Matthew Dillon [Sun, 11 Jan 2015 20:12:07 +0000 (12:12 -0800)]
wlan - Finish ieee80211_realign()

* Finish implementing ieee80211_realign() which is now being called
  in more paths, particularly IWN.

* Fixes IWN.

5 years agowlan - Update wlan from Adrian / FreeBSD
Matthew Dillon [Sun, 11 Jan 2015 17:50:12 +0000 (09:50 -0800)]
wlan - Update wlan from Adrian / FreeBSD

* Update the wlan infrastructure, initially working with ath.

5 years agousb4bsd: Re-port the if_rum driver
Markus Pfeiffer [Mon, 2 Feb 2015 06:57:55 +0000 (06:57 +0000)]
usb4bsd: Re-port the if_rum driver