Sascha Wildner [Tue, 5 Apr 2016 12:34:34 +0000 (14:34 +0200)]
em.4: Mention i219 support.
Sepherosa Ziehau [Thu, 14 Jan 2016 13:53:41 +0000 (21:53 +0800)]
ig_hal/em/emx: Add I219 (Skylake) support
Obtained-from: dillon@
Tested-by: me (82574, 82573, 82571), dillon@ (I219, I217)
Sascha Wildner [Sat, 2 Apr 2016 18:03:30 +0000 (20:03 +0200)]
Sync zoneinfo database with tzdata2016c from ftp://ftp.iana.org/tz/releases
* Azerbaijan no longer observes DST. (Thanks to Steffen Thorsen.)
* Chile reverts from permanent to seasonal DST. (Thanks to Juan
Correa for the heads-up, and to Tim Parenti for corrections.)
* Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31. Europe/Volgograd changed
from +04/+05 to +03/+04 on 1988-03-27, not 1989-03-26.
(Thanks to Stepan Golosunov.)
* Several updates and URLs for historical and proposed Russian changes.
(Thanks to Stepan Golosunov, Matt Johnson, and
Alexander Krivenyshev.)
Sascha Wildner [Thu, 24 Mar 2016 20:13:37 +0000 (21:13 +0100)]
kernel/acpi_timer: Add a missing cpu_enable_intr() after the timer test.
It's not related to the acpi_timer issue two people are seeing with
20160318 currently, but wrong in any case.
Tomohiro Kusumi [Sun, 20 Mar 2016 20:46:53 +0000 (05:46 +0900)]
sys/vfs/hammer: Temporary fix for kernel panic on volume-del
This is a temporary fix for a known race issue mentioned in
http://lists.dragonflybsd.org/pipermail/kernel/2015-August/175027.html
It may be replaced with a better alternative in the future.
The next commit also needs this, otherwise it's not guaranteed
that ondisk buffers are written back to the backing storage.
(cherry picked from commit
2f1df9cece2c18f660b07748af682ac3c47cc50f)
John Marino [Thu, 24 Mar 2016 16:45:28 +0000 (17:45 +0100)]
Restore ability for master world to build Release 4.4
It broke again when all references to termcap were changed to
ncurses and termcap was removed on master.
Sascha Wildner [Tue, 22 Mar 2016 19:04:36 +0000 (20:04 +0100)]
zic(8): Remove a 'register' that crept in in the last commit.
Sascha Wildner [Tue, 22 Mar 2016 18:55:49 +0000 (19:55 +0100)]
zic(8)/zdump(8): Don't warn about abbreviations like '-05'.
These seem to conform (when quoted) to POSIX.1-2001.
The most recent zoneinfo data upgrade experimentally uses such
abbreviations for the new zones it introduces.
Reported-by: zrj
John Marino [Tue, 22 Mar 2016 15:57:15 +0000 (16:57 +0100)]
Add unzip(1). If you can't beat 'em, join 'em
The unzip utility isn't particularly necessary (the version of unzip in
ports is better), but the ports tree does leverage it extensively. I've
been patching around all the resulting failures, but it's easier just to
import unzip(1) from FreeBSD and remove the ports tree modifications.
This tool has also been available in NetBSD since version 6.0, so maybe
bringing it into DragonFly will establish it as a standard BSD utility.
Sascha Wildner [Tue, 22 Mar 2016 11:08:00 +0000 (12:08 +0100)]
Sync zoneinfo database with tzdata2016b from ftp://ftp.iana.org/tz/releases
* New zones Europe/Astrakhan, Europe/Ulyanovsk for the Russian Oblasts
(their post-1970 histories differ), and Asia/Barnaul for Altai Krai
and Altai Republic, Russia. Also, Asia/Sakhalin moves from +10 to
+11 on March 27, 2016. (Thanks to Alexander Krivenyshev for the
heads-up, and to Matt Johnson and Stepan Golosunov for followup.)
* Haiti will not observe DST in 2016. (Thanks to Jean Antoine via
Steffen Thorsen.)
* Palestine's spring-forward transition on March 26, 2016 is at 01:00,
not 00:00. (Thanks to Hannah Kreitem.)
* Europe/Chisinau observed DST during 1990, and switched from +04 to
+03 at 1990-05-06 02:00, instead of switching from +03 to +02.
(Thanks to Stepan Golosunov.)
* 1991 abbreviations in Europe/Samara should be SAMT/SAMST, not
KUYT/KUYST. (Thanks to Stepan Golosunov.)
* Comments in zone tables have been improved.
(Thanks to J William Piggott.)
* In the Theory file, the description of possible time zone
abbreviations in tzdata has been cleaned up, as the old
description was unclear and inconsistent. (Thanks to Alain Mouette
for reporting the problem.)
Tomohiro Kusumi [Sat, 5 Mar 2016 05:44:21 +0000 (14:44 +0900)]
sbin/hammer: Add obfuscate option to hammer show
Add an option not to print directory entry name so that users
can send hammer show output to someone else if necessary
without making public their name. Most users never use hammer
show, but some users do and see errors in it.
By default hammer show printfs directory entry name like
dir-entry ino=
00000001007a933b lo=
00000000 name="hammer.c"
but by using this option it would be like
dir-entry ino=
00000001007a933b lo=
00000000
Note that hammer show command is a subcommand of /sbin/hammer,
so this option is not a part of getopt(3) options. It needs
to be used as follows if one does not need to filter btree.
# hammer -f /dev/da1:/dev/da2:/dev/da3 show none none obfuscate
Also note that this option is not written in hammer(8) manpage
just like filter/nofilter option is not written.
(cherry picked from commit
337ec5f8a0e7641024a16c9b647ca804d753334f)
Tomohiro Kusumi [Fri, 4 Mar 2016 16:08:46 +0000 (01:08 +0900)]
sbin/hammer: Don't access beyond 16KB of HAMMER userspace buffer
HAMMER userspace only supports upto 16KB buffer size while HAMMER
filesystem itself supports both 16KB and 64KB. This means even if
a leaf node elm says the record data is >16KB, HAMMER userspace can
only retrieve the first 16KB of the record data. Anything beyond
16KB is not supported (not malloc'd in userspace).
print_record() in hammer show is passing a pointer to maximum 16KB
buffer to hexdump(3), but is also passing data_len which is taken
from elm->leaf.data_len. This becomes an issue when the file size
is >1MB where HAMMER starts to use 64KB buffer for data beyond 1MB.
elm->leaf.data_len will typically say the length is 64KB, but
the maximum HAMMER userspace can handle is still 16KB regardless
of what the leaf node elm says. hammer show needs to omit anything
beyond 16KB (for now).
# hammer -vvvv -f /dev/da1:/dev/da2:/dev/da3 show > /dev/null
zsh: segmentation fault (core dumped) hammer -vvvv -f /dev/da1:/dev/da2:/dev/da3 show > /dev/null
(cherry picked from commit
7d0dab482a8621fa2fcb8ae0d5f27e62aed4c9f4)
Tomohiro Kusumi [Sun, 20 Mar 2016 09:09:28 +0000 (18:09 +0900)]
sys/vfs/hammer: Fix bug on erasing volume header
deabdbfb in 2015 had a bug in hammer volume-del ioctl which didn't
completely erase the volume header. hammer_ioc_volume_del() needed
to declare an ondisk volume variable instead of a pointer.
Having a pointer here caused bzero against the pointer itself
(within kernel stack of hammer volume-del), and then clear ondisk
volume header using kernel stack image.
The following [A] shows the volume deleted by hammer volume-del
has kernel stack itself for sizeof(struct hammer_volume_ondisk) bytes
which is 1928 bytes. It should be like [B] where 0-1928 bytes are
zero filled. [A] actually happens to erase the filesystem signature
(HAMMER_FSBUF_VOLUME) located at the first 8 bytes of the header
since it equals pointer size in x86_64, but it needs to properly
zero clear the whole header (1928 bytes) for security reason.
[A] Before this commit
# newfs_hammer -L TEST /dev/da2 > /dev/null
# mount_hammer /dev/da2 /HAMMER
# hammer volume-add /dev/da3 /HAMMER
# hammer volume-del /dev/da3 /HAMMER
# od -tx1 -N 1928 /dev/da3
0000000 00 00 00 00 00 00 00 00 40 4d 31 23 e1 ff ff ff
0000020 00 00 00 00 00 00 00 00 00 44 2a 52 e0 ff ff ff
0000040 40 4d 31 23 e1 ff ff ff 18 68 30 c4 00 00 00 00
0000060 30 66 29 1a e1 ff ff ff 18 b6 5b 22 e1 ff ff ff
...
[B] This commit
# newfs_hammer -L TEST /dev/da2 > /dev/null
# mount_hammer /dev/da2 /HAMMER
# hammer volume-add /dev/da3 /HAMMER
# hammer volume-del /dev/da3 /HAMMER
# od -tx1 -N 1928 /dev/da3
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0003600
[C] sizeof ondisk volume header
# cat ./sizeof.c
#include <stdio.h>
#include <vfs/hammer/hammer_disk.h>
int main(void) {
printf("%d\n", (int)sizeof(struct hammer_volume_ondisk));
return 0;
}
# gcc -Wall -g ./sizeof.c
# ./a.out
1928
(cherry picked from commit
bcc535d1f1de62c4c603593151aba54361a6a77c)
Imre Vadász [Thu, 17 Mar 2016 20:25:56 +0000 (21:25 +0100)]
mmcsd(4): Fix typo in disk_create() args. Allows accessing >1 SD-/MMC-card.
* sc->unit was always 0, so only mmcsd0 was accessible.
Sascha Wildner [Wed, 2 Mar 2016 09:33:30 +0000 (10:33 +0100)]
Local adjustments for OpenSSL 1.0.1s.
Sascha Wildner [Wed, 2 Mar 2016 13:13:14 +0000 (14:13 +0100)]
Merge branch 'vendor/OPENSSL' into rel4_4
Sascha Wildner [Wed, 2 Mar 2016 09:31:53 +0000 (10:31 +0100)]
Import OpenSSL 1.0.1s.
* Fix CVE-2016-0800, CVE-2016-0705, CVE-2016-0798, CVE-2016-0797,
CVE-2016-0799, CVE-2016-0702
* Disable weak ciphers in SSLv3 and up in default builds of OpenSSL.
For a more detailed list of changes, see crypto/openssl/CHANGES.
Matthew Dillon [Thu, 18 Feb 2016 22:08:04 +0000 (14:08 -0800)]
kernel - Add kqueue support to NFS (fix firefox issues w/nfs)
* Firefox appears to get semi-random memory corruption and otherwise
implodes if one or more filesystems it accesses does not support
kqueue. This appears to be due to some interaction between
firefox, glib, and the kernel when kqueue support is missing
from a filesystem.
* Add host-local kqueue support to NFS. As with locks, the support
is host-local only and will not work across multiple clients
sharing the same files.
* Appears to stabilize firefox when file(s) it accesses are on
NFS.
Matthew Dillon [Wed, 17 Feb 2016 23:27:29 +0000 (15:27 -0800)]
etc/rc.d - diskless adjustments
* Try to 'mount -u /' before testing for a R/W /var and /tmp. This fixes
an issue where diskless would always create a MFS /var and MFS /tmp even
when the NFS root is nominally writable.
* Test for a R/W /var and /tmp with a echo | dd command instead of mkdir,
which should work nicely even with multiple clients booting at the same
time.
Matthew Dillon [Wed, 17 Feb 2016 21:55:49 +0000 (13:55 -0800)]
buildworld - Allow -release to be built on master
* Bring in elements of the bootstrapping library detection from master,
allowing -release to be built on master.
Sepherosa Ziehau [Fri, 12 Feb 2016 10:54:52 +0000 (18:54 +0800)]
ifconfig: Fix inet6 address deletion
Submitted-by: ygrossel
Dragonfly-bug: http://bugs.dragonflybsd.org/issues/2888
Matthew Dillon [Thu, 7 Jan 2016 18:13:07 +0000 (10:13 -0800)]
hammer - remove debugging kprintf
* Remove a debugging kprintf related to mkdir() errors which can trigger
under nominal conditions (attempting to create a subdirectory in a parent
which had already been rmdir'd)
(cherry picked from commit
1b848b40a679e17721069e9c5bb8aae01ff664a3)
Markus Pfeiffer [Sat, 6 Feb 2016 12:17:16 +0000 (12:17 +0000)]
etc/rc.d: Update rtsold
* Remove precmd, it did not work because autocmd does not exist
* Add postcmd, taken from FreeBSD head
Sascha Wildner [Mon, 1 Feb 2016 21:13:23 +0000 (22:13 +0100)]
make upgrade: Add an obsolete time zone.
Sascha Wildner [Sat, 30 Jan 2016 10:49:54 +0000 (11:49 +0100)]
Sync zoneinfo database with tzdata2016a from ftp://ftp.iana.org/tz/releases
* America/Cayman will not observe daylight saving this year after all.
Revert our guess that it would. (Thanks to Matt Johnson.)
* Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00.
(Thanks to Alexander Krivenyshev.)
* Asia/Tehran now has DST predictions for the year 2038 and later,
to be March 21 00:00 to September 21 00:00. This is likely better
than predicting no DST, albeit off by a day every now and then.
* America/Metlakatla switched from PST all year to AKST/AKDT on
2015-11-01 at 02:00. (Thanks to Steffen Thorsen.)
* America/Santa_Isabel has been removed, and replaced with a
backward compatibility link to America/Tijuana. Its contents were
apparently based on a misreading of Mexican legislation.
* Asia/Karachi's two transition times in 2002 were off by a minute.
(Thanks to Matt Johnson.)
* The Theory and asia files now mention the 2015 book "The Global
Transformation of Time, 1870-1950", and cite a couple of reviews.
* The America/Chicago entry now documents the informal use of US
central time in Fort Pierre, South Dakota. (Thanks to Rick
McDermid, Matt Johnson, and Steve Jones.)
Sascha Wildner [Fri, 29 Jan 2016 11:51:54 +0000 (12:51 +0100)]
gcc50/libconv_supc: cp-demangle.c needs HAVE_CONFIG_H.
This fixes 22 warnings about incompatible implicit declarations of
various functions.
Imre Vadasz [Sun, 24 Jan 2016 12:52:30 +0000 (13:52 +0100)]
drm/radeon: We need the physical address of the dummy page, not the virtual
* rdev->dummy_page.addr is supposed to hold the physical address of the
dummy page, not the virtual address.
Sascha Wildner [Thu, 28 Jan 2016 22:26:19 +0000 (23:26 +0100)]
Local adjustments for OpenSSL 1.0.1r.
Sascha Wildner [Thu, 28 Jan 2016 22:29:41 +0000 (23:29 +0100)]
Merge remote-tracking branch 'crater/vendor/OPENSSL' into rel4_4
Sascha Wildner [Thu, 28 Jan 2016 21:33:36 +0000 (22:33 +0100)]
Import OpenSSL 1.0.1r.
* Protection for DH small subgroup attacks
* Fix CVE-2015-3197 (SSLv2 doesn't block disabled ciphers)
* Reject DH handshakes with parameters shorter than 1024 bits
Matthew Dillon [Mon, 25 Jan 2016 02:33:33 +0000 (18:33 -0800)]
kernel - Add quirks for xhci (usb)
* Add quirks to force 32-bit dma for two chips, one taken
from FreeBSD, the other from testing an AMD A10-7300
which reports a 64-bit dma capability but fails when
32-bit dma is used.
Reported-by: Xenu <1000@carychium-tridentatum.xenu.pl> (irc)
Imre Vadász [Mon, 18 Jan 2016 20:15:28 +0000 (21:15 +0100)]
if_iwm: Fix up the rate control setup code.
- Initialise rates in the order we want to use them.
- The rate table was being initialised in low->high, but the link quality
table was being initialised high->low. So, when we did a lookup, we
would get the indexes wrong.
Taken-From: FreeBSD (SVN r294248)
Imre Vadász [Sun, 3 Jan 2016 16:10:52 +0000 (17:10 +0100)]
if_iwm: Fix IEEE80211_ADDR_COPY() usage.
Taken-From: FreeBSD
Imre Vadász [Fri, 1 Jan 2016 21:26:02 +0000 (22:26 +0100)]
if_iwm: Remove comments referring to Linux iwlwifi source filenames.
Taken-From: OpenBSD
Imre Vadász [Thu, 31 Dec 2015 22:13:12 +0000 (23:13 +0100)]
if_iwm: Just store the struct firmware pointer, like if_iwn does.
if_iwm was passing the firmware data pointer to firmware_put(9), instead
of the struct firmware pointer that was returned by firmware_get(9).
Imre Vadász [Wed, 30 Dec 2015 16:01:11 +0000 (17:01 +0100)]
if_iwm: Apply some changes from OpenBSD, if_iwm.c rev 1.39 -> 1.42
- Use m_defrag(9) instead of rolling our own version of it.
- Limit the number of dma segments used for tx to IWM_MAX_SCATTER - 2.
This avoids out-of-bound accesses on the segs array in iwm_tx().
- cleanup attach message
Taken-From: OpenBSD
Sascha Wildner [Fri, 15 Jan 2016 17:31:22 +0000 (18:31 +0100)]
kernel: Fix the kern.dumpdev sysctl.
The 'dumpdev' global wasn't properly set anymore since
b24cd69c3515fb.
Some ports use this sysctl.
Reported-by: zrj
Matthew Dillon [Thu, 14 Jan 2016 17:06:23 +0000 (09:06 -0800)]
ssh - Remove undocumented roaming support CVE-2016-0777 CVE-2016-0778
* Remove client-side 'roaming' feature as per openbsd patch.
* CVE-2016-0777 CVE-2016-0778. A malicious server can trick the client
into potentially leaking key material.
Sascha Wildner [Sun, 10 Jan 2016 03:18:30 +0000 (04:18 +0100)]
ee(1): Fix an uninitialized variable.
Since ee(1) was switched from mktemp() to mkstemp(), the file name is
no longer initialized. Initialize it to NULL at least. The message in
case of an error will still be confusing, but for now, live with it.
Sascha Wildner [Sun, 10 Jan 2016 02:41:35 +0000 (03:41 +0100)]
w(1): inet_addr() returns INADDR_NONE upon failure.
Sascha Wildner [Tue, 29 Dec 2015 19:27:09 +0000 (20:27 +0100)]
libc/nls: Sync str{error,signal}() messages with <sys/{errno,signal}.h>.
Reported-by: zrj <rimvydas.jasinskas@gmail.com>
Sascha Wildner [Mon, 28 Dec 2015 13:41:16 +0000 (14:41 +0100)]
kernel/vga: Remove wrong lwkt_reltoken(). It's not taken at this point.
Matthew Dillon [Mon, 28 Dec 2015 01:01:29 +0000 (17:01 -0800)]
devfs - Fix panic on extra devfs mounts when rules are present
* Fix issue where the rules-check was being made on the root mount
node itself.
* devfs would panic on extra devfs mounts (such as in jails) when
/etc/defaults/devfs.conf contains any rules.
Reported-by: marino
Matthew Dillon [Sat, 19 Dec 2015 21:05:55 +0000 (13:05 -0800)]
kernel - Reduce lwp_signotify() latency
* lwp_signotify() was not issuing an IPI to another cpu if the target
thread was in a run state, preventing that thread from seeing the
signal for roughly one scheduler tick.
* This interferes with programs like qemu which depend on signaling
between threads for the timer tick and numerous other things,
causing timers to behave poorly.
* Fix by issuing the necessary IPI.
Reported-by: Imre Vadasz
Testing-by: Imre Vadasz (+ a bug fix to the original patch)
Matthew Dillon [Wed, 16 Dec 2015 01:17:44 +0000 (17:17 -0800)]
i915 - Add delay after attach to avoid console/X races
* Add a delay in the i915 attach to give the kms_console time to
initialize before X starts to muck around with the gpu.
* Appears to avoid deadlock-on-startup problems when X itself loads
the i915 driver (verses it being preloaed).
Imre Vadasz [Sun, 13 Dec 2015 00:24:23 +0000 (01:24 +0100)]
virtio_blk: Use contigmalloc/contigfree for vtblk_request allocations.
This should fix the "panic: header spanned multiple segments: 2" panic
occuring for some users when running in qemu.
Reported-By: Jim B.
Sascha Wildner [Thu, 10 Dec 2015 20:40:41 +0000 (21:40 +0100)]
libc/stdtime: Fix two cases where a NULL pointer could have been free()'d.
Also, make the rest of error returns more consistent.
Sepherosa Ziehau [Mon, 7 Dec 2015 09:44:28 +0000 (17:44 +0800)]
igb: Fix DMACR settings
Noticed-by: swildner@
Sascha Wildner [Fri, 4 Dec 2015 20:46:40 +0000 (21:46 +0100)]
Local adjustments for OpenSSL-1.0.1q.
Sascha Wildner [Fri, 4 Dec 2015 22:09:47 +0000 (23:09 +0100)]
Merge branch 'vendor/OPENSSL' into rel4_4
Sascha Wildner [Fri, 4 Dec 2015 20:45:11 +0000 (21:45 +0100)]
Import OpenSSL 1.0.1q.
* Certificate verify crash with missing PSS parameter (CVE-2015-3194)
* X509_ATTRIBUTE memory leak (CVE-2015-3195)
* Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs
* In DSA_generate_parameters_ex, if the provided seed is too short,
return an error
Sascha Wildner [Wed, 2 Dec 2015 16:59:42 +0000 (17:59 +0100)]
backtrace.3: Fix prototype of backtrace_symbols_fd_fmt().
Matthew Dillon [Tue, 1 Dec 2015 19:00:11 +0000 (11:00 -0800)]
bmake - Disable use of PWD env
* bmake tries to use the logical directory path via the PWD environment
variable, and its various exceptions for dealing with OBJDIR fall short.
This creates mass confusion for buildworld if the source tree is built
via a logical directory path which goes through a symlink.
* With this change, bmake now only uses the real directory path.
Taken-from: FreeBSD
Sepherosa Ziehau [Mon, 30 Nov 2015 07:48:41 +0000 (15:48 +0800)]
kevent: Fix a typo
John Marino [Sat, 28 Nov 2015 01:39:15 +0000 (02:39 +0100)]
make(1): Create two more custom variables to speed up dports
I've added two new static values to bmake:
.MAKE.DF.OSREL
This will currently return "4.5"
.MAKE.DF.VERSION
This will currently return "400500". It matches what was in place on
/usr/src/sys/sys/param.h during the last buildworld.
Every dport runs piped shell commands to get these values. After iterating
through the entire ports tree several times, I noticed a large presence
of awk in process list. After modifying bmake and then modifying dports
locally, the iteration runs 15% faster. There are other optimizations
that can be done, but that's out of scope of this commit.
Sascha Wildner [Tue, 24 Nov 2015 20:05:32 +0000 (21:05 +0100)]
lwp_setname.2: Add missing .El
Sascha Wildner [Tue, 24 Nov 2015 14:38:30 +0000 (15:38 +0100)]
make upgrade: Fix typo (dsched_fw -> dsched_fq).
Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
Sascha Wildner [Tue, 24 Nov 2015 10:06:26 +0000 (11:06 +0100)]
<string.h>: Fix vkernel build.
Robin Hahling [Mon, 23 Nov 2015 17:38:45 +0000 (18:38 +0100)]
nrelease: fix dragonfly digest http link
Sascha Wildner [Mon, 23 Nov 2015 16:22:07 +0000 (17:22 +0100)]
installer: Bump /boot size to 1G and various other small improvements.
* /boot size is bumped to 1G (same for root in UFS installs).
* Don't allow HAMMER installs to disks <10G. Warn between 10G and 50G.
* For UFS installs to disks that are <=8G, recommend only root and swap.
Sascha Wildner [Sun, 22 Nov 2015 07:56:31 +0000 (08:56 +0100)]
installer: Bump minimum disk size to 4GB.
Justin C. Sherrill [Mon, 23 Nov 2015 04:36:11 +0000 (23:36 -0500)]
Writing in version 4.4.
John Marino [Sun, 22 Nov 2015 19:45:10 +0000 (20:45 +0100)]
ls(1): New long format for named locales
The use of the basic version of ISO 8601 was not very popular. After
a discussion on IRC, the Long Format of named locales is the following:
DD-MMM-YYYY hh:mm
DD is day number with leading zeros
MMM is abbreviated month *in english* (regardless of locale)
YYYY is 4-digit year
hh is 24-hour with leading zeros
ss is seconds with leading zeros
Sascha Wildner [Sun, 22 Nov 2015 18:08:49 +0000 (19:08 +0100)]
kernel/ncr: s/long signed/long/
Sascha Wildner [Sun, 22 Nov 2015 17:19:19 +0000 (18:19 +0100)]
kernel/libkern: Add strnlen() (from FreeBSD) and use it.
Tomohiro Kusumi [Sun, 22 Nov 2015 13:41:21 +0000 (22:41 +0900)]
sys/vfs/hammer: Remove unused struct hammer_volume members
Remove unused members of inmemory volume structure.
These are mostly from early stage of hammer development.
These are copies of ondisk volume structure fields.
Inmemory volume obviously isn't an exact copy of ondisk volume,
so these aren't necessary unless actually used.
John Marino [Sun, 22 Nov 2015 13:33:44 +0000 (14:33 +0100)]
compilers.conf: modify default DPORT_CLANG_STD_INCOPTXX
I am not entirely sure INCOPTXX even needs to be set for clang, but
let's change DPORT_CLANG_STD_INCOPTXX from:
-isystem /usr/include/c++/5.0
to:
-cxx-isystem /usr/include/c++/5.0
The inclusion only applies to c++, so let's specify that. This only
applies to clang from dports and it can be overridden.
John Marino [Sun, 22 Nov 2015 12:43:37 +0000 (13:43 +0100)]
Record today's local GCC modifications on README.DRAGONFLY
Sascha Wildner [Sun, 22 Nov 2015 07:39:46 +0000 (08:39 +0100)]
i386 removal, part 45/x: Remove various bits and pieces related to i386.
Sascha Wildner [Sun, 22 Nov 2015 06:53:16 +0000 (07:53 +0100)]
df: Remove old UFS superblock reading code.
This is from times when there was only UFS and it does not play well
with some other filesystem types like devfs.
Reported-by: Michael Iline <michael.iline@yahoo.com>
Sascha Wildner [Sun, 22 Nov 2015 04:37:17 +0000 (05:37 +0100)]
kernel/syscons: Change definitions of dev_ops functions to static.
To match their declarations.
Sascha Wildner [Sun, 22 Nov 2015 04:13:42 +0000 (05:13 +0100)]
gcc/libssp: Include <stdlib.h> so that alloca() is defined.
It had started warning about this after the <malloc.h> removal.
Tomohiro Kusumi [Sat, 21 Nov 2015 15:46:40 +0000 (00:46 +0900)]
sys/vfs/hammer: Cleanup forward declaration of struct
Sascha Wildner [Sat, 21 Nov 2015 12:31:32 +0000 (13:31 +0100)]
acpi.4: Move hw.acpi.{install,remove}_interface to LOADER TUNABLES.
Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
Imre Vadasz [Sat, 21 Nov 2015 10:18:11 +0000 (11:18 +0100)]
drm/radeon: Use pci_resource_start and pci_resource_len functions.
Replace calls to drm_get_resource_start and drm_get_resource_len
by pci_resource_start and pci_resource_len respectively.
Imre Vadasz [Sat, 21 Nov 2015 09:11:47 +0000 (10:11 +0100)]
drm/ttm: Use pr_err and pr_info for logging.
Tomohiro Kusumi [Fri, 20 Nov 2015 18:05:41 +0000 (03:05 +0900)]
sys/vfs/hammer: Remove unused struct hammer_mount members
count_newrecords is still being used by hammer_mem_add(),
but this should have been removed by
32fcc103 when it got
rid of the code logic that contains count_newrecords.
unused01 used to be io_running_wakeup until
3038a8ca, but
hammer_mount doesn't need dummy bytes here.
Other two are simply no longer used.
John Marino [Fri, 20 Nov 2015 16:01:57 +0000 (17:01 +0100)]
ls(1): Take II on fixing future time listings
Really make sure all future timestamps are display with a year.
The logic of the first attempt was incorrect, and it did the opposite.
John Marino [Fri, 20 Nov 2015 15:32:52 +0000 (16:32 +0100)]
ls(1): Return previous long format for C/POSIX locales
The output of ls -l for POSIX locales is covered by the POSIX standard.
The previous implementation was not compliance with the handling of
future timestamps. The standard requires that future timestamps always
show the year where as previously it would only show the year if the
file's modification time was less than 6 months into the future.
This change detects if C/POSIX LC_TIME is specified, and if so, it
implements the long format as specified by the POSIX standard. The
ISO 8601 format is still used for named locales.
Reported by: swildner
Tomohiro Kusumi [Thu, 19 Nov 2015 17:32:45 +0000 (02:32 +0900)]
sys/vfs/hammer: Fix comments
/* (not including atime/mtime) */
was supposed to be for HAMMER_INODE_DDIRTY according to
ddfdf542.
Tomohiro Kusumi [Thu, 19 Nov 2015 16:58:31 +0000 (01:58 +0900)]
sys/vfs/hammer: Remove HAMMER_RECTYPE_UNUSED02/03 macros
These macros aren't used.
Also macros from 0x4 to 0xF do not exist, then it's natural
not to have UNUSED macros for 0x2 and 0x3.
John Marino [Fri, 20 Nov 2015 12:49:26 +0000 (13:49 +0100)]
ls(1): Alter time portion of "long format"
One side effect of moving to the CLDR standard for locale definitions
is that abreviated months are no longer guaranteed to align. We altered
the definitions for CJK to ensure this, but we do not want to manually
adjust every locale.
The most obvious manifestation is seen with ls(1) using the long format
(-l option). Not only is the month abbreviation no longer guaranteed to
be 3 characters wide, it's not even guaranteed to be a uniform width. As
a result, the file listing may no longer line up, as seen with French:
ironwolf# env LANG=fr_FR.UTF-8 ls -l | head
drwxr-xr-x 2 root wheel 512 26 mars 2015 ariadne
drwxr-xr-x 2 root wheel 512 26 mars 2015 artemis
drwxr-xr-x 3 root wheel 512 9 sept. 19:45 avida
drwxr-xr-x 3 root wheel 512 9 sept. 19:45 babel
drwxr-xr-x 3 root wheel 512 15 juin 20:38 bcftools
drwxr-xr-x 2 root wheel 512 20 sept. 11:27 biococoa
drwxr-xr-x 2 root wheel 512 26 mars 2015 biojava
drwxr-xr-x 3 root wheel 512 26 mars 2015 blat
drwxr-xr-x 3 root wheel 512 7 nov. 08:44 bwa
ironwolf# env LANG=fr_FR.UTF-8 ls -lT | head
drwxr-xr-x 2 root wheel 512 26 mars 10:15:28 2015 ariadne
drwxr-xr-x 2 root wheel 512 26 mars 10:15:28 2015 artemis
drwxr-xr-x 3 root wheel 512 9 sept. 19:45:04 2015 avida
drwxr-xr-x 3 root wheel 512 9 sept. 19:45:04 2015 babel
drwxr-xr-x 3 root wheel 512 15 juin 20:38:55 2015 bcftools
drwxr-xr-x 2 root wheel 512 20 sept. 11:27:40 2015 biococoa
drwxr-xr-x 2 root wheel 512 26 mars 10:15:28 2015 biojava
drwxr-xr-x 3 root wheel 512 26 mars 10:15:28 2015 blat
drwxr-xr-x 3 root wheel 512 7 nov. 08:44:24 2015 bwa
To address both issues (misalignment and differing widths as a function
of locale), I've modified ls(1) to use valid forms of ISO 8601, an
international standard for the representation of time.
The default long format produces the last modified timestamp in the form
of YYYYMMDDTHH (Year|Month|Day|T|Hour with no spaces). This is known as
the "basic" format which includes the optional "T" concatenator. The
result is the time is represented by a single column using 1-3 characters
less than before.
ironwolf# env LANG=fr_FR.UTF-8 ls -l | head
drwxr-xr-x 2 root wheel 512 20150326T10 ariadne
drwxr-xr-x 2 root wheel 512 20150326T10 artemis
drwxr-xr-x 3 root wheel 512 20150909T19 avida
drwxr-xr-x 3 root wheel 512 20150909T19 babel
drwxr-xr-x 3 root wheel 512 20150615T20 bcftools
drwxr-xr-x 2 root wheel 512 20150920T11 biococoa
drwxr-xr-x 2 root wheel 512 20150326T10 biojava
drwxr-xr-x 3 root wheel 512 20150326T10 blat
drwxr-xr-x 3 root wheel 512 20151107T08 bwa
The -T option uses the extended format of ISO 8601 without the T symbol,
but with the minutes and seconds representation. The result is two
characters wider than the approach FreeBSD is taking to address the same
issue (FreeBSD is padding the month section and expanding the field by
two characters to accommodate 5-character wide month names). The output
on DragonFly looks like this:
ironwolf# env LANG=fr_FR.UTF-8 ls -lT | head
drwxr-xr-x 2 root wheel 512 2015-03-26 10:15:28 ariadne
drwxr-xr-x 2 root wheel 512 2015-03-26 10:15:28 artemis
drwxr-xr-x 3 root wheel 512 2015-09-09 19:45:04 avida
drwxr-xr-x 3 root wheel 512 2015-09-09 19:45:04 babel
drwxr-xr-x 3 root wheel 512 2015-06-15 20:38:55 bcftools
drwxr-xr-x 2 root wheel 512 2015-09-20 11:27:40 biococoa
drwxr-xr-x 2 root wheel 512 2015-03-26 10:15:28 biojava
drwxr-xr-x 3 root wheel 512 2015-03-26 10:15:28 blat
drwxr-xr-x 3 root wheel 512 2015-11-07 08:44:24 bwa
The long format no longer changes if the last modified time is within six
months (future or past), thus file times are more quickly comparable with
a quick visual scan versus switching between year and hours:seconds.
Reported by: bapt@FreeBSD.org
Sepherosa Ziehau [Fri, 20 Nov 2015 07:34:52 +0000 (15:34 +0800)]
ig: Factor out functions for flow control
Sepherosa Ziehau [Fri, 20 Nov 2015 06:40:27 +0000 (14:40 +0800)]
igb: Support flow control change and default to RX pause
Sepherosa Ziehau [Fri, 20 Nov 2015 06:03:54 +0000 (14:03 +0800)]
em: Support flow control change and default to RX pause
Sepherosa Ziehau [Fri, 20 Nov 2015 03:41:24 +0000 (11:41 +0800)]
emx: Add per-device flow control tunable support
Sepherosa Ziehau [Fri, 20 Nov 2015 03:23:55 +0000 (11:23 +0800)]
device: Add device_getenv_string()
Sepherosa Ziehau [Fri, 20 Nov 2015 03:13:14 +0000 (11:13 +0800)]
device: Prefer dev.driver.unit.knob for per-device tunables.
This is consistent w/ the sysctl tree structure.
Sepherosa Ziehau [Fri, 20 Nov 2015 02:57:09 +0000 (10:57 +0800)]
emx: Support flow control change and default to RX pause
Tested-by: dillon@
Sepherosa Ziehau [Fri, 20 Nov 2015 02:12:57 +0000 (10:12 +0800)]
kern/lwp: Check lwp_lock before remove lwp from process lwp tree
This makes sure that lwp tree iteration with blocking operation
will not be broken.
While I'm here, add assertion lwp_lock == 0 in lwp_dispose()
Imre Vadász [Thu, 19 Nov 2015 23:10:00 +0000 (00:10 +0100)]
radeonkms.4: Document drm.radeon.backlight tunable.
After the update of radeonkms(4) to Linux 3.18 level, I have to set
drm.radeon.backlight=1 in my loader.conf to get backlight control
via hw.backlight_level on my HP6715s notebook with an RS690 IGP.
Imre Vadasz [Thu, 19 Nov 2015 20:51:31 +0000 (21:51 +0100)]
drm: Plug memleak on module unload, in linux_workqueue.c again.
Destroy the system_power_efficient_wq on module unload, like the
other workqueues.
François Tigeot [Thu, 19 Nov 2015 16:52:36 +0000 (17:52 +0100)]
fortune: Do not recommend obsolete encodings
Tomohiro Kusumi [Sun, 15 Nov 2015 10:22:47 +0000 (19:22 +0900)]
sys/dev/disk/dm: Add dm-flakey target
This commit adds a new dm target dm-flakey.
This target simulates failing devices for testing purposes.
See dm_target_flakey(4) for details.
Note that using this dm target may results in some unstable
status including kernel panic. For example hammer is likely
to cause kernel panic by write data corruption by dm-flakey.
Don't use this target over any block device in production.
===== Example1 - Error write I/Os
# kldload dm_target_flakey
# dmsetup create flakey1 --table "0
234436482 flakey ${DEV} 0 1 1"
# newfs_hammer -L TEST /dev/mapper/flakey1
Volume 0 DEVICE /dev/mapper/flakey1 size 111.79GB
initialize freemap volume 0
initializing the undo map (504 MB)
newfs_hammer: Write volume 0 (/dev/mapper/flakey1): Input/output error
# dmsetup remove /dev/mapper/flakey1
===== Example2 - Silently drop write I/Os
# newfs_hammer -L TEST ${DEV} > /dev/null
# mount_hammer ${DEV} /HAMMER
# cd /HAMMER
# git clone /usr/local/src/dragonfly
Cloning into 'dragonfly'...
done.
Checking out files: 100% (34434/34434), done.
# cd
# umount /HAMMER
# dmsetup create flakey2 --table "0
234436482 flakey ${DEV} 0 1 1 1 drop_writes"
# mount_hammer /dev/mapper/flakey2 /HAMMER
# dmesg | tail -3
HAMMER() Critical error inode=-1 error=5 while flushing meta-data
HAMMER() Forcing read-only mode
HAMMER(TEST) mounted clean, no recovery needed
# hammer volume-list /HAMMER
/dev/mapper/flakey2
# mount | grep "/HAMMER"
TEST on /HAMMER (hammer, local, read-only)
# cd /HAMMER/dragonfly
# git log -p > /dev/null; echo $?
0
# cd
# umount /HAMMER
# dmsetup remove /dev/mapper/flakey2
===== Example3 - Corrupt read I/Os
# dd if=/dev/zero of=${DEV} bs=1024 count=10000 >/dev/null 2>&1
# dmsetup create flakey3 --table "0
234436482 flakey ${DEV} 0 1 1 5 corrupt_bio_byte 1 r 65 0"
# od -tx1 /dev/mapper/flakey3 | head -10
0000000 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0010000 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0010020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0020000 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0020020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0030000 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# dmsetup remove /dev/mapper/flakey3
# kldunload dm_target_flakey
Tomohiro Kusumi [Thu, 19 Nov 2015 12:22:22 +0000 (21:22 +0900)]
sys/dev/disk/dm: Cleanup header includes
dm.h depends on <sys/vnode.h>, so dm.h should include it
instead of having c files that depend on dm.h include it.
Tomohiro Kusumi [Wed, 18 Nov 2015 16:50:01 +0000 (01:50 +0900)]
sys/kern/vfs: Fix panic message
Show # of pushed bios.
Tomohiro Kusumi [Wed, 18 Nov 2015 12:04:47 +0000 (21:04 +0900)]
contrib/lvm2: Remove unnecessary space at the end of line
Having " %s" at the end of printf format prints unnecessary
space at the end of line when dm targets have nothing to print
for dmsetup status/table.
If dm targets don't implement status/table, use printf format
without " %s", since those targets only initialize the string
with "".
(This fix doesn't exist in upstream lvm2)
Sepherosa Ziehau [Thu, 19 Nov 2015 03:37:28 +0000 (11:37 +0800)]
pthread: Add lwp_setname(2) and implement pthread_set_name_np(3)
- Return thread name through kinfo.
- Show thread name in ps(1) for 'Hc'.
- Show thread name in top(1), if it is different from process name.
François Tigeot [Thu, 19 Nov 2015 08:03:20 +0000 (09:03 +0100)]
drm/radeon: Update to Linux 3.18
Mostly bugfixes and audio refactoring, no new functionalities.
This update has been prepared by Rimvydas Jasinskas.
Sepherosa Ziehau [Thu, 19 Nov 2015 07:45:01 +0000 (15:45 +0800)]
kinfo/proc: Set nthreads properly for kernel threads