Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (4h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 03:13:24 UTC Now

2018-04-08 13:19:17 UTC MAIN commitmail json YAML

2018-04-08 12:18:06 UTC MAIN commitmail json YAML

Remove the ipre_mlast field and the TRAVERSE macro.

The goal was to store in ipre_mlast the last mbuf of the chain, so that
m_cat could be called on it. But it's not needed, since m_cat already
does the equivalent of TRAVERSE itself.

If it were needed, there would be a bug, since we don't call TRAVERSE on
ipre_mlast when creating a new reassembly entry.

(maxv)

2018-04-08 11:57:43 UTC MAIN commitmail json YAML

Avoid rounding errors for timeout values.

(mlelstv)

2018-04-08 11:50:46 UTC MAIN commitmail json YAML

Remove unused field, and sync comment with reality.

(maxv)

2018-04-08 11:46:13 UTC MAIN commitmail json YAML

expose pmf debug switches with sysctl.

(mlelstv)

2018-04-08 11:43:01 UTC MAIN commitmail json YAML

limits are bytes, vm sizes are clicks.

(mlelstv)

2018-04-08 11:37:31 UTC MAIN commitmail json YAML

Re-evaluate drive selection to catch hog-plug devices.

(mlelstv)

2018-04-08 10:56:05 UTC MAIN commitmail json YAML

Delete a leading space (` ').

Noticed via `NetBSD Code Changes' RSS feed that merged the last two news
entries.

(leot)

2018-04-08 09:19:27 UTC MAIN commitmail json YAML

Remove the call to vfp_fpscr_handler() from vfp_handler(). It actually never
avoids a full FPU switch, and costs a function call and a few tests.

Discussed on port-arm@ on october 2017:
http://mail-index.netbsd.org/port-arm/2017/10/16/msg004411.html

(bouyer)

2018-04-08 08:57:37 UTC MAIN commitmail json YAML

Move NPF's todo list into src/doc/TODO.npf, and add some entries. After a
conversation (two months ago) with rmind and sborrill.

(maxv)

2018-04-08 06:22:03 UTC netbsd-8 commitmail json YAML

2018-04-08 06:14:18 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #705):
sys/arch/amd64/amd64/trap.c: 1.113
Mmh. We shouldn't read %cr2 here. %cr2 is initialized by the CPU only
during page faults (T_PAGEFLT), so here we're reading a value that comes
from a previous page fault.
That's a real problem; if you launch an unprivileged process, set up a
signal handler, make it sleep 10 seconds, and trigger a T_ALIGNFLT fault,
you get in si_addr the address of another LWP's page - and perhaps this
can be used to defeat userland ASLR.
This bug has been there since 2003.

(snj)

2018-04-08 06:12:53 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by mlelstv in ticket #704):
sys/arch/evbarm/rpi/rpi_machdep.c: 1.81
Firmware after May 8, 2017 places APs in WFE state at boot. Add a "sev"
after writing the start vector, otherwise secondary CPUs will not boot.

(snj)

2018-04-08 06:11:41 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by mlelstv in ticket #703):
sys/dev/scsipi/st.c: 1.234
sys/dev/scsipi/stvar.h: 1.26
Use separate lock to protect internal state and release locks when
calling biodone.

(snj)

2018-04-08 06:10:24 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #702):
sys/miscfs/procfs/procfs_vnops.c: 1.203
Lock the target cwdi and take an additional reference to the
vnode we are interested in to prevent it from disappearing
before getcwd_common().
Should fix PR kern/53096 (netbsd-8 crash on heavy disk I/O)

(snj)

2018-04-08 06:09:12 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #701):
sys/netinet/in.c: 1.227
sys/netinet6/in6.c: 1.265
tests/net/arp/t_arp.sh: 1.35-1.36
Make GARP work again when DAD is disabled
The change avoids setting an IP address tentative on initializing it when
the IPv4 DAD is disabled (net.inet.ip.dad_count=0), which allows a GARP packet
to be sent (see arpannounce).  This is the same behavior of NetBSD 7, i.e.,
before introducing the IPv4 DAD.
Additionally do the same change to IPv6 DAD for consistency.
The change is suggested by roy@
--
Improve packet checks and error reporting
--
Add tests for GARP without DAD
Additionally make the existing tests for GARP more explicit.

(snj)

2018-04-08 06:06:07 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by nonaka in ticket #700):
sys/dev/acpi/acpi_mcfg.c: 1.6
Change the iteration, to make sure the ACPI_MCFG_ALLOCATION structure we're
reading fits the table we allocated. Linux does the same.
I have a laptop which, for some reason, reports a table size of 62 bytes.
Clearly that's incorrect, it should be 60 (44 + 16). Because of the stray
+2, here the kernel reads past the end of the allocated buffer, hits an
unmapped VA, and panics at boot time. So the laptop can't boot.
Now it boots fine.

(snj)

2018-04-08 06:04:09 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #699):
bin/ed/ed.1: 1.32-1.33
bin/ed/main.c: 1.29
usr.bin/patch/pch.c: 1.29
Pass -S to ed(1) so that patches containing ! commands don't run commands.
Real cause of CVE-2018-0492:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894667)
--
add -S to disable ! commands.
--
Fix date.

(snj)

2018-04-08 06:01:04 UTC MAIN commitmail json YAML

fix date

(snj)

2018-04-08 05:54:40 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by joerg in ticket #698):
external/gpl3/binutils/dist/bfd/elflink.c: 1.14
When trying to decide the status of a weak symbol, resolve any
indirectness first. In the case of various Qt5 libraries, __bss_start
ends up with a Qt5 version, but it has to be resolved first to match the
actual (implicit) definition. This fixes the root cause of pkg/53089.

(snj)

2018-04-08 05:51:46 UTC MAIN commitmail json YAML

Fix bug I introduced in previous commit.

(maxv)

2018-04-08 01:30:01 UTC MAIN commitmail json YAML

2018-04-08 00:52:38 UTC MAIN commitmail json YAML

turn on GCC spectre v2 mitigation options.

XXX: amd64 ALL doesn't build for me right now

(mrg)

2018-04-07 22:41:55 UTC MAIN commitmail json YAML

2018-04-07 22:40:00 UTC MAIN commitmail json YAML

2018-04-07 22:39:31 UTC MAIN commitmail json YAML

2018-04-07 22:37:30 UTC MAIN commitmail json YAML

2018-04-07 22:34:51 UTC MAIN commitmail json YAML

2018-04-07 22:31:38 UTC MAIN commitmail json YAML

2018-04-07 22:23:27 UTC MAIN commitmail json YAML

2018-04-07 22:17:52 UTC MAIN commitmail json YAML

fix the grep pattern for inside a makefile.  fixes build issue
reported by thorpej on tech-toolchain - we both found the same
fix around the same time.

XXX: kamil says solaris-type hosts will fail here as they need
XXX: 'egrep' not 'grep -E'.

(mrg)

2018-04-07 21:38:30 UTC MAIN commitmail json YAML

switch vax to GCC 6.  thanks to Krister and Maya for the fixes.
it now appears as disfunctional as GCC 5 for vax.  ok ragge@.

this was the final GCC 5 platform in -current.  hooray!

(mrg)

2018-04-07 21:20:45 UTC MAIN commitmail json YAML

2018-04-07 21:19:32 UTC MAIN commitmail json YAML

2018-04-07 19:39:19 UTC MAIN commitmail json YAML

actually do what the previous change said:
don't turn on the new 'SPECTRE_V2_GCC_MITIGATION' option yet.

(mrg)

2018-04-07 19:38:06 UTC MAIN commitmail json YAML

2018-04-07 19:28:32 UTC MAIN commitmail json YAML

2018-04-07 19:18:44 UTC MAIN commitmail json YAML

2018-04-07 19:18:16 UTC MAIN commitmail json YAML

put back handling for SIOCGIFAFLAG_IN -- should not matter.

(christos)

2018-04-07 19:13:27 UTC MAIN commitmail json YAML

When we advertise interfaces, don't skip if we are not autotargetting services
yet. It is the chicken and the egg problem.

(christos)

2018-04-07 19:09:12 UTC MAIN commitmail json YAML

Allow overriding checking for debug functions

(christos)

2018-04-07 18:35:01 UTC MAIN commitmail json YAML

Move sunxidep to pass5, it has to attach before simplefb

(bouyer)

2018-04-07 18:12:51 UTC MAIN commitmail json YAML

Enable the display engine devices. Note that even if they attaches,
they will be active only if a proper display engine pipeline entry
is present in the device tree.

(bouyer)

2018-04-07 18:09:34 UTC MAIN commitmail json YAML

Allow the graphic driver to be the kernel's console.
Match either from the allwinner,pipeline entry in the simple-framebuffer
fdt entry, or from console= from the command line.
console=fb0 and console=fb1 selects display backend unit 0 or 1 respectively;
console=fb selects the first activated display backend.

(bouyer)

2018-04-07 18:06:27 UTC MAIN commitmail json YAML

Handle 'console=serial' passed from the bootargs. ok jmcneill@

(bouyer)

2018-04-07 18:05:08 UTC MAIN commitmail json YAML

Allow to remove entries from the fdt, either by handle or
by compatible string. Proposed on tech-kern and port-arm, ok jmcneill@

(bouyer)

2018-04-07 15:50:58 UTC MAIN commitmail json YAML

2018-04-07 15:49:52 UTC MAIN commitmail json YAML

Merge conflicts; STA methods and fields are not present anymore.

(christos)

2018-04-07 13:57:12 UTC MAIN commitmail json YAML

function grew an extra argument now.

(christos)

2018-04-07 13:48:50 UTC MAIN commitmail json YAML

2018-04-07 13:42:42 UTC MAIN commitmail json YAML

Lock the target cwdi and take an additional reference to the
vnode we are interested in to prevent it from disappearing
before getcwd_common().

Should fix PR kern/53096 (netbsd-8 crash on heavy disk I/O)

(hannken)

2018-04-07 12:36:58 UTC MAIN commitmail json YAML

2018-04-07 09:20:25 UTC MAIN commitmail json YAML

Fix an inverted logic.

nbuf_cksum_barrier returns true when the direction is PFIL_OUT and TSO is
active; that is to say, it returns true when the checksum was already
recomputed by the function.

The check should be !nbuf_cksum_barrier, because otherwise we're wrongfully
checksumming twice, and it causes the packet to be kicked later in
tcp_input.

This can be seen with a configuration of the type:

procedure "norm" {
normalize: "max-mss" 15000
}
group default {
pass all apply "norm"
}

The packets systematically get dropped because the checksum validation in
tcp_input fails. With this patch in place, it works.

(maxv)

2018-04-07 09:06:27 UTC MAIN commitmail json YAML

Rewrite npf_fetch_tcpopts:

* Instead of doing several nbuf_advance/nbuf_ensure_contig and
  playing with gotos, fetch the TCP options only once, and iterate over
  the (safe) area. The code is similar to tcp_dooptions.

* When handling TCPOPT_MAXSEG and TCPOPT_WINDOW, ensure the length is
  the one we're expecting. If it isn't, then skip the option. This
  wasn't done before, and not doing it allowed a packet to bypass the
  max-mss clamping procedure. Discussed on tech-net@.

(maxv)

2018-04-07 04:12:21 UTC pgoyette-compat commitmail json YAML

src/bin/ed/ed.1@1.31.4.1 / diff / nxr@1.31.4.1
src/bin/ed/main.c@1.28.14.1 / diff / nxr@1.28.14.1
src/build.sh@1.324.2.1 / diff / nxr@1.324.2.1
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c@1.27.2.1 / diff / nxr@1.27.2.1
src/crypto/dist/ipsec-tools/src/racoon/debugrm.c@1.3.86.1 / diff / nxr@1.3.86.1
src/crypto/dist/ipsec-tools/src/racoon/debugrm.h@1.4.86.1 / diff / nxr@1.4.86.1
src/crypto/external/bsd/heimdal/dist/kcm/cache.c@1.3.10.1 / diff / nxr@1.3.10.1
src/crypto/external/bsd/heimdal/dist/kcm/glue.c@1.2.10.1 / diff / nxr@1.2.10.1
src/crypto/external/bsd/netpgp/dist/include/netpgp.h@1.21.48.1 / diff / nxr@1.21.48.1
src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3@1.16.24.1 / diff / nxr@1.16.24.1
src/crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3@1.4.24.1 / diff / nxr@1.4.24.1
src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3@1.7.24.1 / diff / nxr@1.7.24.1
src/crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1@1.11.10.1 / diff / nxr@1.11.10.1
src/crypto/external/bsd/openssh/Makefile.inc@1.13.2.1 / diff / nxr@1.13.2.1
src/crypto/external/bsd/openssh/bin/ssh/Makefile@1.13.2.1 / diff / nxr@1.13.2.1
src/crypto/external/bsd/openssh/dist/PROTOCOL@1.10.2.1 / diff / nxr@1.10.2.1
src/crypto/external/bsd/openssh/dist/PROTOCOL.certkeys@1.8.2.1 / diff / nxr@1.8.2.1
src/crypto/external/bsd/openssh/dist/auth-options.c@1.16.2.1 / diff / nxr@1.16.2.1
src/crypto/external/bsd/openssh/dist/auth-options.h@1.9.2.1 / diff / nxr@1.9.2.1
src/crypto/external/bsd/openssh/dist/auth-pam.c@1.13.2.1 / diff / nxr@1.13.2.1
      :
(more 1226 files)
Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

(pgoyette)

2018-04-07 00:41:16 UTC MAIN commitmail json YAML

support xmss keys

(christos)

2018-04-07 00:36:55 UTC MAIN commitmail json YAML

2018-04-07 00:26:12 UTC MAIN commitmail json YAML

2018-04-07 00:22:27 UTC MAIN commitmail json YAML

2018-04-07 00:19:54 UTC MAIN commitmail json YAML

2018-04-06 23:08:23 UTC MAIN commitmail json YAML

2018-04-06 23:04:46 UTC MAIN commitmail json YAML

src/crypto/external/bsd/openssl/dist/CHANGES@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/Configure@1.19 / diff / nxr@1.19
src/crypto/external/bsd/openssl/dist/NEWS@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/README@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/apps/ca.c@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/apps/ocsp.c@1.14 / diff / nxr@1.14
src/crypto/external/bsd/openssl/dist/apps/openssl.c@1.3 / diff / nxr@1.3
src/crypto/external/bsd/openssl/dist/apps/s_client.c@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/apps/s_server.c@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/apps/s_time.c@1.8 / diff / nxr@1.8
src/crypto/external/bsd/openssl/dist/apps/speed.c@1.13 / diff / nxr@1.13
src/crypto/external/bsd/openssl/dist/crypto/asn1/a_strex.c@1.6 / diff / nxr@1.6
src/crypto/external/bsd/openssl/dist/crypto/asn1/asn_mime.c@1.9 / diff / nxr@1.9
src/crypto/external/bsd/openssl/dist/crypto/asn1/tasn_dec.c@1.8 / diff / nxr@1.8
src/crypto/external/bsd/openssl/dist/crypto/bio/bio_lib.c@1.4 / diff / nxr@1.4
src/crypto/external/bsd/openssl/dist/crypto/bio/bss_file.c@1.9 / diff / nxr@1.9
src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c@1.7 / diff / nxr@1.7
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gcc.c@1.8 / diff / nxr@1.8
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c@1.15 / diff / nxr@1.15
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c@1.7 / diff / nxr@1.7
      :
(more 49 files)
merge conflicts

(christos)

2018-04-06 22:11:52 UTC MAIN commitmail json YAML

in rtwn_attach(): return; before unconditionally running into fail:

(macallan)

2018-04-06 19:57:03 UTC MAIN commitmail json YAML

- use c99 initializers
- add kdc offset functions

(christos)

2018-04-06 19:56:43 UTC MAIN commitmail json YAML

don't forget to initialize the kdc_offset (it was random before)

(christos)

2018-04-06 19:01:30 UTC MAIN commitmail json YAML

2018-04-06 19:00:08 UTC MAIN commitmail json YAML

2018-04-06 18:59:00 UTC MAIN commitmail json YAML

2018-04-06 17:30:25 UTC MAIN commitmail json YAML

Change the iteration, to make sure the ACPI_MCFG_ALLOCATION structure we're
reading fits the table we allocated. Linux does the same.

I have a laptop which, for some reason, reports a table size of 62 bytes.
Clearly that's incorrect, it should be 60 (44 + 16). Because of the stray
+2, here the kernel reads past the end of the allocated buffer, hits an
unmapped VA, and panics at boot time. So the laptop can't boot.

Now it boots fine.

(maxv)

2018-04-06 17:04:00 UTC MAIN commitmail json YAML

note to get rid of statfs() when bump time comes

(dholland)

2018-04-06 16:03:16 UTC MAIN commitmail json YAML

Make GARP work again when DAD is disabled

The change avoids setting an IP address tentative on initializing it when the
IPv4 DAD is disabled (net.inet.ip.dad_count=0), which allows a GARP packet to be
sent (see arpannounce).  This is the same behavior of NetBSD 7, i.e., before
introducing the IPv4 DAD.

Additionally do the same change to IPv6 DAD for consistency.

The change is suggested by roy@

(ozaki-r)

2018-04-06 16:01:16 UTC MAIN commitmail json YAML

Revert the previous two commits as per roy@'s request

It broke the ip_dad_count > 0 case unexpectedly.

(ozaki-r)

2018-04-06 15:47:08 UTC MAIN commitmail json YAML

when CPPFLAGS include a parameter that has any spaces (e.g. CPPFLAGS="-DBN_LLONG=\"long long\""),
$CPP $CPPFLAGS fails. (aarch64--netbsd-clang: error: no such file or directory: 'long"')

advice to use "eval" by soda@. thanks.

(ryo)

2018-04-06 14:50:55 UTC MAIN commitmail json YAML

If we're trying to read the mss on a packet that for some reason has two
MAXSEG options, we find ourselves patching the second option with the
value of the first one.

Fix that by using a local variable.

(maxv)

2018-04-06 10:48:44 UTC MAIN commitmail json YAML

Note import of dhcpcd-7.0.3

(roy)

2018-04-06 10:47:47 UTC MAIN commitmail json YAML

2018-04-06 10:38:53 UTC MAIN commitmail json YAML

Fix unexpected failure when ipsecif(4) over IPv6 is changed port number only.

Here is an example of the operation which causes this problem.
    # ifconfig ipsec0 create link0
    # ifconfig ipsec0 tunnel fc00:1001::2,4500 fc00:1001::1,4501
    # ifconfig ipsec0 tunnel fc00:1001::2,4500 fc00:1001::1,4502

(knakahara)

2018-04-06 10:31:35 UTC MAIN commitmail json YAML

Add IPv4 ID when the ipsecif(4) packet can be fragmented. Implemented by hsuenaga@IIJ and ohishi@IIJ, thanks.

This modification reduces packet loss of fragmented packets on a
network where reordering occurs.

Alghough this modification has been applied, IPv4 ID is not set for
the packet smaller then IP_MINFRAGSIZE. According to RFC 6864, that
must not cause problems.

XXX pullup-8

(knakahara)

2018-04-06 09:30:09 UTC MAIN commitmail json YAML

fix ipsecif(4) stack overflow.

XXX pullup-8

(knakahara)

2018-04-06 09:28:26 UTC MAIN commitmail json YAML

fix ipsecif(4) unmatch curlwp_bind.

XXX pullup-8

(knakahara)

2018-04-06 09:24:13 UTC MAIN commitmail json YAML

fix ipsec(4) encap_lock leak.

XXX pullup-8

(knakahara)

2018-04-06 09:23:36 UTC MAIN commitmail json YAML

Add tests for GARP without DAD

Additionally make the existing tests for GARP more explicit.

(ozaki-r)

2018-04-06 09:22:38 UTC MAIN commitmail json YAML

Show outputs of commands if $DEBUG

(ozaki-r)

2018-04-06 09:21:57 UTC MAIN commitmail json YAML

Improve packet checks and error reporting

(ozaki-r)

2018-04-06 09:20:29 UTC MAIN commitmail json YAML

Don't set IN_IFF_* flags to ia4_flags if DAD is disabled

This fix allows that a GARP packet is sent when adding an IP address to an
interface with IFF_UP on a kernel with IPv4 DAD is disabled
(net.inet.ip.dad_count=0), which is the same behavior of NetBSD 7, i.e.,
before introducing the IPv4 DAD.

(ozaki-r)

2018-04-06 09:19:16 UTC MAIN commitmail json YAML

Simplify; clear then set flags to ia4_flags (NFCI)

(ozaki-r)

2018-04-06 08:23:40 UTC MAIN commitmail json YAML

Fix bad cut'n'paste, pointed out by David Binderman in PR port-arm/53158

(bouyer)

2018-04-05 22:38:58 UTC MAIN commitmail json YAML

switch m68000 and m68k to GCC 6.  ok mlelstv.

(mrg)

2018-04-05 18:50:10 UTC MAIN commitmail json YAML

Pass -S to ed(1) so that patches containing ! commands don't run commands.
Real cause of CVS-2018-0492:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894667)

