openbsd
9 years agoIt feels like this Makefile should contain -Wall at least
deraadt [Wed, 15 Apr 2015 02:10:25 +0000 (02:10 +0000)]
It feels like this Makefile should contain -Wall at least

9 years agodocument missing argument; ok jmc
deraadt [Tue, 14 Apr 2015 23:59:40 +0000 (23:59 +0000)]
document missing argument; ok jmc

9 years agoAnother couple of commas in the wrong place, ok jmc
nicm [Tue, 14 Apr 2015 22:16:03 +0000 (22:16 +0000)]
Another couple of commas in the wrong place, ok jmc

9 years agoRemove an extra comma pointed out by jmc@.
nicm [Tue, 14 Apr 2015 21:34:45 +0000 (21:34 +0000)]
Remove an extra comma pointed out by jmc@.

9 years agoReorder prototypes to better match manpage layout and add some missing
nicm [Tue, 14 Apr 2015 21:25:54 +0000 (21:25 +0000)]
Reorder prototypes to better match manpage layout and add some missing
argument names, from Fabian Raetz. ok deraadt

9 years agosparc{,64} do not need softraid partitions to be defined as 4.2BSD, probably
miod [Tue, 14 Apr 2015 19:10:13 +0000 (19:10 +0000)]
sparc{,64} do not need softraid partitions to be defined as 4.2BSD, probably
since only one month after this was mentioned in CAVEATS.

9 years agoIPsec auth and credentials are not stored in the kernel anymore;
mikeb [Tue, 14 Apr 2015 17:53:13 +0000 (17:53 +0000)]
IPsec auth and credentials are not stored in the kernel anymore;
noticed by deraadt@

9 years agowrap a long line
deraadt [Tue, 14 Apr 2015 17:29:06 +0000 (17:29 +0000)]
wrap a long line

9 years agoFix sa_sigaction() handler example. The third argument is void * and
millert [Tue, 14 Apr 2015 17:05:28 +0000 (17:05 +0000)]
Fix sa_sigaction() handler example.  The third argument is void * and
should be cast to ucontext_t * to actually use it.  OK deraadt@

9 years agoThis is not System V, we spell it SIGCHLD.
millert [Tue, 14 Apr 2015 16:40:46 +0000 (16:40 +0000)]
This is not System V, we spell it SIGCHLD.
Adapted from a diff from Jan Stary.

9 years agoSetting the configuration in *_attach() is a bad practise because if it
mpi [Tue, 14 Apr 2015 14:57:05 +0000 (14:57 +0000)]
Setting the configuration in *_attach() is a bad practise because if it
fails it's impossible to debug and you cannot use your device.

So instead of calling usbd_set_config_index(), match the right interface.

This is trivial with this device because it has only one configuration
and interface.

9 years agoIt's not possible to call umcs_get_status() in interrupt context
mpi [Tue, 14 Apr 2015 14:38:17 +0000 (14:38 +0000)]
It's not possible to call umcs_get_status() in interrupt context
because it submits synchronous transfers, so schedule a task when
necessary.

9 years agomake ipsp_address thread safe; ok mpi
mikeb [Tue, 14 Apr 2015 14:20:01 +0000 (14:20 +0000)]
make ipsp_address thread safe;  ok mpi

9 years agoip6_sprintf is long gone; noticed by blambert
mikeb [Tue, 14 Apr 2015 14:18:37 +0000 (14:18 +0000)]
ip6_sprintf is long gone;  noticed by blambert

9 years agoMove verify externs into the header file.
jsing [Tue, 14 Apr 2015 12:56:36 +0000 (12:56 +0000)]
Move verify externs into the header file.

9 years agoRemove support for storing credentials and auth information in the kernel.
mikeb [Tue, 14 Apr 2015 12:22:15 +0000 (12:22 +0000)]
Remove support for storing credentials and auth information in the kernel.

This code is largely unfinished and is not used for anything.  The change
leaves identities as only objects referenced by ipsec_ref structure and
their handling requires some changes to support more advanced matching of
IPsec connections.

No objections from reyk and hshoexer, with and OK markus.

9 years agoConvert openssl(1) s_time to new option handling.
jsing [Tue, 14 Apr 2015 11:45:00 +0000 (11:45 +0000)]
Convert openssl(1) s_time to new option handling.

