Matthew Dillon [Sat, 28 Feb 2015 16:11:33 +0000 (08:11 -0800)]
libdmsg - Fix buffer indexing bug in crypted path
* Fix a buffering index bug in the crypted path which causes a buffer
overrun and/or implodes the connection on a protocol error.
Sascha Wildner [Sat, 28 Feb 2015 11:53:03 +0000 (12:53 +0100)]
kernel: Remove unused xwait headers.
xsleep/xwakeup were added to DragonFly in 2003 to replace asleep/awakeup
from FreeBSD 4.x. tsleep & wakeup sleep on untyped identifiers; the sleep
routines do not store through the identifiers and treat them as opaque.
xsleep/xwakeup in contrast slept on explicit sleep structures,
'struct xwait'.
xsleep / xwakeup were never used; they were born #if-0ed out and were
removed by 2004. This commit removes a legacy declaration and associated
header.
Submitted-by: vsrinivas
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2786>
Sascha Wildner [Sat, 28 Feb 2015 11:33:07 +0000 (12:33 +0100)]
kernel: Remove unused hogticks global from kern_synch.c.
hogticks was a global definition used in kern_synch.c:should_yield().
A thread that had remained running for more than hogticks would
return true for should_yield(). DragonFly has not used this global
for a long time.
Submitted-by: vsrinivas
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2787>
François Tigeot [Sat, 28 Feb 2015 08:46:22 +0000 (09:46 +0100)]
drm: Add asm/uaccess.h functions
* __copy_to_user() and __copy_from_user(), obtained from OpenBSD
* __copy_to_user_inatomic() and __copy_from_user_inatomic_nocache(),
obtained from FreeBSD
François Tigeot [Sat, 28 Feb 2015 08:05:56 +0000 (09:05 +0100)]
drm: Import drm_memory.h from Linux 3.11
François Tigeot [Sat, 28 Feb 2015 07:57:43 +0000 (08:57 +0100)]
drm: Add drm_clflush_virt_range()
Obtained-from: Linux 3.11
François Tigeot [Sat, 28 Feb 2015 07:50:44 +0000 (08:50 +0100)]
drm: linux/mm.h: Add offset_in_page()
Obtained-from: OpenBSD
Matthew Dillon [Sat, 28 Feb 2015 07:28:42 +0000 (23:28 -0800)]
xdisk - disk_setdiskinfo() must be assynchronous
* Allow CMD_BUF_READ operations without the device having to be open.
This allows disk probes to occur.
* Use disk_setdiskinfo(), which is asynchronous, to avoid an I/O deadlock
because the call is made from the rxmsg loop. If it were to issue I/O
synchronously we would deadlock and never process the reply.
Matthew Dillon [Sat, 28 Feb 2015 05:03:06 +0000 (21:03 -0800)]
libdmsg - add safeties
* Preinitialize return counters to 0 as a safety. Not required for proper
operation.
Matthew Dillon [Sat, 28 Feb 2015 05:00:36 +0000 (21:00 -0800)]
libdmsg - Fix buffer overrun
* Large messages (generally large data payloads) could overrun the FIFO
buffer. e.g. dd if=/dev/xa<blah> of=/dev/null bs=32k
* Fix by chunking up large payloads.
Imre Vadasz [Fri, 27 Feb 2015 23:51:27 +0000 (00:51 +0100)]
acpi_video(4): Fix detach panic.
* The "if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD)" test from
acpi_video_vo_init was missing in acpi_video_vo_destroy. This meant
that on some machines we ended up calling STAILQ_REMOVE with an element
not contained in the list, which causes a panic since STAILQ_REMOVE
doesn't check for the end of the list.
Markus Pfeiffer [Thu, 26 Feb 2015 15:24:45 +0000 (15:24 +0000)]
net/if_lagg: Fix double-free issue
John Marino [Fri, 27 Feb 2015 08:05:01 +0000 (09:05 +0100)]
gcc50: Update to 27 Feb 2015 snapshot (SVN 221044)
John Marino [Fri, 27 Feb 2015 10:13:33 +0000 (11:13 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 27 Feb 2015 08:01:52 +0000 (09:01 +0100)]
Update gcc-50 to SVN version 221044
Last Changed Date: 2015-02-27 09:37:51 +0100 (Fri, 27 Feb 2015)
Sepherosa Ziehau [Thu, 26 Feb 2015 12:23:56 +0000 (20:23 +0800)]
acpi/pstate: Allow user to force package level P-state domain
Some CPUs only have package P-states, but some BIOSes put each
hyperthread to its own P-state domain; allow user to override.
It is not enabled by default.
Tomohiro Kusumi [Thu, 26 Feb 2015 11:36:42 +0000 (20:36 +0900)]
sbin/newfs_hammer: Properly set ondisk localization value
- Make hammer_newfs properly set ondisk localization for the first
two elements (for root inode and PFS) of the root node.
- HAMMER does cursor lookup using sum of onmemory ip(inode) localization
and localization type, so in this case hammer_newfs needs to write
ondisk bits using (HAMMER_DEF_LOCALIZATION + type) instead of just
a type (see hammer_get_inode() and hammer_load_pseudofs() for details).
- It makes no binary difference since HAMMER_DEF_LOCALIZATION is 0,
however it should be fixed for the consistency (e.g. if the macro
happens to be defined differently, although it is not likely as it
forces ondisk layout change).
Tomohiro Kusumi [Thu, 26 Feb 2015 11:25:59 +0000 (20:25 +0900)]
sys/vfs/hammer: Fix and add comments on root inode
- hunk1 - The root inode uses HAMMER_DEF_LOCALIZATION for its
onmemory ip(inode) localization, however the purpose of this macro
is not documented anywhere. Make it clear by adding this comment.
- hunk2 - Show HAMMER_OBJID_ROOT is the root inode # for both real
root inode and PFS root inodes.
- hunk3-4 - Change "stored in the root inode" to "associated with
the root inode". PFS records are not embedded within the ondisk
inode structure, but associated with the root inode by id.
Commit
ea434b6f uses "associated with" in its commit message.
Sascha Wildner [Thu, 26 Feb 2015 12:40:51 +0000 (13:40 +0100)]
Nuke /usr/share/examples/cvsup.
Now that i386 is no longer supported we can't even run an old FreeBSD
cvsup binary anymore, so all this has become completely pointless.
FreeBSD has since switched to SVN, NetBSD's repository can be
rsync'ed, about OpenBSD I am not sure though. There are git repos
of various BSDs too.
Markus Pfeiffer [Thu, 26 Feb 2015 12:39:16 +0000 (12:39 +0000)]
netif/if_lagg: Fix panic on MOD_UNLOAD
Remove one instance of if_clone_detach being called.
Reported-By: bycn82 <bycn82@gmail.com>
Sascha Wildner [Thu, 26 Feb 2015 10:47:05 +0000 (11:47 +0100)]
devd(8): Add -Wno-unused-local-typedefs to CFLAGS for now.
The issue is that with -Wunused-local-typedefs, our GCC 5.0 warns about
unused local typedefs in its own headers, in this case stl_algo.h which
comes in via <algorithm>, which devd(8) includes.
Example:
c++ [...] -Werror -Wall [...] -c devd.cc
In file included from /usr/include/c++/5.0/bits/stl_algo.h:61:0,
from /usr/include/c++/5.0/algorithm:62,
from devd.cc:93:
/usr/include/c++/5.0/bits/stl_heap.h: In function 'void std::pop_heap(_RAIter, _RAIter)':
/usr/include/c++/5.0/bits/stl_heap.h:266:2: error: typedef '_ValueType' locally defined but not used [-Werror=unused-local-typedefs]
_ValueType;
^
[...]
More typedefs are warned about, _InputValueType, _OutputValueType, and
_DistanceType.
Sascha Wildner [Thu, 26 Feb 2015 10:16:54 +0000 (11:16 +0100)]
bmake.1: Add missing newline.
Sascha Wildner [Wed, 25 Feb 2015 21:13:42 +0000 (22:13 +0100)]
Fix 'make upgrade'.
Seems sys.mk is pulled in for 'make upgrade' too and CCVER isn't defined
at this point.
Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Sascha Wildner [Wed, 25 Feb 2015 21:03:34 +0000 (22:03 +0100)]
coretemp(4): Add MODULE_VERSION.
Tomohiro Kusumi [Wed, 25 Feb 2015 10:18:06 +0000 (19:18 +0900)]
sys/vfs/hammer: conform to style(9)
- Remove #include <sys/types.h>
- Kernel include files (i.e. sys/*.h) come first;
normally, include <sys/types.h> OR <sys/param.h>, but not both.
- Spotted-by: sephe
http://lists.dragonflybsd.org/pipermail/commits/2015-February/417986.html
Sascha Wildner [Wed, 25 Feb 2015 03:55:49 +0000 (04:55 +0100)]
devd(8): Raise WARNS back to 5.
Sascha Wildner [Wed, 25 Feb 2015 03:55:09 +0000 (04:55 +0100)]
gcc50: Exclude -Wunused-local-typedefs from C++ flags for now.
At least GCC 5.0 is warning on its own C++ includes (stl_algo.h,
via <algorithm>) if -Wextra is set, breaking the build of programs
which do nothing wrong themselves (such as devd(8)).
When this gets fixed, we can revert this commit again.
Note that I didn't check with GCC 4.8 or 4.9.
Sepherosa Ziehau [Wed, 25 Feb 2015 03:26:52 +0000 (11:26 +0800)]
udp: Disable direct detach only if multicast options are to be set.
Sepherosa Ziehau [Wed, 25 Feb 2015 03:17:35 +0000 (11:17 +0800)]
udp: Disable direct detach, if multicast options are set.
Add additional comment about disabling direct detach when setting
multicast options.
Submitted-by: Romick
DragonFly-bug: http://bugs.dragonflybsd.org/issues/2792
Sascha Wildner [Wed, 25 Feb 2015 02:42:41 +0000 (03:42 +0100)]
devd(8): Sync with FreeBSD.
Imre Vadasz [Tue, 24 Feb 2015 22:57:11 +0000 (23:57 +0100)]
acpi_hp(4): Fix detaching, by adding the missing sysctl_ctx_free call.
Tomohiro Kusumi [Tue, 24 Feb 2015 11:52:34 +0000 (20:52 +0900)]
sys/vfs/hammer: Remove duplicate calculation of localization
- No need to calculate localization twice.
Tomohiro Kusumi [Tue, 24 Feb 2015 10:57:14 +0000 (19:57 +0900)]
sys/vfs/hammer: Fix comments on record initialization
- hunk1 - Add description of manual data allocation.
- hunk2 - Make description of hammer_ip_add_record() up-to-date with code.
Tomohiro Kusumi [Tue, 24 Feb 2015 10:54:45 +0000 (19:54 +0900)]
sys/vfs/hammer: Fix comments on btree record data
- hunk1 - Make comments up-to-date with code.
- hunk2 - Show this member is to be dynamically allocated
with >HAMMER_INODE_BASESYMLEN bytes length.
Tomohiro Kusumi [Tue, 24 Feb 2015 10:53:34 +0000 (19:53 +0900)]
sys/vfs/hammer: Add comments on PFS ioctls
- Add another line regarding inodes for these ioctls.
Michael Neumann [Tue, 24 Feb 2015 12:35:19 +0000 (13:35 +0100)]
drm/radeon: Bring in new firmware
Obtained-From: git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
Sascha Wildner [Tue, 24 Feb 2015 12:21:24 +0000 (13:21 +0100)]
kernel/drm: Fix building with 'device drm' in the config.
Michael Neumann [Tue, 24 Feb 2015 10:59:55 +0000 (11:59 +0100)]
drm/radeon: Update to Linux 3.9
* Add support for Oland chip family
* Add support for Richland APUs
* Misc refactoring (e.g. CS parsing)
* Misc stabilization work (e.g. GPU resetting)
Michael Neumann [Tue, 24 Feb 2015 10:46:12 +0000 (11:46 +0100)]
drm: Add Linux compatibility macros
Michael Neumann [Tue, 24 Feb 2015 10:44:54 +0000 (11:44 +0100)]
drm: Add drm_hdmi_avi_infoframe_from_display_mode()
Obtained-From: Linux
Michael Neumann [Tue, 24 Feb 2015 10:42:00 +0000 (11:42 +0100)]
drm: Bring in HDMI code from Linux
Obtained-From: Linux
Sascha Wildner [Tue, 24 Feb 2015 11:02:29 +0000 (12:02 +0100)]
gcc50: Fix include path.
This fixes 49 of the 51 -Wmissing-include-dirs warnings it is giving.
Sascha Wildner [Tue, 24 Feb 2015 10:50:51 +0000 (11:50 +0100)]
ieee80211_vap.9: Fix manual page prototype.
Tomohiro Kusumi [Mon, 23 Feb 2015 16:00:28 +0000 (01:00 +0900)]
sbin/hammer: Add printf for remaining btree records
- Add printf for UNKNOWN/PFS/SNAPSHOT/CONFIG records that was
missing in hammer show command.
- Useful for debugging.
Tomohiro Kusumi [Mon, 23 Feb 2015 15:18:39 +0000 (00:18 +0900)]
sbin/hammer: Call free(3) after uuid_to_string(3)
- Add missing free().
Tomohiro Kusumi [Mon, 23 Feb 2015 12:21:20 +0000 (21:21 +0900)]
sys/vfs/hammer: Add missing header include
- #include <sys/param.h> to avoid following error. This happens when
hammer_ioctl.h is included without including other hammer headers.
/usr/include/vfs/hammer/hammer_ioctl.h:351:21: error: 'MAXPATHLEN'
undeclared here (not in a function)
Tomohiro Kusumi [Mon, 23 Feb 2015 12:17:01 +0000 (21:17 +0900)]
sys/vfs/hammer: Fix comment on PFS
- HAMMER_RECTYPE_FIX and HAMMER_FIXKEY_PSEUDOFS are no longer used by
cursor to lookup PFS data. It uses HAMMER_RECTYPE_PFS for record type
and localization id for a key.
Imre Vadasz [Mon, 23 Feb 2015 10:00:33 +0000 (11:00 +0100)]
drm/radeon: Correct PAGE_MASK usage in radeon_vm_map_gart().
* Linux defines PAGE_MASK to be (~(PAGE_SIZE - 1)), whereas our kernel
defines it as (PAGE_SIZE - 1).
Taken-from: OpenBSD
Markus Pfeiffer [Sun, 22 Feb 2015 21:59:59 +0000 (21:59 +0000)]
kernel/usb4bsd, kernel/sound: Fix detach panic
The kernel paniced when unplugging a USB sound device. This was
due to a NULL td_proc pointer being dereferenced.
Markus Pfeiffer [Sun, 22 Feb 2015 20:51:21 +0000 (20:51 +0000)]
kernel/usb4bsd: Apply FreeBSD r278503
This updates the original patch r274918, which had the following
description:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.
Sascha Wildner [Fri, 9 Jan 2015 17:18:21 +0000 (18:18 +0100)]
kernel/usb4bsd: Update uaudio driver to FreeBSD r276701
Sascha Wildner [Sun, 22 Feb 2015 21:16:27 +0000 (22:16 +0100)]
kernel/lwkt_serialize: Take serializer bookkeeping out of INVARIANTS.
IS_SERIALIZED() is no longer only used in [K]KASSERT(), which disrupts
compiling without INVARIANTS rather regularly.
This commit makes the needed bits available without INVARIANTS too.
Sascha Wildner [Sun, 22 Feb 2015 20:55:55 +0000 (21:55 +0100)]
libhammer.3: Fix unknown reference.
Sascha Wildner [Sun, 22 Feb 2015 20:52:38 +0000 (21:52 +0100)]
Remove parallel port support from our default config.
Sascha Wildner [Sun, 22 Feb 2015 20:49:26 +0000 (21:49 +0100)]
kernel/drm: Fix spelling in comments.
Tomohiro Kusumi [Sun, 22 Feb 2015 17:51:35 +0000 (02:51 +0900)]
sys/vfs/hammer: remove comment on atime
- Remove a comment regarding where atime is stored. It's a parf of inode,
but not btree element. This comment was added in
11ad5ade when atime
became a part of btree element, but never removed when
bcac4bbb moved
it back to inode.
François Tigeot [Sun, 22 Feb 2015 16:01:15 +0000 (17:01 +0100)]
drm/i915: Restore gcc 5.0 fixes
They were originally added by John Marino in
eecf6c3c3b6f7127edd8b8f8c2a83e2f882ed0da and overwritten
by the Linux 3.11 update.
Noticed-by: Rolinh
Tomohiro Kusumi [Sat, 21 Feb 2015 20:14:50 +0000 (05:14 +0900)]
sys/vfs/hammer: remove obsolete comments on btree, etc
- hunk1: Use 'type' instead of 'subtype'. subtype was a different
idea from type originally which no longer exist.
- hunk2: There is no longer a distiction of normal/meta btree node.
It's either internal or leaf node, plus record elements within leaf.
- hunk3: Remove comments on subtype field that no longer exist,
and add a comment on node size with 63-way btree.
- hunk4: These macros were only used in very early stage of hammer
development.
- hunk5-6: Minor cleanups.
Tomohiro Kusumi [Sat, 21 Feb 2015 18:28:22 +0000 (03:28 +0900)]
sbin/hammer: remove obsolete comments
- Remove comments of a no longer existing function.
Markus Pfeiffer [Sun, 22 Feb 2015 01:05:00 +0000 (01:05 +0000)]
kernel/usb4bsd: Apply FreeBSD r277417
Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular
the value returned in the "udp_port_level" field.
Markus Pfeiffer [Sun, 22 Feb 2015 00:53:56 +0000 (00:53 +0000)]
kernel/usb4bsd: Cleanup usb_ethernet
Markus Pfeiffer [Sun, 22 Feb 2015 00:47:27 +0000 (00:47 +0000)]
kernel/usb4bsd: Update revision tag on if_axge.
No updates of functionality.
Markus Pfeiffer [Sun, 22 Feb 2015 00:28:57 +0000 (00:28 +0000)]
kernel/usb4bsd: Update pci drivers for HCIs
This adds support for 64bit DMA for chips that support it. This needs
further testing.
Markus Pfeiffer [Sun, 22 Feb 2015 00:07:18 +0000 (00:07 +0000)]
kernel/usb4bsd: Update uhci and ohci drivers
Markus Pfeiffer [Sun, 22 Feb 2015 00:04:51 +0000 (00:04 +0000)]
kernel/usb4bsd: Add file ID to ehci.c
Note that ehci.c was heavily modified by Matt Dillon.
Markus Pfeiffer [Sat, 21 Feb 2015 23:43:47 +0000 (23:43 +0000)]
kernel/usb4bsd: Update xhci to r278477
François Tigeot [Sat, 21 Feb 2015 16:35:50 +0000 (17:35 +0100)]
drm/i915: Update to Linux 3.11
* Valleyview/Baytrail support improvements. Baytrail support is
no longer considered experimental.
* VECS engine support on Haswell. The Video Enhancement Command
Streamer is used by libva for some post-processing tasks.
* Power management improvements, especially on Haswell.
* Hotplug improvements.
* Output and modeset improvements. Using 30bpp modes is now possible.
* Various bugfixes and Stability improvements, including memory
corruption and GPU hang fixes after a suspend/resume sequence.
v2: i915_irq.c lock ordering fix, reported by zrj@
v3: backlight spinlock fixes from Romick
François Tigeot [Sat, 21 Feb 2015 08:10:32 +0000 (09:10 +0100)]
drm: Add a new implementation of drm_sysfs.c
We can't directly use the Linux version of this file due to
restrictive license terms.
François Tigeot [Sun, 1 Feb 2015 20:23:34 +0000 (21:23 +0100)]
drm: Add drm_rect.c from Linux 3.11
François Tigeot [Sat, 14 Feb 2015 10:24:47 +0000 (11:24 +0100)]
drm: Sync drm_crtc.c with Linux 3.11
François Tigeot [Sat, 14 Feb 2015 09:59:53 +0000 (10:59 +0100)]
drm: Sync headers with Linux 3.11
John Marino [Sat, 21 Feb 2015 13:17:57 +0000 (14:17 +0100)]
gcc50: Install stdatomic.h and stdfix.h to /usr/libdata/gcc50
It's possible that stdatomic.h should be inported into DragonFly. When
that happens, it should be removed from the list of headers that gcc
installs.
Markus Pfeiffer [Sat, 21 Feb 2015 13:51:42 +0000 (13:51 +0000)]
kernel/usb4bsd: Make sure ucom removes dev files
Markus Pfeiffer [Sat, 21 Feb 2015 13:57:45 +0000 (13:57 +0000)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Tomohiro Kusumi [Fri, 20 Feb 2015 21:54:14 +0000 (06:54 +0900)]
sys/vfs/hammer: fix comment regarding unknown object type
- There are btree nodes that have 0 (HAMMER_OBJTYPE_UNKNOWN) for
obj_type although those are not created to be unknown nodes.
For example PFS record of / has 0 for obj_type.
Sascha Wildner [Fri, 20 Feb 2015 20:23:56 +0000 (21:23 +0100)]
devd(8): Remove automatic loading of uaudio.ko until we've fixed it.
Reported-by: Various people, mneumann, Robin Hahling, ...
John Marino [Fri, 20 Feb 2015 15:28:54 +0000 (16:28 +0100)]
gcc50: Update to 20 Feb 2015 snapshot (SVN 220871)
John Marino [Fri, 20 Feb 2015 17:01:04 +0000 (18:01 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 20 Feb 2015 15:26:37 +0000 (16:26 +0100)]
Update gcc-50 to SVN version 220871
Last Changed Date: 2015-02-20 15:40:00 +0100 (Fri, 20 Feb 2015)
Sascha Wildner [Fri, 20 Feb 2015 14:41:39 +0000 (15:41 +0100)]
twe(4): Add two missing error checks.
Sascha Wildner [Fri, 20 Feb 2015 13:41:13 +0000 (14:41 +0100)]
Remove the old libsys code which was never hooked in in 10 years.
Approved-by: dillon
Matthew Dillon [Fri, 20 Feb 2015 00:14:52 +0000 (16:14 -0800)]
systat - Fix initial pftop state
* The initial pftop state divides by delta_time, which starts out
as 0.0 and can prevent states from displaying properly.
* Initialize delta_time to 1.0 and disallow sleep intervals < 0.1 second
to avoid an absurd result.
Markus Pfeiffer [Mon, 12 Jan 2015 14:04:08 +0000 (14:04 +0000)]
usb4bsd - ucom work
Try to fix the ucom driver. This needs lots of further testing, and
quite probably fixes for it to behave properly.
Antonio Huete Jimenez [Thu, 19 Feb 2015 15:55:09 +0000 (16:55 +0100)]
libhammer - Fix typos in man pages
Antonio Huete Jimenez [Thu, 19 Feb 2015 13:13:53 +0000 (14:13 +0100)]
libhammer - Add missing manual pages
- Adapt the info one for the recent changes.
- Remove old manpages via upgrade.
Antonio Huete Jimenez [Thu, 19 Feb 2015 13:14:29 +0000 (14:14 +0100)]
libhammer - Add an overlooked function that releases snaps
- Add a function to release resources allocated for libhammer_pfs_get_snapshots.
- Release snapshot resources when releasing the fsinfo struct.
Sascha Wildner [Thu, 19 Feb 2015 02:18:11 +0000 (03:18 +0100)]
kernel/wlan: Fix up the MAC address printing and add back __printflike()s.
In the recent wlan, iwn and ath upgrades, porting this properly was hacked
around by removing the __printflike()s because DragonFly has no support
for %D (neither in GCC nor in kprintf()). This is wrong because even
though it silences the warning, it will still not print MAC addresses
correctly. So bring all that back.
Also update the wlan's README.DRAGONFLY with some information about how
to port this properly.
Sascha Wildner [Thu, 19 Feb 2015 00:16:23 +0000 (01:16 +0100)]
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.
The main reason is that our having to use the MB_WAIT and MB_DONTWAIT
flags was a recurring issue when porting drivers from FreeBSD because
it tended to get forgotten and the code would compile anyway with the
wrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflags
for an objcache_get() or objcache_reclaimlist call (which use M_WAITOK
and M_NOWAIT), it was just one big converting back and forth with some
sanitization in between.
This commit allows M_* again for the mbuf functions and keeps the
sanitizing as it was before: when M_WAITOK is among the passed flags,
objcache functions will be called with M_WAITOK and when it is absent,
they will be called with M_NOWAIT. All other flags are scrubbed by the
MB_OCFLAG() macro which does the same as the former MBTOM().
Approved-by: dillon
Tomohiro Kusumi [Wed, 18 Feb 2015 17:50:33 +0000 (02:50 +0900)]
sbin/hammer: ignore negative length for history dump
- Use default value 32 when a negative value was given for
history dump.
Tomohiro Kusumi [Wed, 18 Feb 2015 17:07:03 +0000 (02:07 +0900)]
sbin/hammer: check strtol()/strtoll() results to avoid irrelevant history
queries
- Check errno for possible overflow/underflow by strtol()/strtoll() in
order to avoid ioctl with irrelevant offset/length.
- Examples
# hammer -vvv history@
11111111111111111111111111111111,111 ./out
Result too large: @
11111111111111111111111111111111
# hammer -vvv history@111,
11111111111111111111111111111111 ./out
Result too large: ,
11111111111111111111111111111111
# hammer -vvv history@-
11111111111111111111111111111111,111 ./out
Result too large: @-
11111111111111111111111111111111
# hammer -vvv history@111,-
11111111111111111111111111111111 ./out
Result too large: ,-
11111111111111111111111111111111
Tomohiro Kusumi [Wed, 18 Feb 2015 15:16:54 +0000 (00:16 +0900)]
sbin/hammer: trivial cleanup
- commit
00b46268 reverting
417cb1b1 brought back unnecessary blank line
at the end of the file that was once removed in
417cb1b1, so remove it
again.
Tomohiro Kusumi [Wed, 18 Feb 2015 15:11:15 +0000 (00:11 +0900)]
sbin/hammer: close file descriptor on history iteration
- Make hammer history command close(fd) each time it opens path@@0x`tid`
for hist.count times.
Tomohiro Kusumi [Wed, 18 Feb 2015 14:52:16 +0000 (23:52 +0900)]
sbin/hammer: trivial coding style fix
- Trivial coding style fix to a commit
24dd5805.
- Add parenthesis as hammer code mostly prefers "return(retval);"
to "return retval;".
Antonio Huete Jimenez [Tue, 10 Feb 2015 14:32:15 +0000 (15:32 +0100)]
libhammer - Preparation for snapshot handling & fixes
Trivial changes:
- Function renaming to actually match what they are
describing.
- Clearer variable naming.
Additions:
- Structures to hold snapshot data.
- Functions to retrieve snapshots from metadata for PFSes.
- A file for version compatibility functions.
- A function to return the canonical access path of a
PFS which is suitable for opening.
- Wrappers to operate per PFS snapshot list.
Changes & fixes:
- Use the new functions to gather all snaps of a PFS.
- Adapt hammer program for the changes.
- Check before free'ing in libhammer_free_fsinfo()
- Display the number of snapshots for unmounted PFSes.
Still missing:
- Manpages changes.
Sascha Wildner [Wed, 18 Feb 2015 14:46:58 +0000 (15:46 +0100)]
sys/kern: Adjust some function declaration vs. definition mismatches.
All these functions are declared static already, so no functional change.
Sascha Wildner [Wed, 18 Feb 2015 14:14:01 +0000 (15:14 +0100)]
vinum(8): Remove unused macro.
If it is ever needed, it can be done with offsetof().
Sascha Wildner [Wed, 18 Feb 2015 11:55:07 +0000 (12:55 +0100)]
natacontrol(8): Break line better and reduce parentheses.
Sascha Wildner [Wed, 18 Feb 2015 10:40:20 +0000 (11:40 +0100)]
Add cryptodev to our default configuration file.
While here, change wrong 'pseudo-device' to 'device'.
Sascha Wildner [Wed, 18 Feb 2015 10:29:13 +0000 (11:29 +0100)]
contrib/opie: Sync with FreeBSD, but not much to see here.
A couple of bugfixes:
* Fix the overflow check in challenge handling (off by 1).
* Store all hashes in little endian format before folding to 64 bits, per
RFC 2289. SHA1 code is big endian, so a bswap32() is needed.
* Create /etc/opiekeys with 0600, not 0644.
* Increase OPIE_HASHNAME_MAX for SHA1.
* Fix a buffer overflow in an unused file.
* Remove two unused (and empty) files.
The rest is just cosmetics.
Sepherosa Ziehau [Wed, 18 Feb 2015 02:47:35 +0000 (10:47 +0800)]
acpi/cstate: Fix comment