(christos)

2018-04-05 18:44:57 UTC MAIN commitmail json YAML

add -S to disable ! commands.

(christos)

2018-04-05 18:18:00 UTC netbsd-8 commitmail json YAML

2018-04-05 18:15:03 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #696):

sys/arch/amd64/amd64/vector.S: revision 1.62 (patch)
sys/arch/x86/include/intr.h: revision 1.55
sys/arch/i386/i386/vector.S: revision 1.77
sys/arch/i386/i386/db_interface.c: revision 1.82 (patch)
sys/arch/amd64/amd64/spl.S: revision 1.34 (patch)
sys/arch/amd64/amd64/db_interface.c: revision 1.33 (patch)
sys/arch/x86/x86/intr.c: revision 1.125
sys/arch/i386/i386/spl.S: revision 1.43 (patch)
sys/arch/i386/i386/machdep.c: revision 1.805 (patch)
sys/arch/x86/x86/lapic.c: revision 1.66 (patch)

Rename the DDB IPI IDT vectors for consistency. ok maxv@

Rename Xpreempt{recurse,resume} -> X{recurse,resume}_preempt so that
they fit the pattern. Also the debugger trap sniffer matches them
without adding special entries...

XXX: pullup-8.

(martin)

2018-04-05 16:31:54 UTC MAIN commitmail json YAML