ok doug@

9 years agoClean up and improve openssl(1) errstr:
jsing [Tue, 14 Apr 2015 10:54:40 +0000 (10:54 +0000)]
Clean up and improve openssl(1) errstr:

- Use BIO_new_fp() instead of BIO_new()/BIO_set_fp() and handle NULL
  return value in a more appropriate manner.

- Use stroul() instead of sscanf() with appropriate error checking.

ok doug@

9 years agoMake sure we close the interrupt pipe when the device is detached.
mpi [Tue, 14 Apr 2015 07:57:33 +0000 (07:57 +0000)]
Make sure we close the interrupt pipe when the device is detached.

Bug reported and fix tested by Thomas Pfaff, thanks!

9 years agoReduce differences between non-PAE and PAE pmaps. This diff removes an
mlarkin [Tue, 14 Apr 2015 05:21:51 +0000 (05:21 +0000)]
Reduce differences between non-PAE and PAE pmaps. This diff removes an
unneeded disable/enable_intr sequence around the PTE unmap operation.

9 years agoOutput remote username in debug output since with Host and Match it's not
dtucker [Tue, 14 Apr 2015 04:17:03 +0000 (04:17 +0000)]
Output remote username in debug output since with Host and Match it's not
always obvious what it will be.  bz#2368, ok djm@

9 years agoLog a more useful error message if ttyname() fails. OK deraadt@
millert [Tue, 14 Apr 2015 02:24:17 +0000 (02:24 +0000)]
Log a more useful error message if ttyname() fails.  OK deraadt@

9 years agopwd_mkdb now fits onto the install media. no more chroot games.
deraadt [Mon, 13 Apr 2015 21:27:05 +0000 (21:27 +0000)]
pwd_mkdb now fits onto the install media.  no more chroot games.

9 years agoInitialize RX/TX on re(4) slightly later; it appears that newer chips
sthen [Mon, 13 Apr 2015 20:45:49 +0000 (20:45 +0000)]
Initialize RX/TX on re(4) slightly later; it appears that newer chips
don't setup DMA correctly until more configuration has been done -
enabling RX too soon causes DMA to bad places. KVM corruption problems
reported by Adam Wolk on Lenovo G50-70 (RTL8111GU).

Diff derived by Brad from FreeBSD commit; see bz# 197535 and 193743, inspired by
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d6e572911a4cb2b9fcd1c26a38d5317a3971f2fd

Tested on the following by Brad, Adam Wolk, box963 at gmail, Jim Smith

re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D (0x2800), apic 2 int 16, address 00:0a:cd:1a:86:04
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x0c: RTL8168G/8111G (0x4c00), msi, address 80:ee:73:76:8e:8a
re0 at pci0 dev 3 function 0 "Realtek 8169" rev 0x10: RTL8110S (0x0400), ivec 0x78c, address 00:22:3f:ee:fa:25
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:31:2e:88
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x10: RTL8168GU/8111GU (0x5080), msi, address 68:f7:28:18:35:8e

ok mpi@ dlg@

9 years agoMake sure we print the MAC address on sparc64 as well.
kettenis [Mon, 13 Apr 2015 20:02:58 +0000 (20:02 +0000)]
Make sure we print the MAC address on sparc64 as well.

9 years agoMake filter argument to ipsp_aux_match optional like the rest of them.
mikeb [Mon, 13 Apr 2015 16:52:26 +0000 (16:52 +0000)]
Make filter argument to ipsp_aux_match optional like the rest of them.
OK markus, hshoexer

9 years agoPerform IPsec bypass check on a socket before performing TDB lookups.
mikeb [Mon, 13 Apr 2015 16:50:43 +0000 (16:50 +0000)]
Perform IPsec bypass check on a socket before performing TDB lookups.
OK markus, hshoexer

9 years agoRename gettdbbyaddr to gettdbbydst; OK markus, hshoexer, mpi
mikeb [Mon, 13 Apr 2015 16:48:01 +0000 (16:48 +0000)]
Rename gettdbbyaddr to gettdbbydst;  OK markus, hshoexer, mpi

9 years agoRemove unused arguments from gettdb* functions; OK markus, hshoexer, mpi
mikeb [Mon, 13 Apr 2015 16:45:52 +0000 (16:45 +0000)]
Remove unused arguments from gettdb* functions;  OK markus, hshoexer, mpi

9 years agoConvert openssl(1) errstr to new option handling.
jsing [Mon, 13 Apr 2015 15:02:23 +0000 (15:02 +0000)]
Convert openssl(1) errstr to new option handling.

ok bcook@ doug@

9 years agoMove one "#ifdef NVLAN" chunk needed only if you're running bridge(4) on
mpi [Mon, 13 Apr 2015 08:52:51 +0000 (08:52 +0000)]
Move one "#ifdef NVLAN" chunk needed only if you're running bridge(4) on
to of vlan(4) from ether_input() to bridge_input().

One of the goal of the if_input() plumbing is to stop doing all possible
pseudo-drivers checks on every packets.  There's no reason that even if
you're not running a bridge(4) you've to run this code.

This change also will also makes it easier to convert vlan(4) to if_input().

Reviewed by Rafael Zalamena and mikeb@, ok markus@

9 years agoNow that if_input() set the receiving interface pointer on mbufs for us
mpi [Mon, 13 Apr 2015 08:45:48 +0000 (08:45 +0000)]
Now that if_input() set the receiving interface pointer on mbufs for us
there's no need to do it in m_devget(9).

Stop passing an ``ifp'' will help for upcoming interface pointer -> index
conversion.

While here remove unused ``ifp'' argument from m_clget(9) and kill two
birds^W layer violations in one commit.

ok henning@

9 years agoether_input() should not longer be called directly so convert to
mpi [Mon, 13 Apr 2015 08:40:32 +0000 (08:40 +0000)]
ether_input() should not longer be called directly so convert to
if_input().

Needed for the upcoming pseudo-driver integration work.

ok dlg@

9 years agocorrect multiplication idiom during xreallocarray, and expand appendnum
deraadt [Mon, 13 Apr 2015 05:11:23 +0000 (05:11 +0000)]
correct multiplication idiom during xreallocarray, and expand appendnum
to size_t to avoid overflow after allocation success
ok guenther doug

9 years agodeprecate ancient, pre-RFC4419 and undocumented
djm [Mon, 13 Apr 2015 02:04:08 +0000 (02:04 +0000)]
deprecate ancient, pre-RFC4419 and undocumented
SSH2_MSG_KEX_DH_GEX_REQUEST_OLD message;
ok markus@ deraadt@ "seems reasonable" dtucker@

9 years agosync
deraadt [Sun, 12 Apr 2015 22:58:34 +0000 (22:58 +0000)]
sync

9 years agoPrevent use after free in definemacro().
florian [Sun, 12 Apr 2015 21:42:18 +0000 (21:42 +0000)]
Prevent use after free in definemacro().
When the startup file contains (start-kbd-macro) mg crashes when
executing "start-kbd-macro" two times in the running mg.

The problem is that execline() is cleaning up behind our backs.
Finish the cleanup and make sure mg doesn't think we are in the
middle of a macro definition.

Problem found, tracked down and diff by gsoares@
Tweaked & OK by me.
Committing on request of gsoares@ who currently doesn't have good net
to commit.

9 years agoFix some KNF, spacing, and typo issues. Moving the deck chairs around to
mlarkin [Sun, 12 Apr 2015 21:37:33 +0000 (21:37 +0000)]
Fix some KNF, spacing, and typo issues. Moving the deck chairs around to
reduce differences between PAE and no-PAE i386 pmaps.

9 years agoLet nl_langinfo(CODESET) return "US-ASCII" as the name of the
naddy [Sun, 12 Apr 2015 20:18:41 +0000 (20:18 +0000)]
Let nl_langinfo(CODESET) return "US-ASCII" as the name of the
character codeset for the POSIX/C default locale.  This is the
preferred IANA name and also used by FreeBSD.

The previous value "646" was an obscure reference to ISO 646 (= ASCII)
and was not recognized by GNU iconv out of the box.

ok millert@, stsp@

9 years agoFix some typos in comments, and remove an outdated comment about how
mlarkin [Sun, 12 Apr 2015 19:21:32 +0000 (19:21 +0000)]
Fix some typos in comments, and remove an outdated comment about how
certain pmap structures are allocated.