Appease the compiler gods; yes I know what I am doing adding to a literal
string.

(christos)

2018-04-05 15:04:29 UTC MAIN commitmail json YAML

Set the "method" string at boot time too.

(maxv)

2018-04-05 14:42:36 UTC netbsd-8 commitmail json YAML

2018-04-05 14:41:07 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #697):

sys/net/route.c: revision 1.208

Kill remaining rt->rt_refcnt++

(martin)

2018-04-05 14:33:42 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #695):

sys/kern/uipc_mbuf.c: revision 1.182
sys/netinet6/frag6.c: revision 1.67
sys/netinet/ip_reass.c: revision 1.14
sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

(martin)

2018-04-05 14:31:19 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #694):

sys/netinet6/ip6_etherip.c: revision 1.22
sys/net/if_etherip.c: revision 1.41
sys/net/if_etherip.c: revision 1.42
sys/netinet/ip_etherip.c: revision 1.21

Don't call if_attach, do if_initialize+if_register, otherwise when an
EtherIP packet is received the first KASSERT in if_input() fires.

A few fixes:
* Style.
* Don't add M_PKTHDR manually, that's absolutely forbidden. Add a
  KASSERT to make sure it's already there.
* Add a missing NULL check after m_pullup.

(martin)

2018-04-05 14:14:27 UTC MAIN commitmail json YAML

Hum, don't let userland set bit 13, because this can crash the kernel.

(maxv)

2018-04-05 14:11:20 UTC MAIN commitmail json YAML

Fix the check, should be >=.

(maxv)

2018-04-05 11:54:36 UTC netbsd-7-0 commitmail json YAML

2018-04-05 11:53:03 UTC netbsd-7-0 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1594):

sys/kern/uipc_mbuf.c: revision 1.182
sys/netinet6/frag6.c: revision 1.67
sys/netinet/ip_reass.c: revision 1.14
sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

(martin)

2018-04-05 11:52:22 UTC netbsd-7-1 commitmail json YAML

2018-04-05 11:50:17 UTC netbsd-7-1 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1594):

sys/kern/uipc_mbuf.c: revision 1.182
sys/netinet6/frag6.c: revision 1.67
sys/netinet/ip_reass.c: revision 1.14
sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

(martin)

2018-04-05 11:49:19 UTC netbsd-7 commitmail json YAML

2018-04-05 11:48:13 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1594):

sys/kern/uipc_mbuf.c: revision 1.182
sys/netinet6/frag6.c: revision 1.67
sys/netinet/ip_reass.c: revision 1.14
sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

(martin)

2018-04-05 11:44:57 UTC netbsd-7-0 commitmail json YAML

2018-04-05 11:43:51 UTC netbsd-7-0 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1593:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:43:08 UTC netbsd-7-1 commitmail json YAML