No functional change.

9 years agoBring PAE code back to life, in a different form. This diff (via bluhm then
mlarkin [Sun, 12 Apr 2015 18:37:53 +0000 (18:37 +0000)]
Bring PAE code back to life, in a different form. This diff (via bluhm then
to deraadt, then myself) brings the PAE pmap on i386 (not touched in any
significant way for years) closer to the current non-PAE pmap and allows
us to take a big next step toward better i386 W^X in the kernel (similar to
what we did a few months ago on amd64). Unlike the original PAE pmap, this
diff will not be supporting > 4GB physical memory on i386 - this effort is
specifically geared toward providing W^X (via NX) only.

There still seems to be a bug removing certain pmap entries when PAE is
enabled, so I'm leaving PAE mode disabled for the moment until we can
figure out what is going on, but with this diff in the tree hopefully
others can help.

The pmap functions now operate through function pointers, due to the need
to support both non-PAE and PAE forms. My unscientific testing showed
less than 0.3% (a third of a percent) slowdown with this approach during
a base build.

Discussed for months with guenther, kettenis, and deraadt.

ok kettenis@, deraadt@

9 years agoAdd a few missing trace functions, and "use" them. Add back the WATCH_GTT
kettenis [Sun, 12 Apr 2015 17:10:07 +0000 (17:10 +0000)]
Add a few missing trace functions, and "use" them.  Add back the WATCH_GTT
code (that isn't actually compiled in).  Use dev_priv->dev in one more place
now that we have it, and add set_normalized_timespec() and use it.

9 years agoRemove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.
doug [Sun, 12 Apr 2015 15:15:51 +0000 (15:15 +0000)]
Remove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.

i2d_X509_PKEY is a "needs to implement" and d2i_X509_PKEY is broken.

Removed upstream in commit b1f3442857c1fd76e91941141bf671d19e90a79d.

ok deraadt@, jsing@

9 years agohfsc_classq has a type member which is never set or read, except to report
dlg [Sun, 12 Apr 2015 14:09:40 +0000 (14:09 +0000)]
hfsc_classq has a type member which is never set or read, except to report
its value to userland which will always be 0.

drop the member. lie to userland.

ok henning@

9 years agothere's a 1:1 correlation between hfsc_class instances and hfsc_classq
dlg [Sun, 12 Apr 2015 12:22:26 +0000 (12:22 +0000)]
there's a 1:1 correlation between hfsc_class instances and hfsc_classq
instances, so maintaining separate pools for them and pointing
between them is overhead.

this drops the hfsc_classq pool and inlines it into hfsc_class.

ok henning@

9 years agochange back to linux style pci vendor/device defines
jsg [Sun, 12 Apr 2015 12:14:30 +0000 (12:14 +0000)]
change back to linux style pci vendor/device defines

9 years agoSwitch example NSD config to splitting master and slave zones into different
sthen [Sun, 12 Apr 2015 11:49:39 +0000 (11:49 +0000)]
Switch example NSD config to splitting master and slave zones into different
subdirectories (/var/nsd/zones/{master,slave}) and create these in mtree.
Nearly everybody that uses NSD for slave zones that I talked to already has
this layout. Bikesh^Wdiscussed with ajacoutot florian millert and others.

ok ajacoutot@ florian@ phessler@ claudio@ jung@

9 years agochange back to wait_for/wait_for_atomic_us
jsg [Sun, 12 Apr 2015 11:26:54 +0000 (11:26 +0000)]
change back to wait_for/wait_for_atomic_us

9 years agodisable the pool gc. there are reports of strange lockups on various mp
dlg [Sun, 12 Apr 2015 11:12:09 +0000 (11:12 +0000)]
disable the pool gc. there are reports of strange lockups on various mp
archs and this is the only interesting diff in the window.

9 years agopull structs and macros that are only used in hfsc.c out of the header
dlg [Sun, 12 Apr 2015 09:58:46 +0000 (09:58 +0000)]
pull structs and macros that are only used in hfsc.c out of the header
and into the .c file.

ok henning@

9 years agodont rely on hfsc.h via pfvar.h to include sys/timeout.h.
dlg [Sun, 12 Apr 2015 09:57:54 +0000 (09:57 +0000)]
dont rely on hfsc.h via pfvar.h to include sys/timeout.h.

9 years agoSwitch back to ioread32 and iowrite32 for cases where bus_space_vaddr is
jsg [Sun, 12 Apr 2015 05:31:23 +0000 (05:31 +0000)]
Switch back to ioread32 and iowrite32 for cases where bus_space_vaddr is
used instead of bus_space_read/bus_space_write.

9 years agomake wait_queue_head a struct with a mutex
jsg [Sun, 12 Apr 2015 03:54:10 +0000 (03:54 +0000)]
make wait_queue_head a struct with a mutex
better matches linux behaviour

9 years agoDirectly handle ioctls issued to a SCSI device associated with a softraid
jsing [Sat, 11 Apr 2015 17:10:17 +0000 (17:10 +0000)]
Directly handle ioctls issued to a SCSI device associated with a softraid
volume, ignoring any device name specified in the bio(4) ioctl struct.

One of bio(4)'s design flaws is that the device name is hardcoded in many
of the ioctl structs, making it basically unusable with DUIDs. In the case
of `bioctl -d' the bioctl(8) code actually uses opendev(3) on the given
name, then issues the ioctl directly to the resulting device. As such, we
already know which device (or in this case, softraid volume) the ioctl was
intended for, however the current softraid(4) code ignores this and instead
attempts to perform a lookup using the name in the bio(4) ioctl struct.

This diff splits the sr_bio_ioctl() code into two parts - one that implements
the API required by bio(4) and the other that contains the ioctl handling
code, which now takes an optional pointer to the softraid discipline. If an
ioctl is issued to a SCSI device associated with a softraid volume, pass
the corresponding softraid discipline struct through and to the bio ioctl
handler and use it in preference to performing a device name lookup.

Amongst other things, this makes bioctl -d now work with DUIDs.

ok krw@

9 years agoRe-enable the RAID 5 discipline for softraid(4).
jsing [Sat, 11 Apr 2015 16:37:34 +0000 (16:37 +0000)]
Re-enable the RAID 5 discipline for softraid(4).

The RAID 5 implementation has been largely rewritten during the last two
hackathons in Dunedin - it now needs further testing and usage.

9 years agoAdd support for restarting rebuilds on RAID 5.
jsing [Sat, 11 Apr 2015 16:23:34 +0000 (16:23 +0000)]
Add support for restarting rebuilds on RAID 5.

ok krw@

9 years agosync
deraadt [Sat, 11 Apr 2015 16:17:45 +0000 (16:17 +0000)]
sync

9 years agoSend OPENSSL_issetugid() straight to hell, no final cigarette.
deraadt [Sat, 11 Apr 2015 16:16:15 +0000 (16:16 +0000)]
Send OPENSSL_issetugid() straight to hell, no final cigarette.

The issetugid() API is supposed to make a strong promise where "0
means it is safe to look at the environment".  Way back in the past
someone on the OpenSSL team responded to the environment access danger
by creating a wrapper called OPENSSL_issetugid, and went to use it a
number of places.  However, by default on systems lacking true
issetugid(), OPENSSL_issetugid returns 0.  0 indicating safely.  False
safety.  Which means OPENSSL_issetugid() fails to make any sort of
promise about safety, in fact it is just the opposite.

Can you believe the OpenSSL team?

This nastiness was noticed over the years, however noone could gain traction
and get it fixed in OpenSSL.  Also see a paragraph about this in
http://www.tedunangst.com/flak/post/worst-common-denominator-programming

ok jsing

9 years agoRemove all getenv() calls, especially those wrapped by issetugid().
deraadt [Sat, 11 Apr 2015 16:03:21 +0000 (16:03 +0000)]
Remove all getenv() calls, especially those wrapped by issetugid().
getenv()'s wrapped by issetugid() are safe, but issetugid() is correct
difficult to impliment on many operating systems.  By accident, a grand
experiment was run over the last year, where issetugid() returned 1 (the
safe value) on a few operating systems.  Noone noticed & complained that
certain environment variables were not working.......
ok doug beck jsing, discussion with others

9 years agoPut back a goto end that was unintentionally removed.
jsing [Sat, 11 Apr 2015 15:41:57 +0000 (15:41 +0000)]
Put back a goto end that was unintentionally removed.

Spotted by doug@

9 years agoConvert openssl(1) pkeyparam to new option handling.
jsing [Sat, 11 Apr 2015 15:21:42 +0000 (15:21 +0000)]
Convert openssl(1) pkeyparam to new option handling.

9 years agoAlways check the return value of proc_composev_imsg() and handle failures
jsing [Sat, 11 Apr 2015 14:52:49 +0000 (14:52 +0000)]
Always check the return value of proc_composev_imsg() and handle failures
appropriately. Otherwise imsg construction can silently fail, resulting in
non-obvious problems.

Found the hard way by Theodore Wynnychenko.

ok doug@ florian@

9 years agoConvert lii(4) to if_input().
jsing [Sat, 11 Apr 2015 14:40:42 +0000 (14:40 +0000)]
Convert lii(4) to if_input().

ok mpi@

9 years agorename i915 interrupt handlers from *_intr back to *_irq_handler
jsg [Sat, 11 Apr 2015 14:39:37 +0000 (14:39 +0000)]
rename i915 interrupt handlers from *_intr back to *_irq_handler

9 years agothe hfsc pools are only used in hfsc.c, so move the init of them
dlg [Sat, 11 Apr 2015 13:00:12 +0000 (13:00 +0000)]
the hfsc pools are only used in hfsc.c, so move the init of them
there instead of pf_ioctl.c.

ok henning@

9 years agochange back to spinlock_t/DEFINE_SPINLOCK
jsg [Sat, 11 Apr 2015 05:10:13 +0000 (05:10 +0000)]
change back to spinlock_t/DEFINE_SPINLOCK

9 years agochange back to drm_free_large/drm_malloc_ab
jsg [Sat, 11 Apr 2015 04:36:10 +0000 (04:36 +0000)]
change back to drm_free_large/drm_malloc_ab

9 years agoadd/use max_t()
jsg [Sat, 11 Apr 2015 02:59:05 +0000 (02:59 +0000)]
add/use max_t()

9 years agoRename i915_gem_chipset_flush() to intel_gtt_chipset_flush()
jsg [Sat, 11 Apr 2015 02:24:43 +0000 (02:24 +0000)]
Rename i915_gem_chipset_flush() to intel_gtt_chipset_flush()
so we can use the inline definition of i915_gem_chipset_flush()
that avoids the flush entirely on gen >= 6.

9 years agoAxe vq_free_entry_locked
sf [Fri, 10 Apr 2015 20:00:26 +0000 (20:00 +0000)]
Axe vq_free_entry_locked

A leftover from netbsd

9 years agoFix typo in macro name
sf [Fri, 10 Apr 2015 19:59:19 +0000 (19:59 +0000)]
Fix typo in macro name

9 years agoDon't use pa_to_pvh() if we already have the page. Avoids an unused variable
kettenis [Fri, 10 Apr 2015 18:08:31 +0000 (18:08 +0000)]
Don't use pa_to_pvh() if we already have the page.  Avoids an unused variable
for non-DIAGNOSTIC kernels.

ok deraadt@

9 years agoThis changes vi to use resizeterm(3) instead of reinitializing curses on
brynet [Fri, 10 Apr 2015 18:05:51 +0000 (18:05 +0000)]
This changes vi to use resizeterm(3) instead of reinitializing curses on
window resizes, which was leaking massive amounts of memory.

Try observing vi in top(1) and while resizing the window a few times
before and aftering applying this diff..

Also some more comment cleanup and another memory leak..

From github.com/lichray/nvi2
879d2ad6dd4a4343eb0a588ebfe637e1c9845bc4
a8c38480adb030a05bbb2aafec6067dd65d8c2eb

ok millert@

9 years agoConvert to if_input().
mpi [Fri, 10 Apr 2015 16:04:47 +0000 (16:04 +0000)]
Convert to if_input().

Tested by Daniel Jakots, thanks!

9 years agoAdd a -x flag to copy-selection, append-selection and start-named-buffer
nicm [Fri, 10 Apr 2015 16:00:08 +0000 (16:00 +0000)]
Add a -x flag to copy-selection, append-selection and start-named-buffer
to prevent it exiting copy mode after copying. From J Raynor with a few
tweaks by me.

9 years agoI did quite some changes to this driver, so add copyright.
mpi [Fri, 10 Apr 2015 15:33:20 +0000 (15:33 +0000)]
I did quite some changes to this driver, so add copyright.

9 years agoreplace the use of ifqueues for most input queues serviced by netisr
dlg [Fri, 10 Apr 2015 13:58:20 +0000 (13:58 +0000)]
replace the use of ifqueues for most input queues serviced by netisr
with niqueues.

this change is so big because there's a lot of code that takes
pointers to different input queues (eg, ether_input picks between
ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through
to code to enqueue packets against the pointer. if i changed only
one of the input queues id have to add sepearate code paths, one
for ifqueues and one for niqueues in each of these places

by flipping all these input queues at once i can keep the currently
common code common.

testing by mpi@ sthen@ and rafael zalamena
ok mpi@ sthen@ claudio@ henning@

9 years agoFull-speed isochronous transfers support with opportunistic micro-frames
mpi [Fri, 10 Apr 2015 13:56:42 +0000 (13:56 +0000)]
Full-speed isochronous transfers support with opportunistic micro-frames
scheduling.

More work is required to properly budget and schedule micro-frames, most
of it at the HUB level.  But this let people use USB1.1 uaudio(4) devices
on ehci(4)-only systems.

Thanks to all the testers!

ok ratchov@, sthen@, naddy@

9 years agoreplace the guts of tdb_hash with SipHash24
dlg [Fri, 10 Apr 2015 12:31:55 +0000 (12:31 +0000)]
replace the guts of tdb_hash with SipHash24

tested by (including some statistical measurement) and ok mikeb@

9 years agoMove irqs_disabled() and in_dbg_master() out of the i386/amd64 ifdef block
jsg [Fri, 10 Apr 2015 12:06:52 +0000 (12:06 +0000)]
Move irqs_disabled() and in_dbg_master() out of the i386/amd64 ifdef block
and change drm_can_sleep() to only use in_atomic() on i386/amd64 as
it isn't defined for other archs currently.  Unbreaks the sparc64 build.
Found the hard way by benoit@

9 years agompi@ introduced a ph_cookie in mbuf packet headers that can be used
dlg [Fri, 10 Apr 2015 11:02:12 +0000 (11:02 +0000)]
mpi@ introduced a ph_cookie in mbuf packet headers that can be used
by a subsystem to stash some state while the mbuf gets queued. eg,
net80211 uses it to keep track of the wireless node associated with
a packet before submitting it to a drivers snd queue for transmission.

this makes pipex use ph_cookie to keep track of the pipex session
associated with a packet before submitting it to the softint queues.
this lets us get rid of an mbuf tag type, and avoids the cost of
tag allocation.

ok yasuoka@

9 years agoRun detach hook and similar before cleaning up any other resource when
mpi [Fri, 10 Apr 2015 08:48:24 +0000 (08:48 +0000)]
Run detach hook and similar before cleaning up any other resource when
an interface is destroyed/removed.  This way we can ensure pseudo-driver
changes done after attaching an interface are undone before detaching it.

Note: it is safe to call if_deactivate() multiple times as the interface
should not have any attached pseudo-interface after the first call.

ok deraadt@, dlg@

9 years agoAdd support for CRC-enabled elantech v3 touchpads.
stsp [Fri, 10 Apr 2015 08:48:08 +0000 (08:48 +0000)]
Add support for CRC-enabled elantech v3 touchpads.
Patch by Fasse <fasse.f2@gmail.com>
ok mpi@

9 years agoConvert remaining USB Ethernet adapter to if_input().
mpi [Fri, 10 Apr 2015 08:41:43 +0000 (08:41 +0000)]
Convert remaining USB Ethernet adapter to if_input().

ok dlg@

9 years agoin the case -> in this case.
nicm [Fri, 10 Apr 2015 07:23:14 +0000 (07:23 +0000)]
in the case -> in this case.

9 years agoeverything else is gone, so remove the man pages too;
jmc [Fri, 10 Apr 2015 07:06:30 +0000 (07:06 +0000)]
everything else is gone, so remove the man pages too;

9 years agoUse mdelay(x) instead of delay(x * 1000) for drm_msleep() to better
jsg [Fri, 10 Apr 2015 06:00:39 +0000 (06:00 +0000)]
Use mdelay(x) instead of delay(x * 1000) for drm_msleep() to better
deal with long delays.

9 years agoMake drm_can_sleep() match linux. No change in behaviour as it's
jsg [Fri, 10 Apr 2015 05:52:09 +0000 (05:52 +0000)]
Make drm_can_sleep() match linux.  No change in behaviour as it's
only ever used to decide between mdelay and drm_msleep and our
drm_msleep delays instead of sleeping.

9 years agoadd irqs_disabled() and in_dbg_master() using cold and db_is_active
jsg [Fri, 10 Apr 2015 05:31:25 +0000 (05:31 +0000)]
add irqs_disabled() and in_dbg_master() using cold and db_is_active

9 years agoDon't send hostkey advertisments (hostkeys-00@openssh.com) to current
dtucker [Fri, 10 Apr 2015 05:16:50 +0000 (05:16 +0000)]
Don't send hostkey advertisments (hostkeys-00@openssh.com) to current
versions of Tera Term as they can't handle them.  Newer versions should
be OK.  Patch from Bryan Drewery and IWAMOTO Kouichi, ok djm@

9 years agodont inherit the parent interfaces hardmtu as the vlan interfaces
dlg [Fri, 10 Apr 2015 02:08:08 +0000 (02:08 +0000)]
dont inherit the parent interfaces hardmtu as the vlan interfaces
mtu when it gets set up. instead, allow the vlan interfaces mtu to
be raised to the parents hardmtu in SIOCSIFMTU handling.

pointed out by claudio@

9 years agoinclude port number if a non-default one has been specified;
djm [Fri, 10 Apr 2015 00:08:55 +0000 (00:08 +0000)]
include port number if a non-default one has been specified;
based on patch from Michael Handler

9 years agosync
deraadt [Thu, 9 Apr 2015 23:11:36 +0000 (23:11 +0000)]
sync

9 years agokflag and wflag don't need to be counters; wflag only needs to know if
okan [Thu, 9 Apr 2015 19:48:25 +0000 (19:48 +0000)]
kflag and wflag don't need to be counters; wflag only needs to know if
greater than 0 for its one test case.

ok deraadt

9 years agoBoth more and less accept options beginning with '+'.
millert [Thu, 9 Apr 2015 19:37:35 +0000 (19:37 +0000)]
Both more and less accept options beginning with '+'.
From Tim van der Molen

9 years agoIf looking up a string which looks like a gTLD, doesn't match a known set of
sthen [Thu, 9 Apr 2015 19:29:53 +0000 (19:29 +0000)]
If looking up a string which looks like a gTLD, doesn't match a known set of
existing ones not using the new standard hostnames, and whois.nic.TLD exists,
head straight there for lookups rather than using whois-servers.net (who have
been a bit variable in their speed of picking up new zones). Bug spotted by
giovanni@ and jasper@, ok giovanni@

9 years agoSend lmc(4) and san(4) to the HDLC framed bit bucket in the sky.
deraadt [Thu, 9 Apr 2015 18:58:22 +0000 (18:58 +0000)]
Send lmc(4) and san(4) to the HDLC framed bit bucket in the sky.

9 years agoMake the sparc64 pmap (more) mpsafe by protecting both the pmap itself and the
kettenis [Thu, 9 Apr 2015 16:56:52 +0000 (16:56 +0000)]
Make the sparc64 pmap (more) mpsafe by protecting both the pmap itself and the
pv lists with a mutex.  Some minor code adjustments to prevent holding locks
too long.  This should make pmap_enter(9), pmap_remove(9) and
pmap_page_protect(9) safe to use without holding the kernel lock.

9 years agoRevert previous as this breaks stuff.
florian [Thu, 9 Apr 2015 16:48:29 +0000 (16:48 +0000)]
Revert previous as this breaks stuff.
I fscked up the testing, sorry!
Found the hard way by jsg@

9 years agoPlug a memory leak in pfr_destroy_kentry
mikeb [Thu, 9 Apr 2015 12:04:14 +0000 (12:04 +0000)]
Plug a memory leak in pfr_destroy_kentry

pfi_kif objects allocated for table entries created by route-to or
by specifying weight weren't garbage collected when the table entry
was destroyed.

Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>,
thanks!  Ok henning, florian