2018-04-05 11:42:36 UTC netbsd-7-1 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1593:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:42:03 UTC netbsd-7 commitmail json YAML

2018-04-05 11:41:28 UTC netbsd-7 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1593:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:40:14 UTC netbsd-6-0 commitmail json YAML

2018-04-05 11:38:36 UTC netbsd-6-0 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1542:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:36:31 UTC netbsd-6-1 commitmail json YAML

2018-04-05 11:35:58 UTC netbsd-6-1 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1542:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:35:09 UTC netbsd-6 commitmail json YAML

2018-04-05 11:34:17 UTC netbsd-6 commitmail json YAML

Pullup the following revision, requested by maxv in ticket #1542:

sys/net/npf/npf.h 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:
        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)
Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-05 11:07:00 UTC MAIN commitmail json YAML

Use mdoc macros.

(wiz)

2018-04-05 10:21:39 UTC MAIN commitmail json YAML

Remove AWIN_DEBE_FWINIT blocks

(jmcneill)

2018-04-05 10:19:25 UTC MAIN commitmail json YAML

Remove NAWIN_MP blocks (this code was experimental in the original driver and is not worth porting over)

(jmcneill)

2018-04-05 08:43:07 UTC MAIN commitmail json YAML

Call cpu_speculation_init on i386 too. We don't have IBRS for i386, but
we do have the AMD DIS_IND method.

(maxv)

2018-04-05 05:38:59 UTC MAIN commitmail json YAML

pretty much everything depends upon insn-opinit.h via optabs-query.h
so set it in DPSRCS.  hopefully this fixes PR 53137.

(mrg)

2018-04-05 03:39:14 UTC MAIN commitmail json YAML

Kill remaining rt->rt_refcnt++

(ozaki-r)

2018-04-05 00:31:11 UTC MAIN commitmail json YAML

Be more selective about detecting a SYSV include as opposed to a dependency
line. Dependency lines should contain a '::' operator or ':<space>'.

(christos)

2018-04-04 23:53:26 UTC MAIN commitmail json YAML

Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.

(kamil)

2018-04-04 23:51:35 UTC MAIN commitmail json YAML

Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.

(kamil)

2018-04-04 22:52:59 UTC MAIN commitmail json YAML

Rename Xpreempt{recurse,resume} -> X{recurse,resume}_preempt so that
they fit the pattern. Also the debugger trap sniffer matches them
without adding special entries...
XXX: pullup-8.

(christos)

2018-04-04 21:39:35 UTC MAIN commitmail json YAML

2018-04-04 16:42:48 UTC MAIN commitmail json YAML

Sort files in usr/tests/usr.bin/c++/

No functional change intended.

(kamil)

2018-04-04 16:42:03 UTC netbsd-8 commitmail json YAML

2018-04-04 16:40:42 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #693):

sys/net/npf/npf.h: revision 1.55

Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to
bypass a certain number of filtering rules.

Basically there is an integer overflow in npf_cache_ip: npc_hlen is a
8bit unsigned int, and can wrap to zero if the IPv6 packet being processed
has large extensions.

As a result of an overflow, (mbuf + npc_hlen) won't point at the real
protocol header, but instead at some garbage within the packet. That
garbage, is what NPF applies its rules on.

If these filtering rules allow the packet to enter, that packet is given
to the main IPv6 entry point. This entry point, however, is not subject to
an integer overflow, so it will actually parse the correct protocol header.

The result is: NPF read a wrong header, allowed the packet to enter, the
kernel read the correct header, and delivered the packet depending on this
correct header. So the offending packet was supposed to be kicked, but
still went through the firewall.

Simple example, a packet with:

        packet +  0 = IP6 Header
        packet +  40 = IP6 Routing header (ip6r_len = 31)
        packet +  48 = Crafted UDP header (uh_dport = 7777)
        packet + 296 = IP6 Dest header (ip6e_len = 0)
        packet + 304 = Real UDP header (uh_dport = 6666)

Will bypass a rule of the kind "block port 6666". Here NPF reads the
crafted UDP header, sees 7777, lets the packet in; later the kernel reads
the real UDP header, and delivers it on port 6666.

Fix this by using uint32_t. While here, it seems to me there is also a
memory overflow: still in npf_cache_ip, npc_hlen may be incremented with
a value that goes beyond the mbuf.

(martin)

2018-04-04 16:34:39 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by nonaka in ticket #692):

sys/arch/i386/stand/efiboot/devopen.c: revision 1.4
sys/arch/i386/stand/efiboot/efidisk.c: revision 1.5
sys/arch/i386/stand/efiboot/devopen.h: revision 1.2
sys/arch/i386/stand/efiboot/efidisk.h: revision 1.3
sys/lib/libsa/bootcfg.h: revision 1.2
sys/arch/i386/stand/efiboot/boot.c: revision 1.9
sys/lib/libsa/bootcfg.c: revision 1.3
sys/arch/i386/stand/lib/bootmenu.c: revision 1.17
sys/arch/i386/stand/lib/biosdisk.c: revision 1.49
sys/arch/i386/stand/efiboot/TODO.efiboot: revision 1.5
sys/arch/i386/stand/lib/bootmenu.h: revision 1.6
sys/arch/i386/stand/lib/biosdisk.h: revision 1.10

efiboot: try to read boot.cfg from /EFI/NetBSD on ESP of the booted disk.

(martin)

2018-04-04 16:29:24 UTC netbsd-8 commitmail json YAML

2018-04-04 16:25:23 UTC netbsd-8 commitmail json YAML

Pull up the following revision, requested by maxv in tickt #691:

sys/arch/amd64/conf/GENERIC    1.485 (via patch)

Enable SVS by default.

(martin)

2018-04-04 16:23:27 UTC MAIN commitmail json YAML

Add machdep.spectre_v2.method, a string that tells which method is
active.

(maxv)

2018-04-04 16:18:49 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #690):
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe.c: revision 1.138
sys/dev/pci/ixgbe/ixv.c: revision 1.90
sys/dev/pci/ixgbe/ixgbe.c: revision 1.139
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.11
sys/dev/pci/ixgbe/ixgbe.h: revision 1.38
sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.12
sys/dev/pci/ixgbe/ixgbe.h: revision 1.39
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.10
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.11
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.37
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.38
sys/dev/pci/ixgbe/ixgbe.c: revision 1.140
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.20
sys/dev/pci/ixgbe/ixgbe.c: revision 1.141
sys/dev/pci/ixgbe/ixgbe.c: revision 1.142
sys/dev/pci/ixgbe/ixgbe.c: revision 1.143
sys/dev/pci/ixgbe/ixgbe.h: revision 1.40
sys/dev/pci/ixgbe/ixgbe_x550.h: revision 1.4

Fix the problem between eitr and link_speed.

In ixgbe_msix_que(), que->eitr_setting is limited to IXGBE_MIN_RSC_EITR_10G1G
when link_speed is 1Gbps or 10Gbps. However, que->eitr_setting is set to EITR
register in the *next* Tx/Rx interrupt. If link_speed changes from 100Mbps to
1Gbps ro 10Gbps, que->eitr_setting which is not limited can be set to EITR
register, that is, the problem fixed by ixgbe.c:r1.124 can occur in this case.

To fix this case, que->eitr_setting should be clear when link_speed is changed
or link state is changed.

Furthermore, expand the variants used for AIM (txr->bytes, txr->packets,
rxr->bytes and rxr->packets) from u32 to u64 to avoid wraparound which causes
que->eitr_setting calculation mistake.
XXX pullup-8

Don't write EIMC directly. It is required to manage with struct ix_queue status.
XXX pullup-8

-  Add missing IFM_NONE support. If a interface support linkdown,
  "ifconfig ixgN media none" drpos link.  Not all interface can do link down.
Tested:
        82598 AT2 (T)
        92599 SF+(SFI) (X520-DA2)
        X540
        X550-T1
        X550EM_x (X10SDV-8C-TLN4F)
        X550EM_a (A2SDi-H-TP4F port 0, 1 (T))
Doesn't work:
        X550EM_a (A2SDi-H-TP4F port 2, 3 (SFP+ (KR)))
        X550EM_a (MA10-ST0 port 2, 3 (SFP+ (SFI)))
        (Denverton SFP+ can't force link down because SFP+'s TX_DISABLE pin is
        pull down. Is there a way to shutdown SFP+ cage's power?)
Not tested:
        82598 fiber.
- Change some functions static.

Avoid issues caused by sending old packets at next link-up time.

This modification consists by the following two parts.
    - drain packets in if_snd queue or corresponding txr->txr_interq
      when link_active == false in ifp->if_start(), ifp->if_transmit(),
      and deferred Tx processing
    - drain packets in if_snd queue and all of txr->txr_interq's
      at link-down time
ok by msaitoh@n.o.

Fix long standing bug that 82598 SFP+ panics in ixgbe_handle_mod() because
hw->mac.ops.setup_sfp is NULL. This change is a part of FreeBSD r327031.

Fix a bug that "ifconfig ixgN down up" forgot IFM_NONE setting.
- Don't assume autoneg == 0 is the first call of ixgbe_config_link().
  Check ifm_media, too.
- Don't override autoneg_advertised in ixgbe_get_phy_id_fw() to not to
  be inconsistent with if_media value.

(martin)

2018-04-04 16:07:33 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #689):
etc/rc.subr: revision 1.101

PR misc/53145 (Bruce Lilly)

Use ps -A instead of ps -ax (-A means -ax, but -A is posix, -x is not)
Use ps -o args instead of ps -o command (same reason).

This makes no difference when the ps used is /bin/ps on NetBSD, but
can make a difference when some other ps command gets invoked instead.

XXX pullup -8

(martin)

2018-04-04 16:01:05 UTC MAIN commitmail json YAML

Reset more regs at attach time, just in case.
As the mux is in unit 0 but is used by both units, we have to keep
  unit 0's ahb clock enabled.
Properly set sc_output_type.

Now pipeline 1 can be activated without activating pipeline 0 first.

(bouyer)

2018-04-04 15:53:04 UTC MAIN commitmail json YAML

Correct a small regression typo in usr.bin/c++ ATF tests

TESTS_SH= changed to TESTS_SH+=

(kamil)

2018-04-04 15:08:59 UTC MAIN commitmail json YAML

Sort entries in ATF tests in tests/usr.bin/c++/Makefile

No functional change intended.

(kamil)

2018-04-04 12:59:49 UTC MAIN commitmail json YAML

2018-04-04 10:17:53 UTC MAIN commitmail json YAML

2018-04-04 10:17:22 UTC MAIN commitmail json YAML

Add Intel Coffee Lake internal graphics devices. From ark.intel.com.

(msaitoh)

2018-04-04 09:19:33 UTC MAIN commitmail json YAML

Unconditionally include <unistd.h>, as we use ftruncate() unconditionally
too.
Reported (with patch) by Antonio Huete Jimenez in PR 53153, slightly
modified by me.

(martin)

2018-04-04 08:59:22 UTC MAIN commitmail json YAML

Sync with FreeBSD r331224 except ixv_if_update_admin_status()'s change:
- Fix length of reading buffer when the command is Read Flash in
  ixgbe_host_interface_command().
- Add missing start_hw() call in ixv_init_locked(). This is not a real bug
  because start_hw just set hw->adapter_stopped to false and anyone refer it.
- Style change.
- Update comment.

(msaitoh)

2018-04-04 08:13:07 UTC MAIN commitmail json YAML

Sync with the remaining part of FreeBSD r328265 except sfp_reinit stuff:
- Always schedule module intterrupt in ixgbe_config_link() when a device is
  SFP+ based.
- Use not loop index but txr->me in ixv_initialize_{transmit,receive}_units().
  It's required for VMDQ but NetBSD doesn't use it, so it's not a bug in
  NetBSD.
- Simplify ixgbe_bp_wd_set(). No functional change.
- Whitespace.

(msaitoh)

2018-04-04 06:30:09 UTC MAIN commitmail json YAML

Fix a bug that "ifconfig ixgN down up" forgot IFM_NONE setting.
- Don't assume autoneg == 0 is the first call of ixgbe_config_link().
  Check ifm_media, too.
- Don't override autoneg_advertised in ixgbe_get_phy_id_fw() to not to
  be inconsistent with if_media value.

(msaitoh)

2018-04-04 04:43:46 UTC MAIN commitmail json YAML

Document opendisk1() - it has been around long enough.
(pity about the name...)

XXX pullup-8

(kre)

2018-04-03 21:57:15 UTC MAIN commitmail json YAML

2018-04-03 21:10:28 UTC MAIN commitmail json YAML

Rework ifunc support to address a number of short comings:
- Move to a shared _rtld_call_ifunc for rel and rela architectures
- Architectures using rel format must patch IRELATIVE non-PLT
  relocations like RELATIVE in additition to the later ifunc handling
- Consistently record the delta to the end of the relocation group for
  non-PLT IRELATIVE relocations

Hidden ifunc is now supported on all ifunc platforms, even when using
-fno-plt. The combination of -fno-plt and relro is broken due to
incorrect GNU ld output though.

(joerg)

2018-04-03 19:53:57 UTC MAIN commitmail json YAML

2018-04-03 18:03:16 UTC MAIN commitmail json YAML

the zombie test is not a rump test.

(christos)

2018-04-03 16:17:59 UTC MAIN commitmail json YAML

disable all clocks at end of attach function, and re-enable ahb and mod only
in activate function.
enable ram gate (in debe) and video plls (in tcon) only when the video output
is enabled. Saves about 20mw when both video outputs are off.

(bouyer)

2018-04-03 16:01:25 UTC MAIN commitmail json YAML

2018-04-03 13:38:13 UTC MAIN commitmail json YAML

A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.

(bouyer)

2018-04-03 12:56:21 UTC MAIN commitmail json YAML

Add commented out entries for the display drivers.

(bouyer)

2018-04-03 12:52:16 UTC MAIN commitmail json YAML

work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
  fdt display-engine node, and activate de backend drivers based on the
  content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.

(bouyer)

2018-04-03 12:40:20 UTC MAIN commitmail json YAML

Add connector and panel drivers (panel supports only panel-lvds and
panel-dual-lvds at this time, but can easily be extended to other types
of panels).
Add an API for ports/endpoints.
Proposed on tech-kern@ a few days ago, ok jmcneill@

(bouyer)

2018-04-03 10:10:17 UTC MAIN commitmail json YAML

external interrupt functions are named "eint<n>" in the sunxi_gpio_pins[]
arrays, while sunxi_gpio_establish() looks for "eint".
Rename eint<n> to eint in sunxi_gpio_pins[]. Tested with an external interrupt
on PH0 on an A20.

XXX others sunxi_gpio_pins[] contains names like px_eint<n>, px being the
name of the port bank. I guess they should be renamed to "eint" too to work
with sunxi_gpio_establish() but I'm not sure the functions are really the
same, and I have no way to test.

(bouyer)

2018-04-03 09:03:59 UTC MAIN commitmail json YAML

Remove ipsec_copy_policy and ipsec_copy_pcbpolicy. No functional change,
since we used only ipsec_copy_pcbpolicy, and it was a no-op.

Originally we were using ipsec_copy_policy to optimize the IPsec-PCB
cache: when an ACK was received in response to a SYN, we used to copy the
SP cached in the SYN's PCB into the ACK's PCB, so that
ipsec_getpolicybysock could use the cached SP instead of requerying it.

Then we switched to ipsec_copy_pcbpolicy which has always been a no-op. As
a result the SP cached in the SYN was/is not copied in the ACK, and the
first call to ipsec_getpolicybysock had to query the SP and cache it
itself. It's not totally clear to me why this change was made.

But it has been this way for years, and after a conversation with Ryota
Ozaki it turns out the optimization is not valid anymore due to
MP-ification, so it won't be re-enabled.

ok ozaki-r@

(maxv)

2018-04-03 08:46:01 UTC MAIN commitmail json YAML

Remove unused fields and outdated comment.

(maxv)

2018-04-03 08:29:44 UTC pgoyette-compat commitmail json YAML

2018-04-03 08:18:11 UTC MAIN commitmail json YAML

Fix build with "USE_SSP=yes".

(tron)

2018-04-03 08:02:34 UTC MAIN commitmail json YAML

bcopy -> memcpy, it's obvious the areas don't overlap.

(maxv)

2018-04-03 07:20:52 UTC MAIN commitmail json YAML

2018-04-03 06:11:14 UTC MAIN commitmail json YAML

openssh-7.7 out

(wiz)

2018-04-02 22:49:48 UTC MAIN commitmail json YAML

convert some spaces into new lines and tabs to make the gcc 6
indent checker happy.

(mrg)

2018-04-02 22:35:26 UTC MAIN commitmail json YAML

2018-04-02 22:34:22 UTC MAIN commitmail json YAML

handle programs that have 3 outputs in a saner fashion.
hopefully fixes PR 53137.

(mrg)

2018-04-02 22:29:33 UTC MAIN commitmail json YAML

2018-04-02 20:57:18 UTC MAIN commitmail json YAML

Add missing A10_RST_LVDS entry
fix sun4i_a10_ac_dig_table[] with values from arm/allwinner/,
audio plays at the right rate again on my lime2

(bouyer)

2018-04-02 20:55:49 UTC MAIN commitmail json YAML

- sunxi_ccu_lcdxch1_set_rate(): enable parent before calling
  sunxi_ccu_div_set_rate(). If it's not enabled get_rate() will return 0 and
  sunxi_ccu_div_set_rate() will fail.
- rework sunxi_ccu_lcdxch0_set_rate() to actually really select the best
  parent.

(bouyer)

2018-04-02 20:54:47 UTC MAIN commitmail json YAML

use the right end macro: IDTVEC_END(name) instead of END(Xname)

(christos)

2018-04-02 18:25:42 UTC MAIN commitmail json YAML

fix typo in comment

(jdolecek)

2018-04-02 17:45:23 UTC MAIN commitmail json YAML

Add new predicate volatile_mem_operand and use it for jbbssi<mode>

Fixes PR port-vax/53039: GCC/VAX hits ICE building libstdc++

GCC wants to change the label and then doesn't recognise the
new insn, it believes it doesn't satisfy the memory_operand
predicate.

It appears the memory_operand predicate doesn't accept volatile
memory accesses during the RTL generation phase.

The predicate is from rs6000 code.

from krister

(maya)

2018-04-02 11:02:53 UTC MAIN commitmail json YAML

Remove extra printf duplicate with MI codes.

(rin)

2018-04-02 10:51:35 UTC MAIN commitmail json YAML

Fix long standing bug that 82598 SFP+ panics in ixgbe_handle_mod() because
hw->mac.ops.setup_sfp is NULL. This change is a part of FreeBSD r327031.

(msaitoh)

2018-04-02 10:44:06 UTC MAIN commitmail json YAML

Use ahc_freedmamem() for consistency. No functional change intended.

(rin)

2018-04-02 10:32:47 UTC MAIN commitmail json YAML

Initialize ahc->shared_data_size appropriately. Fix panic when detach.

(rin)

2018-04-02 10:30:07 UTC MAIN commitmail json YAML

Revert previous change as the typedef should now work as intended.
Thanks christos, martin

(sevan)

2018-04-02 09:53:08 UTC netbsd-8 commitmail json YAML

2018-04-02 09:51:58 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #688):

tests/net/ndp/t_ndp.sh: revision 1.31
tests/net/if_tap/t_tap.sh: revision 1.8

Avoid setting IP addresses of the same subnet on different interface

If we do so, there will remain one route that is of a preceding address, but
that behavior is not documented and may be changed in the future.  Tests
shouldn't rely on such a unstable behavior.

(martin)

2018-04-02 09:44:19 UTC MAIN commitmail json YAML

2018-04-02 09:11:54 UTC netbsd-8 commitmail json YAML

2018-04-02 09:07:53 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #687):
sys/kern/kern_rwlock_obj.c: revision 1.4
sys/rump/librump/rumpkern/locks.c: revision 1.80
sys/kern/kern_rwlock.c: revision 1.50
sys/arch/x86/x86/db_memrw.c: revision 1.5,1.6
sys/ddb/db_command.c: revision 1.150-1.153
share/man/man4/ddb.4: revision 1.175 (via patch),1.176-1.178
sys/kern/kern_mutex_obj.c: revision 1.6
sys/kern/subr_lockdebug.c: revision 1.61-1.64
sys/sys/lockdebug.h: revision 1.17
sys/kern/kern_mutex.c: revision 1.71
sys/sys/lockdebug.h: revision 1.18,1.19
sys/kern/subr_xcall.c: revision 1.26

Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc

Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc
were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc
itself. What we want to know are callers of them.

Spinkle ASSERT_SLEEPABLE to xcall functions

Use db_printf instead of printf in ddb

Add a new command, show lockstat, which shows statistics of locks
Currently the command shows the number of allocated locks.
The command is useful only if LOCKDEBUG is enabled.

Add a new command, show all locks, which shows information of active locks

The command shows information of all active (i.e., being held) locks that are
tracked through either of LWPs or CPUs by the LOCKDEBUG facility.  The /t
modifier additionally shows a backtrace for each LWP additionally.  This
feature is useful for debugging especially to analyze deadlocks.
The command is useful only if LOCKDEBUG is enabled.

Don't pass a unset address to lockdebug_lock_print

x86: avoid accessing invalid addresses in ddb like arm32
This avoids that a command stops in the middle of an execution if
a fault occurs due to an access to an invalid address.

Get rid of a redundant output

Improve wording. Fix a Cm argument.

ddb: rename "show lockstat" to "show lockstats" to avoid conflicting with lockstat(8)
Requested by mrg@

(martin)

2018-04-02 08:54:35 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #686):

sys/netinet/if_arp.c: revision 1.271
sys/netinet6/nd6_nbr.c: revision 1.151,1.152

Avoid passing NULL to nd6_dad_duplicated
Fix PR kern/53075

Fix a race condition on DAD destructions (again)

The previous fix to DAD timers was wrong; it avoided a use-after-free but
instead introduced a memory leak.  The destruction method had delegated
a destruction of a DAD timer to the timer itself and told that by setting NULL
to dp->dad_ifa.  However, the previous fix made DAD timers do nothing on
the sign.

Fixing the issue with using callout_stop isn't easy.  One approach is to have
a refcount on dp but it introduces extra complexity that we want to avoid.
The new fix falls back to using callout_halt, which was abandoned because of
softnet_lock.  Fortunately now the network stack is protected by KERNEL_LOCK
so we can remove softnet_lock from DAD timers (callout) and use callout_halt
safely.

(martin)

2018-04-02 08:50:33 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by nonaka in ticket #685):

sys/arch/i386/stand/efiboot/efidisk.c: revision 1.4
sys/arch/i386/stand/efiboot/bootx64/efibootx64.c: revision 1.4
sys/arch/i386/stand/efiboot/eficons.c: revision 1.5
sys/arch/i386/stand/efiboot/efichar.c: revision 1.1
sys/arch/i386/stand/efiboot/bootia32/efibootia32.c: revision 1.4
sys/arch/i386/stand/efiboot/boot.c: revision 1.8
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.5
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.6
sys/arch/i386/stand/efiboot/efidelay.c: revision 1.2
sys/arch/i386/stand/efiboot/efiboot.h: revision 1.7
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.11

efiboot: Added serial console support.

(martin)

2018-04-02 08:43:58 UTC netbsd-8 commitmail json YAML

Pull up the following revisions, requested by maxv in ticket #683:

sys/arch/x86/x86/svs.c          1.15-1.17

Fix sysctl type, should be bool.

Use EOPNOTSUPP instead of EINVAL.

Improve the detection. Future generations of Intel CPUs will have a bit to
say they are not affected by Meltdown.

(martin)

2018-04-02 07:31:18 UTC MAIN commitmail json YAML

2018-04-02 07:30:34 UTC MAIN commitmail json YAML

Add Intel X299 and Z370 LPC.

(msaitoh)

2018-04-02 05:52:31 UTC MAIN commitmail json YAML

Add support for aarch64

(ryo)

2018-04-02 05:02:55 UTC MAIN commitmail json YAML

Avoid issues caused by sending old packets at next link-up time.

This modification consists by the following two parts.
    - drain packets in if_snd queue or corresponding txr->txr_interq
      when link_active == false in ifp->if_start(), ifp->if_transmit(),
      and deferred Tx processing
    - drain packets in if_snd queue and all of txr->txr_interq's
      at link-down time

ok by msaitoh@n.o.

(knakahara)

2018-04-02 04:26:17 UTC MAIN commitmail json YAML

2018-04-02 01:15:32 UTC MAIN commitmail json YAML

eat NUL's first so that the state machine is not altered by them.

(christos)

2018-04-02 00:46:08 UTC MAIN commitmail json YAML

2018-04-02 00:45:06 UTC MAIN commitmail json YAML

Add Linux Foundation vendor ID, and their root hub device IDs.

(jakllsch)

2018-04-02 00:18:43 UTC pgoyette-compat commitmail json YAML

Typos (new = old, not old = new!), whitespace, and consistency in
references to the dynamically allocated array of required modules.

(pgoyette)

2018-04-01 23:38:02 UTC MAIN commitmail json YAML

2018-04-01 23:25:28 UTC MAIN commitmail json YAML