CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k
Module Name:src Committed By: mlelstv Date: Wed Mar 7 06:55:01 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: aes-m68k.S Log Message: Use local ELF labels and avoid an unsupported 16bit relocation. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.2 Mon Mar 5 00:59:43 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S Wed Mar 7 06:55:01 2018 @@ -1,4 +1,4 @@ -| $NetBSD: aes-m68k.S,v 1.2 2018/03/05 00:59:43 christos Exp $ +| $NetBSD: aes-m68k.S,v 1.3 2018/03/07 06:55:01 mlelstv Exp $ | Copyright (C) 2016 Tetsuya Isaki. All rights reserved. | Copyright (C) 2016 Y.Sugahara (moveccr). All rights reserved. @@ -34,19 +34,20 @@ .global AES_set_encrypt_key .type AES_set_encrypt_key, @function AES_set_encrypt_key: +.Laes_set_encrypt_key: moveml %d2-%d7/%a2-%a6,%sp@- moveal %sp@(44+4),%a0 | userKey moveal %sp@(44+8),%a1 | bits moveal %sp@(44+12),%a3 | key tstl %a0 - beq pek_return1 | return -1 if userKey == NULL + beq .Lpek_return1 | return -1 if userKey == NULL tstl %a3 - beq pek_return1 | return -1 if key == NULL + beq .Lpek_return1 | return -1 if key == NULL cmpaw #128,%a1 - bne pek192_check | unless bits == 128 -pek128: + bne .Lpek192_check | unless bits == 128 +.Lpek128: | %d0-%d7 rk[0..7] | %a0 userKey, Te0 | %a1 Te1 @@ -80,7 +81,7 @@ pek128: lea %pc@(rcon_byte),%a4 lea %a4@(10),%a6 -pek128_loop: +.Lpek128_loop: | d6 consists of four Te index bytes movel %d3,%d5 | d5=rk[3] as {1,2,3,0} moveb %d5,%d7 | d7=temp @@ -111,21 +112,21 @@ pek128_loop: movel %d3,%a5@+ cmpal %a4,%a6 - bne pek128_loop |if (++i == 10) return 0; + bne .Lpek128_loop |if (++i == 10) return 0; -pek_return0: +.Lpek_return0: moveql #0,%d0 -pek_return: +.Lpek_return: moveml %sp@+,%d2-%d7/%a2-%a6 rts -pek192_check: +.Lpek192_check: | %a0 userKey | %a1 bits | %a3 key cmpaw #192,%a1 - bne pek256_check | unless bits == 192 -pek192: + bne .Lpek256_check | unless bits == 192 +.Lpek192: | %a0 Te0 | %a1 Te1 | %a2 Te2 @@ -160,15 +161,15 @@ pek192: moveq #0,%d7 lea %pc@(rcon_byte),%a4 lea %a4@(8),%a6 - bra pek192_loop_start + bra .Lpek192_loop_start -pek192_loop: +.Lpek192_loop: eorl %d3,%d4 | rk[10] = rk[4] ^ rk[9] movel %d4,%a5@+ | %d4 is rk[10] eorl %d4,%d5 | rk[11] = rk[5] ^ rk[10] movel %d5,%a5@ | %d5 is rk[11] -pek192_loop_start: +.Lpek192_loop_start: | %d0..%d5 = rk[0..5] | | temp = rk[5]; @@ -206,17 +207,17 @@ pek192_loop_start: movel %d3,%a5@+ | %d3 is rk[9] cmpal %a4,%a6 - bne pek192_loop - bra pek_return0 + bne .Lpek192_loop + bra .Lpek_return0 -pek256_check: +.Lpek256_check: | %a0 userKey | %a1 bits | %a3 key cmpaw #256,%a1 - bne pek_return2 | otherwise return -2 -pek256: + bne .Lpek_return2 | otherwise return -2 +.Lpek256: | %a0 Te0 | %a1 Te1 | %a2 Te2 @@ -254,9 +255,9 @@ pek256: lea %pc@(rcon_byte),%a4 lea %a4@(7),%a6 - bra pek256_loop_start + bra .Lpek256_loop_start -pek256_loop: +.Lpek256_loop: | %d0: rk[8] -> work | %d1: rk[9] -> work | %d2: rk[10] @@ -314,7 +315,7 @@ pek256_loop: moveml %a5@(-8*4),%d0-%d1 | %d0..%d1 = rk[8..9] movel %a5@(-5*4),%d3 | %d3 = rk[11] -pek256_loop_start: +.Lpek256_loop_start: | %d0: rk[0] | %d1: rk[1] | %d2: rk[2] @@ -369,15 +370,15 @@ pek256_loop_start: | %d7: work cmpal %a4,%a6 - bne pek256_loop - bra pek_return0 + bne .Lpek256_loop + bra .Lpek_return0 -pek_return1: +.Lpek_return1: moveql #-1,%d0 - bra pek_return -pek_return2: + bra .Lpek_return +.Lpek_return2: moveql #-2,%d0 - bra pek_return + bra .Lpek_return .size AES_set_encrypt_key, .-AES_set_encrypt_key @@ -397,9 +398,9 @@ AES_set_decrypt_key: movel %a3,%sp@- movel %a1,%sp@- movel %a0,%sp@- - bsr AES_set_encrypt_key + bsr .Laes_set_encrypt_key lea %sp@(12),%sp - bmi pdk_return + bmi .Lpdk_return /* invert the order of the round keys: */ lea %a3@(rd_key),%a5 | %a5 := [0] @@ -407,7 +408,7 @@ AES_set_decrypt_key: lslw #4,%d4 lea %a5@(%d4),%a4 | %a4 := [j] moveal %a4,%a6 | %a6 for the next loop -pdk_invert_loop: +.Lpdk_invert_loop: movel %a5@,%d0 movel %a4@,%a5@+ movel %d0,%a4@+ @@ -427,7 +428,7 @@ pdk_invert_loop: lea %a4@(-28),%a4 cmpal %a4,%a5 - bcs pdk_invert_loop + bcs .Lpdk_invert_loop /* * apply the inverse MixColumn transform to all round keys but @@ -442,7 +443,7 @@ pdk_invert_loop: | for (i = 1; i <
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Mar 7 03:29:10 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixv.c Log Message: - Make "Handled queue in softint" and "Requeued in softint" evcnt(9) per queue and count them correctly. - Remove #if 0'ed code. To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.129 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.128 src/sys/dev/pci/ixgbe/ixgbe.c:1.129 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.128 Fri Mar 2 10:19:20 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Mar 7 03:29:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.128 2018/03/02 10:19:20 knakahara Exp $ */ +/* $NetBSD: ixgbe.c,v 1.129 2018/03/07 03:29:10 msaitoh Exp $ */ /** @@ -1686,10 +1686,6 @@ ixgbe_add_hw_stats(struct adapter *adapt const char *xname = device_xname(dev); /* Driver Statistics */ - evcnt_attach_dynamic(>handleq, EVCNT_TYPE_MISC, - NULL, xname, "Handled queue in softint"); - evcnt_attach_dynamic(>req, EVCNT_TYPE_MISC, - NULL, xname, "Requeued in softint"); evcnt_attach_dynamic(>efbig_tx_dma_setup, EVCNT_TYPE_MISC, NULL, xname, "Driver tx dma soft fail EFBIG"); evcnt_attach_dynamic(>mbuf_defrag_failed, EVCNT_TYPE_MISC, @@ -1736,15 +1732,6 @@ ixgbe_add_hw_stats(struct adapter *adapt (void *)>queues[i], 0, CTL_CREATE, CTL_EOL) != 0) break; -#if 0 /* XXX msaitoh */ - if (sysctl_createv(log, 0, , , - CTLFLAG_READONLY, CTLTYPE_QUAD, - "irqs", SYSCTL_DESCR("irqs on this queue"), - NULL, 0, &(adapter->queues[i].irqs), - 0, CTL_CREATE, CTL_EOL) != 0) - break; -#endif - if (sysctl_createv(log, 0, , , CTLFLAG_READONLY, CTLTYPE_INT, "txd_head", SYSCTL_DESCR("Transmit Descriptor Head"), @@ -1761,6 +1748,11 @@ ixgbe_add_hw_stats(struct adapter *adapt evcnt_attach_dynamic(>queues[i].irqs, EVCNT_TYPE_INTR, NULL, adapter->queues[i].evnamebuf, "IRQs on queue"); + evcnt_attach_dynamic(>queues[i].handleq, + EVCNT_TYPE_MISC, NULL, adapter->queues[i].evnamebuf, + "Handled queue in softint"); + evcnt_attach_dynamic(>queues[i].req, EVCNT_TYPE_MISC, + NULL, adapter->queues[i].evnamebuf, "Requeued in softint"); evcnt_attach_dynamic(>tso_tx, EVCNT_TYPE_MISC, NULL, adapter->queues[i].evnamebuf, "TSO"); evcnt_attach_dynamic(>no_desc_avail, EVCNT_TYPE_MISC, @@ -1981,8 +1973,6 @@ ixgbe_clear_evcnt(struct adapter *adapte struct ixgbe_hw *hw = >hw; struct ixgbe_hw_stats *stats = >stats.pf; - adapter->handleq.ev_count = 0; - adapter->req.ev_count = 0; adapter->efbig_tx_dma_setup.ev_count = 0; adapter->mbuf_defrag_failed.ev_count = 0; adapter->efbig2_tx_dma_setup.ev_count = 0; @@ -1997,6 +1987,8 @@ ixgbe_clear_evcnt(struct adapter *adapte txr = adapter->tx_rings; for (int i = 0; i < adapter->num_queues; i++, rxr++, txr++) { adapter->queues[i].irqs.ev_count = 0; + adapter->queues[i].handleq.ev_count = 0; + adapter->queues[i].req.ev_count = 0; txr->no_desc_avail.ev_count = 0; txr->total_packets.ev_count = 0; txr->tso_tx.ev_count = 0; @@ -2535,6 +2527,7 @@ ixgbe_msix_que(void *arg) no_calc: if (more) { + que->req.ev_count++; if (adapter->txrx_use_workqueue) { /* * adapter->que_wq is bound to each CPU instead of @@ -3376,8 +3369,6 @@ ixgbe_detach(device_t dev, int flags) if_percpuq_destroy(adapter->ipq); sysctl_teardown(>sysctllog); - evcnt_detach(>handleq); - evcnt_detach(>req); evcnt_detach(>efbig_tx_dma_setup); evcnt_detach(>mbuf_defrag_failed); evcnt_detach(>efbig2_tx_dma_setup); @@ -3392,6 +3383,8 @@ ixgbe_detach(device_t dev, int flags) txr = adapter->tx_rings; for (int i = 0; i < adapter->num_queues; i++, rxr++, txr++) { evcnt_detach(>queues[i].irqs); + evcnt_detach(>queues[i].handleq); + evcnt_detach(>queues[i].req); evcnt_detach(>no_desc_avail); evcnt_detach(>total_packets); evcnt_detach(>tso_tx); @@ -4724,9 +4717,10 @@ ixgbe_legacy_irq(void *arg) (eicr & IXGBE_EICR_GPI_SDP0_X540)) softint_schedule(adapter->phy_si); - if (more) + if (more) { + que->req.ev_count++; softint_schedule(que->que_si); - else + } else ixgbe_enable_intr(adapter); return 1; @@ -5825,7 +5819,7 @@ ixgbe_handle_que(void *context) struct ifnet*ifp = adapter->ifp; bool more = false; - adapter->handleq.ev_count++; + que->handleq.ev_count++; if (ifp->if_flags & IFF_RUNNING) { more = ixgbe_rxeof(que); @@ -5843,6 +5837,7 @@ ixgbe_handle_que(void *context) } if (more) { + que->req.ev_count++; if (adapter->txrx_use_workqueue) { /* * "enqueued flag" is not required here. Index:
CVS commit: src/tests/net/ndp
Module Name:src Committed By: ozaki-r Date: Wed Mar 7 02:30:37 UTC 2018 Modified Files: src/tests/net/ndp: t_dad.sh Log Message: Tweak tests; increase the size of NS packets for the addition of a nonce To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/net/ndp/t_dad.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ndp/t_dad.sh diff -u src/tests/net/ndp/t_dad.sh:1.13 src/tests/net/ndp/t_dad.sh:1.14 --- src/tests/net/ndp/t_dad.sh:1.13 Wed Mar 7 02:30:00 2018 +++ src/tests/net/ndp/t_dad.sh Wed Mar 7 02:30:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: t_dad.sh,v 1.13 2018/03/07 02:30:00 ozaki-r Exp $ +# $NetBSD: t_dad.sh,v 1.14 2018/03/07 02:30:37 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -74,9 +74,9 @@ make_ns_pkt_str() { local id=$1 local target=$2 - pkt="33:33:ff:00:00:0${id}, ethertype IPv6 (0x86dd), length 78: ::" + pkt="33:33:ff:00:00:0${id}, ethertype IPv6 (0x86dd), length 86: ::" pkt="$pkt > ff02::1:ff00:${id}: ICMP6, neighbor solicitation," - pkt="$pkt who has $target, length 24" + pkt="$pkt who has $target, length 32" echo $pkt }
CVS commit: src/tests/net/ndp
Module Name:src Committed By: ozaki-r Date: Wed Mar 7 02:30:00 UTC 2018 Modified Files: src/tests/net/ndp: t_dad.sh Log Message: Provide more informative reports on failures To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/net/ndp/t_dad.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ndp/t_dad.sh diff -u src/tests/net/ndp/t_dad.sh:1.12 src/tests/net/ndp/t_dad.sh:1.13 --- src/tests/net/ndp/t_dad.sh:1.12 Fri Nov 25 08:51:17 2016 +++ src/tests/net/ndp/t_dad.sh Wed Mar 7 02:30:00 2018 @@ -1,4 +1,4 @@ -# $NetBSD: t_dad.sh,v 1.12 2016/11/25 08:51:17 ozaki-r Exp $ +# $NetBSD: t_dad.sh,v 1.13 2018/03/07 02:30:00 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -31,6 +31,7 @@ SOCKPEER=unix://commsock2 DEBUG=${DEBUG:-false} duplicated="[Dd][Uu][Pp][Ll][Ii][Cc][Aa][Tt][Ee][Dd]" +tentative="[Tt][Ee][Nn][Tt][Aa][Tt][Ii][Vv][Ee]" atf_test_case dad_basic cleanup atf_test_case dad_duplicated cleanup @@ -95,11 +96,12 @@ dad_basic_body() $DEBUG && rump.ifconfig shmif0 atf_check -s exit:0 rump.ifconfig shmif0 up - rump.ifconfig shmif0 > ./out - $DEBUG && cat ./out + $DEBUG && rump.ifconfig shmif0 # The primary address doesn't start with tentative state - atf_check -s not-exit:0 -x "cat ./out |grep $localip1 |grep -q tentative" + atf_check -s exit:0 -o match:"$localip1" \ + -o not-match:"$localip1.+$tentative" \ + rump.ifconfig shmif0 # The alias address starts with tentative state # XXX we have no stable way to check this, so skip for now #atf_check -s exit:0 -x "cat ./out |grep $localip2 |grep -q tentative" @@ -110,10 +112,12 @@ dad_basic_body() # Check DAD probe packets (Neighbor Solicitation Message) pkt=$(make_ns_pkt_str 2 $localip2) - atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" + pkt=$(echo $pkt | sed 's/\([\(\)]\)/\\\1/g') + atf_check -s exit:0 -o match:"$pkt" cat ./out # No DAD for the primary address pkt=$(make_ns_pkt_str 1 $localip1) - atf_check -s not-exit:0 -x "cat ./out |grep -q '$pkt'" + pkt=$(echo $pkt | sed 's/\([\(\)]\)/\\\1/g') + atf_check -s exit:0 -o not-match:"$pkt" cat ./out # Waiting for DAD complete atf_check -s exit:0 rump.ifconfig -w 10 @@ -123,7 +127,9 @@ dad_basic_body() # IPv6 DAD doesn't announce (Neighbor Advertisement Message) # The alias address left tentative - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -q tentative" + atf_check -s exit:0 -o match:"$localip2" \ + -o not-match:"$localip2.+$tentative" \ + rump.ifconfig shmif0 # # Add a new address on the fly @@ -139,7 +145,8 @@ dad_basic_body() extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt=$(make_ns_pkt_str 3 $localip3) - atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" + pkt=$(echo $pkt | sed 's/\([\(\)]\)/\\\1/g') + atf_check -s exit:0 -o match:"$pkt" cat ./out # Waiting for DAD complete atf_check -s exit:0 rump.ifconfig -w 10 @@ -149,7 +156,9 @@ dad_basic_body() # IPv6 DAD doesn't announce (Neighbor Advertisement Message) # The new address left tentative - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip3 |grep -q tentative" + atf_check -s exit:0 -o match:"$localip3" \ + -o not-match:"$localip3.+$tentative" \ + rump.ifconfig shmif0 rump_server_destroy_ifaces } @@ -169,7 +178,8 @@ dad_duplicated_body() export RUMP_SERVER=$SOCKLOCAL # The primary address isn't marked as duplicated - atf_check -s exit:0 -o not-match:"$localip1.+$duplicated" \ + atf_check -s exit:0 -o match:"$localip1" \ + -o not-match:"$localip1.+$duplicated" \ rump.ifconfig shmif0 # @@ -185,7 +195,8 @@ dad_duplicated_body() # A unique address isn't marked as duplicated atf_check -s exit:0 rump.ifconfig shmif0 inet6 $localip2 atf_check -s exit:0 sleep 1 - atf_check -s exit:0 -o not-match:"$localip2.+$duplicated" \ + atf_check -s exit:0 -o match:"$localip2" \ + -o not-match:"$localip2.+$duplicated" \ rump.ifconfig shmif0 rump_server_destroy_ifaces
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Wed Mar 7 01:37:24 UTC 2018 Modified Files: src/sys/netinet6: nd6_nbr.c Log Message: Avoid passing NULL to nd6_dad_duplicated Fix PR kern/53075 To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.150 src/sys/netinet6/nd6_nbr.c:1.151 --- src/sys/netinet6/nd6_nbr.c:1.150 Tue Mar 6 11:21:31 2018 +++ src/sys/netinet6/nd6_nbr.c Wed Mar 7 01:37:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.150 2018/03/06 11:21:31 martin Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.151 2018/03/07 01:37:24 ozaki-r Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.150 2018/03/06 11:21:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.151 2018/03/07 01:37:24 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1347,7 +1347,8 @@ nd6_dad_timer(struct dadq *dp) } if (duplicate) { - /* (*dp) will be freed in nd6_dad_duplicated() */ + nd6_dad_duplicated(dp); + /* (*dp) has been freed in nd6_dad_duplicated() */ dp = NULL; } else { /* @@ -1367,9 +1368,6 @@ nd6_dad_timer(struct dadq *dp) } } done: - if (duplicate) - nd6_dad_duplicated(dp); - mutex_exit(_dad_lock); if (need_free) { @@ -1501,7 +1499,8 @@ nd6_dad_ns_input(struct ifaddr *ifa, str /* XXX more checks for loopback situation - see nd6_dad_timer too */ if (duplicate) { - nd6_dad_duplicated(dp); + if (dp) + nd6_dad_duplicated(dp); } else { /* * not sure if I got a duplicate. @@ -1522,11 +1521,12 @@ nd6_dad_na_input(struct ifaddr *ifa) mutex_enter(_dad_lock); dp = nd6_dad_find(ifa, NULL); - if (dp) + if (dp) { dp->dad_na_icount++; - /* remove the address. */ - nd6_dad_duplicated(dp); + /* remove the address. */ + nd6_dad_duplicated(dp); + } mutex_exit(_dad_lock); }
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:49:45 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: Declare it correctly To generate a diff of this commit: cvs rdiff -u -r1.258.2.6 -r1.258.2.7 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.6 src/sys/net/if.h:1.258.2.7 --- src/sys/net/if.h:1.258.2.6 Tue Mar 6 23:48:34 2018 +++ src/sys/net/if.h Tue Mar 6 23:49:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.6 2018/03/06 23:48:34 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.7 2018/03/06 23:49:45 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -1339,7 +1339,7 @@ int sysctl_ifq(int *name, u_int namelen, extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *); -extern int vec_compat_ifconf(u_long, void *); +extern int (*vec_compat_ifconf)(u_long, void *); #endif /* _NETBSD_SOURCE */ #endif /* !_NET_IF_H_ */
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:48:34 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: Declare the compat_ifconf vector, not the stub. To generate a diff of this commit: cvs rdiff -u -r1.258.2.5 -r1.258.2.6 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.5 src/sys/net/if.h:1.258.2.6 --- src/sys/net/if.h:1.258.2.5 Tue Mar 6 23:39:35 2018 +++ src/sys/net/if.h Tue Mar 6 23:48:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.5 2018/03/06 23:39:35 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.6 2018/03/06 23:48:34 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -1339,7 +1339,7 @@ int sysctl_ifq(int *name, u_int namelen, extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *); -extern int stub_compat_ifconf(u_long, void *); +extern int vec_compat_ifconf(u_long, void *); #endif /* _NETBSD_SOURCE */ #endif /* !_NET_IF_H_ */
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:46:14 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.c Log Message: Allocate and initialize the vector for compat_ifconf() To generate a diff of this commit: cvs rdiff -u -r1.419.2.1 -r1.419.2.2 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.419.2.1 src/sys/net/if.c:1.419.2.2 --- src/sys/net/if.c:1.419.2.1 Tue Mar 6 05:46:06 2018 +++ src/sys/net/if.c Tue Mar 6 23:46:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.419.2.1 2018/03/06 05:46:06 pgoyette Exp $ */ +/* $NetBSD: if.c,v 1.419.2.2 2018/03/06 23:46:14 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.1 2018/03/06 05:46:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.2 2018/03/06 23:46:14 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -265,6 +265,8 @@ void stub_compat_ifreqo2n(struct oifreq void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *) = stub_compat_ifreqo2n; +int (*vec_compat_ifconf)(u_long, void *) = stub_compat_ifconf; + int stub_compat_ifconf(u_long, void *); int (*vec_compat_ifconf)(u_long, void *) = stub_compat_ifconf;
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:39:35 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: And we need the oifreq definition here, too To generate a diff of this commit: cvs rdiff -u -r1.258.2.4 -r1.258.2.5 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.4 src/sys/net/if.h:1.258.2.5 --- src/sys/net/if.h:1.258.2.4 Tue Mar 6 23:31:29 2018 +++ src/sys/net/if.h Tue Mar 6 23:39:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.4 2018/03/06 23:31:29 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.5 2018/03/06 23:39:35 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -1334,6 +1334,9 @@ int sysctl_ifq(int *name, u_int namelen, } /* compat function vectors */ + +#include + extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *); extern int stub_compat_ifconf(u_long, void *);
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:31:29 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: if_40.h src/sys/net [pgoyette-compat]: if.h Log Message: Better to add these required headers closer to where they're needed To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/if_40.h cvs rdiff -u -r1.258.2.3 -r1.258.2.4 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/if_40.h diff -u src/sys/compat/common/if_40.h:1.1.2.1 src/sys/compat/common/if_40.h:1.1.2.2 --- src/sys/compat/common/if_40.h:1.1.2.1 Tue Mar 6 23:17:42 2018 +++ src/sys/compat/common/if_40.h Tue Mar 6 23:31:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_40.h,v 1.1.2.1 2018/03/06 23:17:42 pgoyette Exp $ */ +/* $NetBSD: if_40.h,v 1.1.2.2 2018/03/06 23:31:29 pgoyette Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -33,6 +33,10 @@ #define _COMPAT_IF_40_H_ #if defined(COMPAT_40) + +#include +#include + extern u_long (*vec_compat_cvtcmd)(u_long); extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, void *, struct lwp *); Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.3 src/sys/net/if.h:1.258.2.4 --- src/sys/net/if.h:1.258.2.3 Tue Mar 6 23:27:52 2018 +++ src/sys/net/if.h Tue Mar 6 23:31:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.3 2018/03/06 23:27:52 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.4 2018/03/06 23:31:29 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -88,11 +88,8 @@ #include #include #include -#include #endif -#include - /* * Always include ALTQ glue here -- we use the ALTQ interface queue * structure even when ALTQ is not configured into the kernel so that
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:27:52 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: And another required header To generate a diff of this commit: cvs rdiff -u -r1.258.2.2 -r1.258.2.3 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.2 src/sys/net/if.h:1.258.2.3 --- src/sys/net/if.h:1.258.2.2 Tue Mar 6 23:24:11 2018 +++ src/sys/net/if.h Tue Mar 6 23:27:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.2 2018/03/06 23:24:11 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.3 2018/03/06 23:27:52 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -88,6 +88,7 @@ #include #include #include +#include #endif #include
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:24:11 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: Include necessary header To generate a diff of this commit: cvs rdiff -u -r1.258.2.1 -r1.258.2.2 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.1 src/sys/net/if.h:1.258.2.2 --- src/sys/net/if.h:1.258.2.1 Tue Mar 6 23:19:20 2018 +++ src/sys/net/if.h Tue Mar 6 23:24:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.1 2018/03/06 23:19:20 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.2 2018/03/06 23:24:11 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -90,6 +90,8 @@ #include #endif +#include + /* * Always include ALTQ glue here -- we use the ALTQ interface queue * structure even when ALTQ is not configured into the kernel so that
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:19:20 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.h Log Message: Move indirect function call vectors to if.h where they can be found by the code that manipulates them. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.258.2.1 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258 src/sys/net/if.h:1.258.2.1 --- src/sys/net/if.h:1.258 Mon Jan 15 13:05:40 2018 +++ src/sys/net/if.h Tue Mar 6 23:19:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258 2018/01/15 13:05:40 maxv Exp $ */ +/* $NetBSD: if.h,v 1.258.2.1 2018/03/06 23:19:20 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -1332,5 +1332,11 @@ int sysctl_ifq(int *name, u_int namelen, { "peak", CTLTYPE_INT }, \ { "drops", CTLTYPE_INT }, \ } + +/* compat function vectors */ +extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); +extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *); +extern int stub_compat_ifconf(u_long, void *); + #endif /* _NETBSD_SOURCE */ #endif /* !_NET_IF_H_ */
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Tue Mar 6 23:17:42 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_mod.c uipc_syscalls_40.c Added Files: src/sys/compat/common [pgoyette-compat]: if_40.h Log Message: Use a .h file for declaring the if_40_{init, fini} routines To generate a diff of this commit: cvs rdiff -u -r1.24.14.1 -r1.24.14.2 src/sys/compat/common/compat_mod.c cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/if_40.h cvs rdiff -u -r1.15.2.2 -r1.15.2.3 src/sys/compat/common/uipc_syscalls_40.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.24.14.1 src/sys/compat/common/compat_mod.c:1.24.14.2 --- src/sys/compat/common/compat_mod.c:1.24.14.1 Tue Mar 6 05:46:06 2018 +++ src/sys/compat/common/compat_mod.c Tue Mar 6 23:17:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $ */ +/* $NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -66,8 +66,7 @@ static struct sysctllog *compat_clog = N #endif #ifdef COMPAT_40 -void if_40_init(void); -void if_40_fini(void); +#include #endif #ifdef COMPAT_50 Index: src/sys/compat/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3 --- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2 Tue Mar 6 22:46:41 2018 +++ src/sys/compat/common/uipc_syscalls_40.c Tue Mar 6 23:17:42 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $"); /* * System call interface to the socket abstraction. @@ -21,6 +21,8 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall #include #include +#include + #ifdef COMPAT_OIFREQ /* * Return interface configuration Added files: Index: src/sys/compat/common/if_40.h diff -u /dev/null src/sys/compat/common/if_40.h:1.1.2.1 --- /dev/null Tue Mar 6 23:17:43 2018 +++ src/sys/compat/common/if_40.h Tue Mar 6 23:17:42 2018 @@ -0,0 +1,44 @@ +/* $NetBSD: if_40.h,v 1.1.2.1 2018/03/06 23:17:42 pgoyette Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Paul Goyette + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _COMPAT_IF_40_H_ +#define _COMPAT_IF_40_H_ + +#if defined(COMPAT_40) +extern u_long (*vec_compat_cvtcmd)(u_long); +extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, +void *, struct lwp *); + +void if_40_init(void); +void if_40_fini(void); +#endif + +#endif /* !_COMPAT_IF_40_H_ */
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Tue Mar 6 22:46:41 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c Log Message: Typo in function declaration. To generate a diff of this commit: cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/compat/common/uipc_syscalls_40.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.1 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2 --- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.1 Tue Mar 6 05:46:06 2018 +++ src/sys/compat/common/uipc_syscalls_40.c Tue Mar 6 22:46:41 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.1 2018/03/06 05:46:06 pgoyette Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.1 2018/03/06 05:46:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $"); /* * System call interface to the socket abstraction. @@ -153,7 +153,7 @@ release_exit: #endif #if defined(COMPAT_40) static int (*orig_compat_ifconf)(u_long, void *); -static void (*orig_compat_ifconf(u_long, void *); +static int (*orig_compat_ifconf)(u_long, void *); void if_40_init(void)
CVS commit: src/sys/arch/zaurus/conf
Module Name:src Committed By: christos Date: Tue Mar 6 22:21:01 UTC 2018 Modified Files: src/sys/arch/zaurus/conf: files.zaurus Log Message: fix typo (thanks gcc-6). There is no "pxaiis" To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/zaurus/conf/files.zaurus Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/zaurus/conf/files.zaurus diff -u src/sys/arch/zaurus/conf/files.zaurus:1.13 src/sys/arch/zaurus/conf/files.zaurus:1.14 --- src/sys/arch/zaurus/conf/files.zaurus:1.13 Tue Aug 11 09:12:25 2015 +++ src/sys/arch/zaurus/conf/files.zaurus Tue Mar 6 17:21:01 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.zaurus,v 1.13 2015/08/11 13:12:25 nonaka Exp $ +# $NetBSD: files.zaurus,v 1.14 2018/03/06 22:21:01 christos Exp $ # # Sharp Zaurus specific configuration info # @@ -92,7 +92,7 @@ attach ztp at zssp file arch/zaurus/dev/ztp.c ztp # WM8750 audio -device zaudio: audiobus, auconv, mulaw, aurateconv, pxaiis +device zaudio: audiobus, auconv, mulaw, aurateconv, pxaiic attach zaudio at iic file arch/zaurus/dev/zaudio.c zaudio file arch/zaurus/dev/wm8731_zaudio.c zaudio & cpu_xscale_pxa250
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: christos Date: Tue Mar 6 22:13:14 UTC 2018 Modified Files: src/sys/arch/emips/stand/common: devopen.c Log Message: fix build, KNF, simplify. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/devopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/emips/stand/common/devopen.c diff -u src/sys/arch/emips/stand/common/devopen.c:1.1 src/sys/arch/emips/stand/common/devopen.c:1.2 --- src/sys/arch/emips/stand/common/devopen.c:1.1 Tue Jan 25 20:18:54 2011 +++ src/sys/arch/emips/stand/common/devopen.c Tue Mar 6 17:13:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: devopen.c,v 1.1 2011/01/26 01:18:54 pooka Exp $ */ +/* $NetBSD: devopen.c,v 1.2 2018/03/06 22:13:14 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -59,54 +59,53 @@ devopen(struct open_file *f, cp = fname; ncp = device_name; -/* Require the form CTRL/DEVNAME(UNIT,PART)/FILENAME e.g. '0/ace(0,0)/netbsd' '0/tftp(0,0)/netbsd' - */ - -/* get controller number */ -if ((c = *cp) >= '0' && c <= '9') { -ctlr = c - '0'; -c = *++cp; -} else -return (ENXIO); - -if (c != '/') -return (ENXIO); -c = *++cp; - -/* get device name */ -while ((c = *cp) != '\0') { -if ((c == '(') || (c == '/')) { -cp++; -break; -} -if (ncp < device_name + sizeof(device_name) - 1) -*ncp++ = c; -cp++; -} -if (ncp == device_name) -return (ENXIO); - -/* get device number */ -if ((c = *cp) >= '0' && c <= '9') { -unit = c - '0'; -c = *++cp; -} else -return (ENXIO); - -if (c == ',') { -/* get partition number */ -if ((c = *++cp) >= '0' && c <= '9') { -part = c - '0'; -c = *++cp; -} else -return (ENXIO); -} else -return (ENXIO); - -if (c == ')') -cp++; -else -return (ENXIO); + /* + * Require the form CTRL/DEVNAME(UNIT,PART)/FILENAME + * e.g. '0/ace(0,0)/netbsd' '0/tftp(0,0)/netbsd' + */ + + /* get controller number */ + c = *cp++; + if (c < '0' || c > '9') + return ENXIO; + ctlr = c - '0'; + + c = *cp++; + if (c != '/') + return ENXIO; + + /* get device name */ + while ((c = *cp) != '\0') { + if ((c == '(') || (c == '/')) { + cp++; + break; + } + if (ncp < device_name + sizeof(device_name) - 1) + *ncp++ = c; + cp++; + } + if (ncp == device_name) + return ENXIO; + + /* get device number */ + c = *cp++; + if (c < '0' || c > '9') + return ENXIO; + unit = c - '0'; + + c = *cp++; + if (c != ',') + return (ENXIO); + + /* get partition number */ + c = *cp++; + if (c < '0' || c > '9') + return ENXIO; + part = c - '0'; + + c = *cp++; + if (c != ')') + return ENXIO; *ncp = '\0'; @@ -121,7 +120,7 @@ devopen(struct open_file *f, if (dp->dv_name) printf(" %s", dp->dv_name); printf("\n"); - return (ENXIO); + return ENXIO; fnd: #ifdef BOOTNET @@ -132,12 +131,12 @@ fnd: rc = (dp->dv_open)(f, ctlr, unit, part, cp); #endif /* !LIBSA_SINGLE_DEVICE */ if (rc) - return (rc); + return rc; #ifndef LIBSA_SINGLE_DEVICE f->f_dev = dp; #endif if (file && *cp != '\0') *file = (char *)cp; /* XXX */ - return (0); + return 0; }
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: htodd Date: Tue Mar 6 21:21:27 UTC 2018 Modified Files: src/external/bsd/cron/dist: crontab.c Log Message: Fix typo in function name. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/bsd/cron/dist/crontab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/crontab.c diff -u src/external/bsd/cron/dist/crontab.c:1.14 src/external/bsd/cron/dist/crontab.c:1.15 --- src/external/bsd/cron/dist/crontab.c:1.14 Fri Jun 9 17:36:30 2017 +++ src/external/bsd/cron/dist/crontab.c Tue Mar 6 21:21:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: crontab.c,v 1.14 2017/06/09 17:36:30 christos Exp $ */ +/* $NetBSD: crontab.c,v 1.15 2018/03/06 21:21:27 htodd Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = "Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp"; #else -__RCSID("$NetBSD: crontab.c,v 1.14 2017/06/09 17:36:30 christos Exp $"); +__RCSID("$NetBSD: crontab.c,v 1.15 2018/03/06 21:21:27 htodd Exp $"); #endif #endif @@ -66,7 +66,7 @@ static void list_cmd(void), static int replace_cmd(void); static int allowed(const char *, const char *, const char *); static int in_file(const char *, FILE *, int); -static int relinguish_priv(void); +static int relinquish_priv(void); static int regain_priv(void); static __dead void @@ -265,7 +265,7 @@ parse_args(int argc, char *argv[]) { * the race. */ - if (relinguish_priv() < OK) { + if (relinquish_priv() < OK) { err(ERROR_EXIT, "swapping uids"); } if (!(NewCrontab = fopen(Filename, "r"))) { @@ -689,7 +689,7 @@ replace_cmd(void) { "# (%s installed on %-24.24s)\n", Filename, ctime()); (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, - "$NetBSD: crontab.c,v 1.14 2017/06/09 17:36:30 christos Exp $"); + "$NetBSD: crontab.c,v 1.15 2018/03/06 21:21:27 htodd Exp $"); /* copy the crontab to the tmp */ @@ -882,7 +882,7 @@ in_file(const char *string, FILE *file, #ifdef HAVE_SAVED_UIDS -static int relinguish_priv(void) { +static int relinquish_priv(void) { return (setegid(rgid) || seteuid(ruid)) ? -1 : 0; } @@ -892,7 +892,7 @@ static int regain_priv(void) { #else /*HAVE_SAVED_UIDS*/ -static int relinguish_priv(void) { +static int relinquish_priv(void) { return (setregid(egid, rgid) || setreuid(euid, ruid)) ? -1 : 0; }
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Tue Mar 6 21:11:51 UTC 2018 Modified Files: src/tests/lib/libc/sys: t_ptrace_x86_wait.h Log Message: Correct all ATF failures in t_ptrace_x86_wait.h (debug registers) This code after refactoring stopped calling functions that were designed to trigger expected behavior and thus, tests were breaking. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_x86_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_x86_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_x86_wait.h:1.3 src/tests/lib/libc/sys/t_ptrace_x86_wait.h:1.4 --- src/tests/lib/libc/sys/t_ptrace_x86_wait.h:1.3 Sat Dec 16 14:45:25 2017 +++ src/tests/lib/libc/sys/t_ptrace_x86_wait.h Tue Mar 6 21:11:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_x86_wait.h,v 1.3 2017/12/16 14:45:25 christos Exp $ */ +/* $NetBSD: t_ptrace_x86_wait.h,v 1.4 2018/03/06 21:11:51 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -422,7 +422,7 @@ dbregs_trap_variable(int reg, int cond, if (write) watchme = 1; else - DPRINTF("watchme=%d\n", watchme); + printf("watchme=%d\n", watchme); DPRINTF("Before raising %s from child\n", strsignal(sigval)); FORKEE_ASSERT(raise(sigval) == 0); @@ -897,7 +897,6 @@ ATF_TC_BODY(dbregs_dr0_trap_variable_rea /* 0b11 -- break on data write */ /* 0b00 -- 1 byte */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(0, 3, 0, false); } @@ -914,7 +913,6 @@ ATF_TC_BODY(dbregs_dr1_trap_variable_rea /* 0b11 -- break on data write */ /* 0b00 -- 1 byte */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(1, 3, 0, false); } @@ -931,7 +929,6 @@ ATF_TC_BODY(dbregs_dr2_trap_variable_rea /* 0b11 -- break on data write */ /* 0b00 -- 1 byte */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(2, 3, 0, false); } @@ -948,7 +945,6 @@ ATF_TC_BODY(dbregs_dr3_trap_variable_rea /* 0b11 -- break on data write */ /* 0b00 -- 1 byte */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(3, 3, 0, false); } @@ -965,7 +961,6 @@ ATF_TC_BODY(dbregs_dr0_trap_variable_rea /* 0b11 -- break on data write */ /* 0b01 -- 2 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(0, 3, 1, false); } @@ -982,7 +977,6 @@ ATF_TC_BODY(dbregs_dr1_trap_variable_rea /* 0b11 -- break on data write */ /* 0b01 -- 2 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(1, 3, 1, false); } @@ -999,7 +993,6 @@ ATF_TC_BODY(dbregs_dr2_trap_variable_rea /* 0b11 -- break on data write */ /* 0b01 -- 2 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(2, 3, 1, false); } @@ -1016,7 +1009,6 @@ ATF_TC_BODY(dbregs_dr3_trap_variable_rea /* 0b11 -- break on data write */ /* 0b01 -- 2 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(3, 3, 1, false); } @@ -1033,7 +1025,6 @@ ATF_TC_BODY(dbregs_dr0_trap_variable_rea /* 0b11 -- break on data write */ /* 0b11 -- 4 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(0, 3, 3, false); } @@ -1050,7 +1041,6 @@ ATF_TC_BODY(dbregs_dr1_trap_variable_rea /* 0b11 -- break on data write */ /* 0b11 -- 4 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(1, 3, 3, false); } @@ -1067,7 +1057,6 @@ ATF_TC_BODY(dbregs_dr2_trap_variable_rea /* 0b11 -- break on data write */ /* 0b11 -- 4 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(2, 3, 3, false); } @@ -1084,7 +1073,6 @@ ATF_TC_BODY(dbregs_dr3_trap_variable_rea /* 0b11 -- break on data write */ /* 0b11 -- 4 bytes */ - atf_tc_expect_fail("wrong signal"); dbregs_trap_variable(3, 3, 3, false); } @@ -1110,8 +1098,6 @@ ATF_TC_BODY(dbregs_dr0_trap_code, tc) volatile int watchme = 1; union u dr7; - atf_tc_expect_fail("wrong signal"); - struct ptrace_siginfo info; memset(, 0, sizeof(info)); @@ -1129,7 +1115,7 @@ ATF_TC_BODY(dbregs_dr0_trap_code, tc) DPRINTF("Before raising %s from child\n", strsignal(sigval)); FORKEE_ASSERT(raise(sigval) == 0); - DPRINTF("check_happy(%d)=%d\n", watchme, check_happy(watchme)); + printf("check_happy(%d)=%d\n", watchme, check_happy(watchme)); DPRINTF("Before raising %s from child\n", strsignal(sigval)); FORKEE_ASSERT(raise(sigval) == 0); @@ -1242,8 +1228,6 @@ ATF_TC_BODY(dbregs_dr1_trap_code, tc) struct ptrace_siginfo info; memset(, 0, sizeof(info)); - atf_tc_expect_fail("wrong signal"); - dr7.raw = 0; dr7.bits.global_dr1_breakpoint = 1; dr7.bits.condition_dr1 = 0; /* 0b00 -- break on code execution */ @@ -1258,7 +1242,7 @@ ATF_TC_BODY(dbregs_dr1_trap_code, tc) DPRINTF("Before raising %s from child\n", strsignal(sigval)); FORKEE_ASSERT(raise(sigval) == 0); - DPRINTF("check_happy(%d)=%d\n",
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64
Module Name:src Committed By: christos Date: Tue Mar 6 19:32:16 UTC 2018 Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64: crypto.inc Log Message: need CRYPTO_memcmp To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc:1.1 --- /dev/null Tue Mar 6 14:32:16 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc Tue Mar 6 14:32:16 2018 @@ -0,0 +1,3 @@ + +CRYPTO_SRCS += libc-memequal.c +.include "../../crypto.inc"
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa
Module Name:src Committed By: christos Date: Tue Mar 6 19:30:56 UTC 2018 Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa: crypto.inc Log Message: need CRYPTO_memequal To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc:1.1 --- /dev/null Tue Mar 6 14:30:56 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc Tue Mar 6 14:30:56 2018 @@ -0,0 +1,3 @@ + +CRYPTO_SRCS += libc-memequal.c +.include "../../crypto.inc"
CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes
Module Name:src Committed By: christos Date: Tue Mar 6 18:36:09 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c Log Message: fix v8 PMULL detection (Robert Swindells) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c diff -u src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.4 src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.5 --- src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.4 Thu Feb 8 16:51:29 2018 +++ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c Tue Mar 6 13:36:09 2018 @@ -668,7 +668,6 @@ void gcm_ghash_4bit_x86(u64 Xi[2], const # if __ARM_MAX_ARCH__>=7 # define GHASH_ASM_ARM # define GCM_FUNCREF_4BIT -# define PMULL_CAPABLE(OPENSSL_armcap_P & ARMV8_PMULL) # if defined(__arm__) || defined(__arm) #define NEON_CAPABLE(OPENSSL_armcap_P & ARMV7_NEON) # endif @@ -676,10 +675,13 @@ void gcm_init_neon(u128 Htable[16], cons void gcm_gmult_neon(u64 Xi[2], const u128 Htable[16]); void gcm_ghash_neon(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len); +# if __ARM_MAX_ARCH__>=8 +#define PMULL_CAPABLE(OPENSSL_armcap_P & ARMV8_PMULL) void gcm_init_v8(u128 Htable[16], const u64 Xi[2]); void gcm_gmult_v8(u64 Xi[2], const u128 Htable[16]); void gcm_ghash_v8(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len); +# endif # endif # elif defined(__sparc__) || defined(__sparc) # include "sparc_arch.h"
CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm
Module Name:src Committed By: christos Date: Tue Mar 6 18:32:37 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl Log Message: For mips64: Avoid branch delay spot warnings: Warning: macro instruction expanded into multiple instructions in a branch delay slot To generate a diff of this commit: cvs rdiff -u -r1.1.1.6 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.1.1.6 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.2 --- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.1.1.6 Thu Feb 8 15:56:49 2018 +++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl Tue Mar 6 13:32:37 2018 @@ -470,8 +470,9 @@ $code.=<<___; $ST $ta3,-2*$BNSZ($a0) .set noreorder - bgtz $ta0,.L_bn_sqr_words_loop $ST $ta2,-$BNSZ($a0) + bgtz $ta0,.L_bn_sqr_words_loop + nop beqz $a2,.L_bn_sqr_words_return nop @@ -795,8 +796,9 @@ bn_div_3_words: $LD $a0,($a3) move $ta2,$a1 - bne $a0,$a2,bn_div_3_words_internal $LD $a1,-$BNSZ($a3) + bne $a0,$a2,bn_div_3_words_internal + nop li $v0,-1 jr $ra move $a0,$v0
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: bouyer Date: Tue Mar 6 17:40:04 UTC 2018 Modified Files: src/sys/dev/fdt: fdt_subr.c Log Message: fdtbus_get_string_index(): decrease len when going to the next string, otherwise we may read past the end of names. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/fdt/fdt_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/fdt/fdt_subr.c diff -u src/sys/dev/fdt/fdt_subr.c:1.20 src/sys/dev/fdt/fdt_subr.c:1.21 --- src/sys/dev/fdt/fdt_subr.c:1.20 Sun Dec 10 21:38:27 2017 +++ src/sys/dev/fdt/fdt_subr.c Tue Mar 6 17:40:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_subr.c,v 1.20 2017/12/10 21:38:27 skrll Exp $ */ +/* $NetBSD: fdt_subr.c,v 1.21 2018/03/06 17:40:04 bouyer Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.20 2017/12/10 21:38:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.21 2018/03/06 17:40:04 bouyer Exp $"); #include #include @@ -467,7 +467,7 @@ fdtbus_get_string_index(int phandle, con names = fdtbus_get_string(phandle, prop); for (name = names, cur = 0; len > 0; - name += strlen(name) + 1, cur++) { + len -= strlen(name) + 1, name += strlen(name) + 1, cur++) { if (index == cur) return name; }
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Tue Mar 6 17:39:36 UTC 2018 Modified Files: src/sys/netinet6: ip6_input.c Log Message: Perform the IP (src/dst) checks _before_ calling the packet filter, because if the filter has a "return-icmp" rule it may call icmp6_error with an src field that was not entirely validated. To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.194 src/sys/netinet6/ip6_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_input.c diff -u src/sys/netinet6/ip6_input.c:1.193 src/sys/netinet6/ip6_input.c:1.194 --- src/sys/netinet6/ip6_input.c:1.193 Sat Feb 24 07:37:09 2018 +++ src/sys/netinet6/ip6_input.c Tue Mar 6 17:39:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.193 2018/02/24 07:37:09 ozaki-r Exp $ */ +/* $NetBSD: ip6_input.c,v 1.194 2018/03/06 17:39:36 maxv Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.193 2018/02/24 07:37:09 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.194 2018/03/06 17:39:36 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -321,54 +321,6 @@ ip6_input(struct mbuf *m, struct ifnet * } /* - * Assume that we can create a fast-forward IP flow entry - * based on this packet. - */ - m->m_flags |= M_CANFASTFWD; - - /* - * Run through list of hooks for input packets. If there are any - * filters which require that additional packets in the flow are - * not fast-forwarded, they must clear the M_CANFASTFWD flag. - * Note that filters must _never_ set this flag, as another filter - * in the list may have previously cleared it. - */ - /* - * let ipfilter look at packet on the wire, - * not the decapsulated packet. - */ -#if defined(IPSEC) - if (!ipsec_used || !ipsec_indone(m)) -#else - if (1) -#endif - { - struct in6_addr odst; - - odst = ip6->ip6_dst; - if (pfil_run_hooks(inet6_pfil_hook, , rcvif, PFIL_IN) != 0) - return; - if (m == NULL) - return; - ip6 = mtod(m, struct ip6_hdr *); - srcrt = !IN6_ARE_ADDR_EQUAL(, >ip6_dst); - } - - IP6_STATINC(IP6_STAT_NXTHIST + ip6->ip6_nxt); - -#ifdef ALTQ - if (altq_input != NULL) { - SOFTNET_LOCK(); - if ((*altq_input)(m, AF_INET6) == 0) { - SOFTNET_UNLOCK(); - /* packet is dropped by traffic conditioner */ - return; - } - SOFTNET_UNLOCK(); - } -#endif - - /* * Check against address spoofing/corruption. */ if (IN6_IS_ADDR_MULTICAST(>ip6_src) || @@ -417,6 +369,54 @@ ip6_input(struct mbuf *m, struct ifnet * #endif /* + * Assume that we can create a fast-forward IP flow entry + * based on this packet. + */ + m->m_flags |= M_CANFASTFWD; + + /* + * Run through list of hooks for input packets. If there are any + * filters which require that additional packets in the flow are + * not fast-forwarded, they must clear the M_CANFASTFWD flag. + * Note that filters must _never_ set this flag, as another filter + * in the list may have previously cleared it. + */ + /* + * let ipfilter look at packet on the wire, + * not the decapsulated packet. + */ +#if defined(IPSEC) + if (!ipsec_used || !ipsec_indone(m)) +#else + if (1) +#endif + { + struct in6_addr odst; + + odst = ip6->ip6_dst; + if (pfil_run_hooks(inet6_pfil_hook, , rcvif, PFIL_IN) != 0) + return; + if (m == NULL) + return; + ip6 = mtod(m, struct ip6_hdr *); + srcrt = !IN6_ARE_ADDR_EQUAL(, >ip6_dst); + } + + IP6_STATINC(IP6_STAT_NXTHIST + ip6->ip6_nxt); + +#ifdef ALTQ + if (altq_input != NULL) { + SOFTNET_LOCK(); + if ((*altq_input)(m, AF_INET6) == 0) { + SOFTNET_UNLOCK(); + /* packet is dropped by traffic conditioner */ + return; + } + SOFTNET_UNLOCK(); + } +#endif + + /* * Disambiguate address scope zones (if there is ambiguity). * We first make sure that the original source or destination address * is not in our internal form for scoped addresses. Such addresses
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: bouyer Date: Tue Mar 6 17:24:57 UTC 2018 Modified Files: src/sys/dev/fdt: fdt_regulator.c Log Message: I guess fdtbus_regulator_get_voltage() should check for the get_voltage() callback, not set_voltage() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/fdt_regulator.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/fdt/fdt_regulator.c diff -u src/sys/dev/fdt/fdt_regulator.c:1.4 src/sys/dev/fdt/fdt_regulator.c:1.5 --- src/sys/dev/fdt/fdt_regulator.c:1.4 Fri Sep 22 15:33:21 2017 +++ src/sys/dev/fdt/fdt_regulator.c Tue Mar 6 17:24:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_regulator.c,v 1.4 2017/09/22 15:33:21 jmcneill Exp $ */ +/* $NetBSD: fdt_regulator.c,v 1.5 2018/03/06 17:24:57 bouyer Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_regulator.c,v 1.4 2017/09/22 15:33:21 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_regulator.c,v 1.5 2018/03/06 17:24:57 bouyer Exp $"); #include #include @@ -150,7 +150,7 @@ fdtbus_regulator_get_voltage(struct fdtb { struct fdtbus_regulator_controller *rc = reg->reg_rc; - if (rc->rc_funcs->set_voltage == NULL) + if (rc->rc_funcs->get_voltage == NULL) return EINVAL; return rc->rc_funcs->get_voltage(rc->rc_dev, puvol);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Mar 6 15:06:06 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: Ticket #1578 To generate a diff of this commit: cvs rdiff -u -r1.1.2.75 -r1.1.2.76 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.75 src/doc/CHANGES-7.2:1.1.2.76 --- src/doc/CHANGES-7.2:1.1.2.75 Sat Mar 3 20:26:52 2018 +++ src/doc/CHANGES-7.2 Tue Mar 6 15:06:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.75 2018/03/03 20:26:52 snj Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.76 2018/03/06 15:06:05 martin Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5291,3 +5291,8 @@ sys/netipsec/ipsec_input.c 1.57-1.58 Fix out-of-bounds read. [maxv, ticket #1577] +sys/arch/mips/mips/cache.c 1.59 + + Add missing call to mips_dcache_compute_align() affecting. + [flxd, ticket #1578] +
CVS commit: [netbsd-7] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Tue Mar 6 15:04:49 UTC 2018 Modified Files: src/sys/arch/mips/mips [netbsd-7]: cache.c Log Message: Pull up following revision(s) (requested by flxd in ticket #1578): sys/arch/mips/mips/cache.c: revision 1.59 Add missing call to mips_dcache_compute_align() affecting "modern" MIPS (MIPS32{,R2}/MIPS64{,R2}). Thanks jmcneill@; OK skrll@. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.48.24.1 src/sys/arch/mips/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.48 src/sys/arch/mips/mips/cache.c:1.48.24.1 --- src/sys/arch/mips/mips/cache.c:1.48 Thu Nov 24 04:17:11 2011 +++ src/sys/arch/mips/mips/cache.c Tue Mar 6 15:04:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.48 2011/11/24 04:17:11 matt Exp $ */ +/* $NetBSD: cache.c,v 1.48.24.1 2018/03/06 15:04:49 martin Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.48 2011/11/24 04:17:11 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.48.24.1 2018/03/06 15:04:49 martin Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -1231,5 +1231,7 @@ mips_config_cache_modern(uint32_t cpu_id mco->mco_intern_pdcache_wb_range = (void (*)(vaddr_t, vsize_t))cache_noop; } + + mips_dcache_compute_align(); } #endif /* MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2 > 0 */
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips
Module Name:src Committed By: christos Date: Tue Mar 6 13:47:25 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips64.S Log Message: Avoid branch delay spot warnings: Warning: macro instruction expanded into multiple instructions in a branch delay slot XXX: Manually need to fix in auto-generation. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.1 Mon Mar 5 11:43:50 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S Tue Mar 6 08:47:25 2018 @@ -297,8 +297,9 @@ bn_sqr_words_internal: sd $11,-2*8($4) .set noreorder - bgtz $8,.L_bn_sqr_words_loop sd $10,-8($4) + bgtz $8,.L_bn_sqr_words_loop + nop beqz $6,.L_bn_sqr_words_return nop @@ -564,8 +565,9 @@ bn_div_3_words: ld $4,($7) move $10,$5 - bne $4,$6,bn_div_3_words_internal ld $5,-8($7) + bne $4,$6,bn_div_3_words_internal + nop li $2,-1 jr $31 move $4,$2
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: christos Date: Tue Mar 6 13:37:43 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc Log Message: Add a case for 7, remove arm64crypto.S To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.8 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.7 Fri Mar 2 19:20:57 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc Tue Mar 6 08:37:43 2018 @@ -8,9 +8,10 @@ ARM_MAX_ARCH=4 ARM_MAX_ARCH=5 .elif !empty(MACHINE_ARCH:Mearmv6*) ARM_MAX_ARCH=6 +.elif !empty(MACHINE_ARCH:Mearmv7*) +ARM_MAX_ARCH=7 .else ARM_MAX_ARCH=8 -CPUID_SRCS += arm64cpuid.S .endif CPPFLAGS += -D__ARM_MAX_ARCH__=${ARM_MAX_ARCH} .include "../../crypto.inc"
CVS commit: src/sys/netinet6
Module Name:src Committed By: martin Date: Tue Mar 6 11:21:32 UTC 2018 Modified Files: src/sys/netinet6: nd6_nbr.c Log Message: Remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.149 src/sys/netinet6/nd6_nbr.c:1.150 --- src/sys/netinet6/nd6_nbr.c:1.149 Tue Mar 6 10:57:00 2018 +++ src/sys/netinet6/nd6_nbr.c Tue Mar 6 11:21:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.149 2018/03/06 10:57:00 roy Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.150 2018/03/06 11:21:31 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.149 2018/03/06 10:57:00 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.150 2018/03/06 11:21:31 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1480,16 +1480,12 @@ nd6_dad_ns_output(struct dadq *dp, struc static void nd6_dad_ns_input(struct ifaddr *ifa, struct nd_opt_nonce *nonce) { - struct in6_ifaddr *ia; - const struct in6_addr *taddr6; struct dadq *dp; int duplicate; if (ifa == NULL) panic("ifa == NULL in nd6_dad_ns_input"); - ia = (struct in6_ifaddr *)ifa; - taddr6 = >ia_addr.sin6_addr; duplicate = 0; mutex_enter(_dad_lock);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Mar 6 11:19:17 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Tickets #600 - #607 To generate a diff of this commit: cvs rdiff -u -r1.1.2.137 -r1.1.2.138 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.137 src/doc/CHANGES-8.0:1.1.2.138 --- src/doc/CHANGES-8.0:1.1.2.137 Tue Mar 6 08:53:41 2018 +++ src/doc/CHANGES-8.0 Tue Mar 6 11:19:17 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.137 2018/03/06 08:53:41 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.138 2018/03/06 11:19:17 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -10028,3 +10028,62 @@ sys/arch/x86/include/Makefile 1.22 Do not install dbregs.h, it is a kernel-only header. [kamil, ticket #599] +sys/netipsec/ipsec_input.c 1.57-1.58 + + Fix an out-of-bound read (after authentication). + [maxv, ticket #600] + +sys/arch/mips/mips/cache.c 1.59 + + Add missing call to mips_dcache_compute_align(). + [flxd, ticket #601] + +doc/CHANGES{,.prev}1.138 +lib/libc/sys/ptrace.21.68 +sys/kern/sys_ptrace_common.c 1.35 (patch) +sys/sys/ptrace.h1.63 +tests/lib/libc/sys/t_ptrace_wait.c 1.23 + + Remove PT_GET_SIGMASK / PT_SET_SIGMASK. + [kamil, ticket #602] + +sys/arch/md64/conf/kern.ldscript 1.25 (patch) +sys/arch/amd64/conf/kern.ldscript.Xen 1.14 (patch) +sys/arch/i386/conf/kern.ldscript 1.21 (patch) +sys/arch/i386/conf/kern.ldscript.Xen 1.15 (patch) +sys/arch/x86/include/cpufunc.h 1.24 (patch) +sys/arch/x86/x86/patch.c 1.25 (partial) 1.26 (partial) + + Backport x86_hotpatch. + [maxv, ticket #603] + +sys/dev/pci/if_wm.c1.565-1.566 + + - Fix a bug that wm_pll_workaround_i210() is not called on some + cases. + - Rename function. + - Do wm_reset_mdicnfg_82580() on 82580 only. + [msaitoh, ticket #604] + +sys/dev/pci/ixgbe/ix_txrx.c 1.34 +sys/dev/pci/ixgbe/ixgbe.c 1.128 +sys/dev/pci/ixgbe/ixgbe.h 1.32-1.33 +sys/dev/pci/ixgbe/ixv.c1.83-1.84 + + - Add hw.ixvM.q[01].{interrupt_rate,[tr]xd_head,[tr]xd_tail} sysctls + like ixg(4). + - Add support for workqueue poll mode to ixg(4) and ixv(4), but + do not enable them by default. + - Move the location of "struct work" in ixgbe.h. + [knakahara, ticket #605] + +usr.bin/vmstat/vmstat.c1.218 + + Don't print "nan" when there is no disk activity. + [nakayama, ticket #606] + +sys/netipsec/ipsecif.c1.3 + + Fix fragment processing in ipsec4_fragout(). + [knakahara, ticket #607] +
CVS commit: [netbsd-8] src/sys/netipsec
Module Name:src Committed By: martin Date: Tue Mar 6 11:17:55 UTC 2018 Modified Files: src/sys/netipsec [netbsd-8]: ipsecif.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #607): sys/netipsec/ipsecif.c: revision 1.3 Fix fragment processing in ipsec4_fragout(). Pointed out by maxv@n.o, thanks. XXX need pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/netipsec/ipsecif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsecif.c diff -u src/sys/netipsec/ipsecif.c:1.1.2.2 src/sys/netipsec/ipsecif.c:1.1.2.3 --- src/sys/netipsec/ipsecif.c:1.1.2.2 Sun Feb 11 21:17:34 2018 +++ src/sys/netipsec/ipsecif.c Tue Mar 6 11:17:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsecif.c,v 1.1.2.2 2018/02/11 21:17:34 snj Exp $ */ +/* $NetBSD: ipsecif.c,v 1.1.2.3 2018/03/06 11:17:55 martin Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.1.2.2 2018/02/11 21:17:34 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.1.2.3 2018/03/06 11:17:55 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -266,7 +266,7 @@ ipsecif4_fragout(struct ipsec_variant *v for (error = 0; m; m = next) { next = m->m_nextpkt; - m->m_next = NULL; + m->m_nextpkt = NULL; if (error) { m_freem(m); continue;
CVS commit: [netbsd-8] src/usr.bin/vmstat
Module Name:src Committed By: martin Date: Tue Mar 6 11:15:33 UTC 2018 Modified Files: src/usr.bin/vmstat [netbsd-8]: vmstat.c Log Message: Pull up following revision(s) (requested by nakayama in ticket #606): usr.bin/vmstat/vmstat.c: revision 1.218 Don't print "nan" when there is no disk activity. To generate a diff of this commit: cvs rdiff -u -r1.216.6.3 -r1.216.6.4 src/usr.bin/vmstat/vmstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vmstat/vmstat.c diff -u src/usr.bin/vmstat/vmstat.c:1.216.6.3 src/usr.bin/vmstat/vmstat.c:1.216.6.4 --- src/usr.bin/vmstat/vmstat.c:1.216.6.3 Mon Nov 6 09:55:56 2017 +++ src/usr.bin/vmstat/vmstat.c Tue Mar 6 11:15:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.216.6.3 2017/11/06 09:55:56 snj Exp $ */ +/* $NetBSD: vmstat.c,v 1.216.6.4 2018/03/06 11:15:33 martin Exp $ */ /*- * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95"; #else -__RCSID("$NetBSD: vmstat.c,v 1.216.6.3 2017/11/06 09:55:56 snj Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.216.6.4 2018/03/06 11:15:33 martin Exp $"); #endif #endif /* not lint */ @@ -1123,8 +1123,11 @@ drvstats(int *ovflwp) for (dn = 0; dn < ndrive; ++dn) { /* elapsed time for disk stats */ - dtime = (double)cur.timestamp[dn].tv_sec + - ((double)cur.timestamp[dn].tv_usec / (double)100); + dtime = cur.cp_etime; + if (cur.timestamp[dn].tv_sec || cur.timestamp[dn].tv_usec) { + dtime = (double)cur.timestamp[dn].tv_sec + +((double)cur.timestamp[dn].tv_usec / (double)100); + } if (!drv_select[dn]) continue;
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Tue Mar 6 11:12:41 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h ixv.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #605): sys/dev/pci/ixgbe/ixgbe.h: revision 1.32 sys/dev/pci/ixgbe/ixgbe.h: revision 1.33 sys/dev/pci/ixgbe/ix_txrx.c: revision 1.34 sys/dev/pci/ixgbe/ixgbe.c: revision 1.128 sys/dev/pci/ixgbe/ixv.c: revision 1.83 sys/dev/pci/ixgbe/ixv.c: revision 1.84 Add hw.ixvM.q[01].{interrupt_rate,[tr]xd_head,[tr]xd_tail} sysctls as ixg(4). ixg(4) supports workqueue poll mode, but not enabled by default yet. (that is, the default behavior is *not* changed) At the time of high load near the wire rate, the turnaround time of update/delete processing such as "ifconfig ixg0 inet XXX" or "ifconfig ixg0 delete" is very long. The main reason is CPU starvation caused by ixg(4)'s softint poll mode. ixg(4) uses workqueue poll mode instead of softint poll mode, so that this problem will be fix. This change may cause performance issues, so it is not enabled by default yet. Although there are that issues, if you want to use workqueue poll mode, do "sysctl -w hw.ixgXX.txrx_workqueue=1" while there is no traffic on the ixgXX. ok by msaitoh@n.o. ixv(4) also supports workqueue poll mode, but not enabled by default yet, either. ok by msaitoh@n.o. Move the location of "struct work" as FreeBSD's "struct task" in ixgbe.h. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.24.2.5 -r1.24.2.6 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.88.2.11 -r1.88.2.12 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.4 -r1.24.6.5 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.56.2.8 -r1.56.2.9 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.5 src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.6 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.5 Thu Mar 1 19:02:15 2018 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue Mar 6 11:12:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.24.2.5 2018/03/01 19:02:15 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.24.2.6 2018/03/06 11:12:40 martin Exp $ */ /** @@ -238,8 +238,26 @@ ixgbe_mq_start(struct ifnet *ifp, struct if (IXGBE_TX_TRYLOCK(txr)) { ixgbe_mq_start_locked(ifp, txr); IXGBE_TX_UNLOCK(txr); - } else - softint_schedule(txr->txr_si); + } else { + if (adapter->txrx_use_workqueue) { + /* + * This function itself is not called in interrupt + * context, however it can be called in fast softint + * context right after receiving forwarding packets. + * So, it is required to protect workqueue from twice + * enqueuing when the machine uses both spontaneous + * packets and forwarding packets. + */ + u_int *enqueued = percpu_getref(adapter->txr_wq_enqueued); + if (*enqueued == 0) { +*enqueued = 1; +percpu_putref(adapter->txr_wq_enqueued); +workqueue_enqueue(adapter->txr_wq, >wq_cookie, curcpu()); + } else +percpu_putref(adapter->txr_wq_enqueued); + } else + softint_schedule(txr->txr_si); + } return (0); } /* ixgbe_mq_start */ @@ -291,7 +309,8 @@ ixgbe_mq_start_locked(struct ifnet *ifp, / * ixgbe_deferred_mq_start * - * Called from a taskqueue to drain queued transmit packets. + * Called from a softint and workqueue (indirectly) to drain queued + * transmit packets. / void ixgbe_deferred_mq_start(void *arg) @@ -307,6 +326,24 @@ ixgbe_deferred_mq_start(void *arg) } /* ixgbe_deferred_mq_start */ / + * ixgbe_deferred_mq_start_work + * + * Called from a workqueue to drain queued transmit packets. + / +void +ixgbe_deferred_mq_start_work(struct work *wk, void *arg) +{ + struct tx_ring *txr = container_of(wk, struct tx_ring, wq_cookie); + struct adapter *adapter = txr->adapter; + u_int *enqueued = percpu_getref(adapter->txr_wq_enqueued); + *enqueued = 0; + percpu_putref(adapter->txr_wq_enqueued); + + ixgbe_deferred_mq_start(txr); +} /* ixgbe_deferred_mq_start */ + + +/ * ixgbe_xmit * * Maps the mbufs to tx descriptors, allowing the Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.11 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.12 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.11 Thu Mar 1 19:02:15 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue Mar 6 11:12:41 2018 @@ -1,4 +1,4 @@
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Tue Mar 6 10:59:04 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #604): sys/dev/pci/if_wm.c: revision 1.565-1.566 - Fix a bug that wm_pll_workaround_i210() is not called on some cases. As I wrote in if_wm.c rev 1.329's commit message, There are three cases: a) Chip is I211 b) Chip is I210 and it uses INVM (not FLASH) c) Chip is I210 (it uses FLASH) and NVM image version < 3.25 Before this commit, the workaround function was not called on a) and b). - Rename function. Do wm_reset_mdicnfg_82580() on 82580 only. To generate a diff of this commit: cvs rdiff -u -r1.508.4.15 -r1.508.4.16 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.508.4.15 src/sys/dev/pci/if_wm.c:1.508.4.16 --- src/sys/dev/pci/if_wm.c:1.508.4.15 Mon Feb 26 00:25:16 2018 +++ src/sys/dev/pci/if_wm.c Tue Mar 6 10:59:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.508.4.15 2018/02/26 00:25:16 snj Exp $ */ +/* $NetBSD: if_wm.c,v 1.508.4.16 2018/03/06 10:59:04 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.15 2018/02/26 00:25:16 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.16 2018/03/06 10:59:04 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -885,7 +885,7 @@ static int wm_nvm_read_word_invm(struct static int wm_nvm_read_invm(struct wm_softc *, int, int, uint16_t *); /* Lock, detecting NVM type, validate checksum and read */ static int wm_nvm_is_onboard_eeprom(struct wm_softc *); -static int wm_nvm_get_flash_presence_i210(struct wm_softc *); +static int wm_nvm_flash_presence_i210(struct wm_softc *); static int wm_nvm_validate_checksum(struct wm_softc *); static void wm_nvm_version_invm(struct wm_softc *); static void wm_nvm_version(struct wm_softc *); @@ -2256,7 +2256,7 @@ alloc_retry: case WM_T_I211: /* Allow a single clear of the SW semaphore on I210 and newer*/ sc->sc_flags |= WM_F_WA_I210_CLSEM; - if (wm_nvm_get_flash_presence_i210(sc)) { + if (wm_nvm_flash_presence_i210(sc)) { sc->nvm.read = wm_nvm_read_eerd; /* Don't use WM_F_LOCK_EECD because we use EERD */ sc->sc_flags |= WM_F_EEPROM_FLASH_HW; @@ -2353,12 +2353,20 @@ alloc_retry: /* Reset the chip to a known state. */ wm_reset(sc); - /* Check for I21[01] PLL workaround */ - if (sc->sc_type == WM_T_I210) + /* + * Check for I21[01] PLL workaround. + * + * Three cases: + * a) Chip is I211. + * b) Chip is I210 and it uses INVM (not FLASH). + * c) Chip is I210 (and it uses FLASH) and the NVM image version < 3.25 + */ + if (sc->sc_type == WM_T_I211) sc->sc_flags |= WM_F_PLL_WA_I210; - if ((sc->sc_type == WM_T_I210) && wm_nvm_get_flash_presence_i210(sc)) { - /* NVM image release 3.25 has a workaround */ - if ((sc->sc_nvm_ver_major < 3) + if (sc->sc_type == WM_T_I210) { + if (!wm_nvm_flash_presence_i210(sc)) + sc->sc_flags |= WM_F_PLL_WA_I210; + else if ((sc->sc_nvm_ver_major < 3) || ((sc->sc_nvm_ver_major == 3) && (sc->sc_nvm_ver_minor < 25))) { aprint_verbose_dev(sc->sc_dev, @@ -12485,7 +12493,7 @@ wm_nvm_is_onboard_eeprom(struct wm_softc } static int -wm_nvm_get_flash_presence_i210(struct wm_softc *sc) +wm_nvm_flash_presence_i210(struct wm_softc *sc) { uint32_t eec; @@ -12649,7 +12657,7 @@ wm_nvm_version(struct wm_softc *sc) have_uid = false; goto printver; case WM_T_I210: - if (!wm_nvm_get_flash_presence_i210(sc)) { + if (!wm_nvm_flash_presence_i210(sc)) { wm_nvm_version_invm(sc); have_uid = false; goto printver; @@ -14301,6 +14309,8 @@ wm_reset_mdicnfg_82580(struct wm_softc * uint16_t nvmword; int rv; + if (sc->sc_type != WM_T_82580) + return; if ((sc->sc_flags & WM_F_SGMII) == 0) return;
CVS commit: src/sys
Module Name:src Committed By: roy Date: Tue Mar 6 10:57:00 UTC 2018 Modified Files: src/sys/netinet: icmp6.h src/sys/netinet6: nd6.c nd6.h nd6_nbr.c Log Message: nd6: add a nonce to DaD probes in-case they are looped back to us This implements RFC 7527, based a similar change in FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/netinet/icmp6.h cvs rdiff -u -r1.246 -r1.247 src/sys/netinet6/nd6.c cvs rdiff -u -r1.85 -r1.86 src/sys/netinet6/nd6.h cvs rdiff -u -r1.148 -r1.149 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/icmp6.h diff -u src/sys/netinet/icmp6.h:1.49 src/sys/netinet/icmp6.h:1.50 --- src/sys/netinet/icmp6.h:1.49 Tue Jan 23 10:55:38 2018 +++ src/sys/netinet/icmp6.h Tue Mar 6 10:57:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.h,v 1.49 2018/01/23 10:55:38 maxv Exp $ */ +/* $NetBSD: icmp6.h,v 1.50 2018/03/06 10:57:00 roy Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ @@ -305,10 +305,12 @@ struct nd_opt_hdr { /* Neighbor discove #define ND_OPT_HOMEAGENT_INFO 8 #define ND_OPT_SOURCE_ADDRLIST 9 #define ND_OPT_TARGET_ADDRLIST 10 +#define ND_OPT_NONCE 14 /* RFC 3971 */ #define ND_OPT_MAP 23 /* RFC 5380 */ #define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */ #define ND_OPT_RDNSS 25 /* RFC 6016 */ #define ND_OPT_DNSSL 31 /* RFC 6016 */ +#define ND_OPT_MAX 31 struct nd_opt_route_info { /* route info */ u_int8_t nd_opt_rti_type; @@ -348,6 +350,16 @@ struct nd_opt_mtu { /* MTU option */ u_int32_t nd_opt_mtu_mtu; } __packed; +#define ND_OPT_NONCE_LEN ((1 * 8) - 2) +#if ((ND_OPT_NONCE_LEN + 2) % 8) != 0 +#error "(ND_OPT_NONCE_LEN + 2) must be a multiple of 8." +#endif +struct nd_opt_nonce { + u_int8_t nd_opt_nonce_type; + u_int8_t nd_opt_nonce_len; + u_int8_t nd_opt_nonce[ND_OPT_NONCE_LEN]; +} __packed; + struct nd_opt_rdnss { /* RDNSS option RFC 6106 */ u_int8_t nd_opt_rdnss_type; u_int8_t nd_opt_rdnss_len; Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.246 src/sys/netinet6/nd6.c:1.247 --- src/sys/netinet6/nd6.c:1.246 Tue Mar 6 07:24:01 2018 +++ src/sys/netinet6/nd6.c Tue Mar 6 10:57:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.246 2018/03/06 07:24:01 ozaki-r Exp $ */ +/* $NetBSD: nd6.c,v 1.247 2018/03/06 10:57:00 roy Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.246 2018/03/06 07:24:01 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.247 2018/03/06 10:57:00 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -347,6 +347,7 @@ nd6_options(union nd_opts *ndopts) case ND_OPT_TARGET_LINKADDR: case ND_OPT_MTU: case ND_OPT_REDIRECTED_HEADER: + case ND_OPT_NONCE: if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { nd6log(LOG_INFO, "duplicated ND6 option found (type=%d)\n", @@ -554,7 +555,7 @@ nd6_llinfo_timer(void *arg) psrc = nd6_llinfo_get_holdsrc(ln, ); LLE_FREE_LOCKED(ln); ln = NULL; - nd6_ns_output(ifp, daddr6, taddr6, psrc, 0); + nd6_ns_output(ifp, daddr6, taddr6, psrc, NULL); } out: @@ -2420,7 +2421,7 @@ nd6_resolve(struct ifnet *ifp, const str psrc = nd6_llinfo_get_holdsrc(ln, ); LLE_WUNLOCK(ln); ln = NULL; - nd6_ns_output(ifp, NULL, >sin6_addr, psrc, 0); + nd6_ns_output(ifp, NULL, >sin6_addr, psrc, NULL); } else { /* We did the lookup so we need to do the unlock here. */ LLE_WUNLOCK(ln); Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.85 src/sys/netinet6/nd6.h:1.86 --- src/sys/netinet6/nd6.h:1.85 Thu Jun 22 09:24:02 2017 +++ src/sys/netinet6/nd6.h Tue Mar 6 10:57:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.85 2017/06/22 09:24:02 ozaki-r Exp $ */ +/* $NetBSD: nd6.h,v 1.86 2018/03/06 10:57:00 roy Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -397,7 +397,7 @@ extern int ip6_temp_regen_advance; /* se extern int nd6_numroutes; union nd_opts { - struct nd_opt_hdr *nd_opt_array[8]; + struct nd_opt_hdr *nd_opt_array[16]; /* max = ND_OPT_NONCE */ struct { struct nd_opt_hdr *zero; struct nd_opt_hdr *src_lladdr; @@ -405,6 +405,16 @@ union nd_opts { struct nd_opt_prefix_info *pi_beg; /* multiple opts, start */ struct nd_opt_rd_hdr *rh; struct nd_opt_mtu *mtu; + struct nd_opt_hdr *__res6; + struct nd_opt_hdr *__res7; + struct nd_opt_hdr *__res8; + struct nd_opt_hdr *__res9; + struct nd_opt_hdr *__res10; + struct nd_opt_hdr *__res11; + struct nd_opt_hdr *__res12; + struct nd_opt_hdr *__res13; + struct nd_opt_nonce *nonce; + struct nd_opt_hdr *__res15; struct nd_opt_hdr *search; /* multiple opts */ struct nd_opt_hdr *last; /* multiple opts */ int done; @@ -417,6 +427,7 @@ union nd_opts { #define nd_opts_pi_end nd_opt_each.pi_end #define nd_opts_rh nd_opt_each.rh #define
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Tue Mar 6 10:37:42 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_util.c files.common src/sys/kern [pgoyette-compat]: exec_elf.c files.kern Log Message: Move necessary routines out of compat_util.c and into exec_elf.c Once again, compat_util.c is only for modules, so move it back into compat/common/files.common and out of kern/files.kern To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.46.18.1 src/sys/compat/common/compat_util.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/files.common cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/kern/exec_elf.c cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/kern/files.kern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_util.c diff -u src/sys/compat/common/compat_util.c:1.46 src/sys/compat/common/compat_util.c:1.46.18.1 --- src/sys/compat/common/compat_util.c:1.46 Sun Nov 9 17:48:07 2014 +++ src/sys/compat/common/compat_util.c Tue Mar 6 10:37:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_util.c,v 1.46 2014/11/09 17:48:07 maxv Exp $ */ +/* $NetBSD: compat_util.c,v 1.46.18.1 2018/03/06 10:37:41 pgoyette Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.46 2014/11/09 17:48:07 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.46.18.1 2018/03/06 10:37:41 pgoyette Exp $"); #include #include @@ -76,80 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: compat_util. #include -void -emul_find_root(struct lwp *l, struct exec_package *epp) -{ - struct vnode *vp; - const char *emul_path; - - if (epp->ep_emul_root != NULL) - /* We've already found it */ - return; - - emul_path = epp->ep_esch->es_emul->e_path; - if (emul_path == NULL) - /* Emulation doesn't have a root */ - return; - - if (namei_simple_kernel(emul_path, NSM_FOLLOW_NOEMULROOT, ) != 0) - /* emulation root doesn't exist */ - return; - - epp->ep_emul_root = vp; -} - -/* - * Search the alternate path for dynamic binary interpreter. If not found - * there, check if the interpreter exists in within 'proper' tree. - */ -int -emul_find_interp(struct lwp *l, struct exec_package *epp, const char *itp) -{ - int error; - struct pathbuf *pb; - struct nameidata nd; - unsigned int flags; - - pb = pathbuf_create(itp); - if (pb == NULL) { - return ENOMEM; - } - - /* If we haven't found the emulation root already, do so now */ - /* Maybe we should remember failures somehow ? */ - if (epp->ep_esch->es_emul->e_path != 0 && epp->ep_emul_root == NULL) - emul_find_root(l, epp); - - if (epp->ep_interp != NULL) - vrele(epp->ep_interp); - - /* We need to use the emulation root for the new program, - * not the one for the current process. */ - if (epp->ep_emul_root == NULL) - flags = FOLLOW; - else { - nd.ni_erootdir = epp->ep_emul_root; - /* hack: Pass in the emulation path for ktrace calls */ - nd.ni_next = epp->ep_esch->es_emul->e_path; - flags = FOLLOW | TRYEMULROOT | EMULROOTSET; - } - - NDINIT(, LOOKUP, flags, pb); - error = namei(); - if (error != 0) { - epp->ep_interp = NULL; - pathbuf_destroy(pb); - return error; - } - - /* Save interpreter in case we actually need to load it */ - epp->ep_interp = nd.ni_vp; - - pathbuf_destroy(pb); - - return 0; -} - /* * Translate one set of flags to another, based on the entries in * the given table. If 'leftover' is specified, it is filled in Index: src/sys/compat/common/files.common diff -u src/sys/compat/common/files.common:1.1.2.2 src/sys/compat/common/files.common:1.1.2.3 --- src/sys/compat/common/files.common:1.1.2.2 Tue Mar 6 10:00:10 2018 +++ src/sys/compat/common/files.common Tue Mar 6 10:37:41 2018 @@ -1,10 +1,11 @@ -# $NetBSD: files.common,v 1.1.2.2 2018/03/06 10:00:10 pgoyette Exp $ +# $NetBSD: files.common,v 1.1.2.3 2018/03/06 10:37:41 pgoyette Exp $ # # Generic files, used by all compat options. # file compat/common/compat_mod.c compat_netbsd file compat/common/compat_exec.c compat_netbsd +file compat/common/compat_util.c compat_netbsd # # Sources for syscall and ioctl compatibility across the versions. Index: src/sys/kern/exec_elf.c diff -u src/sys/kern/exec_elf.c:1.93 src/sys/kern/exec_elf.c:1.93.2.1 --- src/sys/kern/exec_elf.c:1.93 Tue Nov 7 19:44:04 2017 +++ src/sys/kern/exec_elf.c Tue Mar 6 10:37:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.93 2017/11/07 19:44:04 christos Exp $ */ +/* $NetBSD: exec_elf.c,v 1.93.2.1 2018/03/06 10:37:41 pgoyette Exp $ */ /*- * Copyright (c) 1994, 2000, 2005, 2015 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.93 2017/11/07 19:44:04 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.93.2.1 2018/03/06 10:37:41 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_pax.h" @@ -1084,3
CVS commit: [netbsd-8] src/sys/arch
Module Name:src Committed By: martin Date: Tue Mar 6 10:17:12 UTC 2018 Modified Files: src/sys/arch/amd64/conf [netbsd-8]: kern.ldscript kern.ldscript.Xen src/sys/arch/i386/conf [netbsd-8]: kern.ldscript kern.ldscript.Xen src/sys/arch/x86/include [netbsd-8]: cpufunc.h src/sys/arch/x86/x86 [netbsd-8]: patch.c Log Message: Pull up the following revisions, requested by maxv in ticket #603: amd64/conf/kern.ldscript 1.25 (patch) amd64/conf/kern.ldscript.Xen 1.14 (patch) i386/conf/kern.ldscript 1.21 (patch) i386/conf/kern.ldscript.Xen 1.15 (patch) x86/include/cpufunc.h 1.24 (patch) x86/x86/patch.c 1.25 (partial) 1.26 (partial) Backport x86_hotpatch. To generate a diff of this commit: cvs rdiff -u -r1.22.6.1 -r1.22.6.2 src/sys/arch/amd64/conf/kern.ldscript cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/arch/amd64/conf/kern.ldscript.Xen cvs rdiff -u -r1.19 -r1.19.10.1 src/sys/arch/i386/conf/kern.ldscript cvs rdiff -u -r1.13.8.1 -r1.13.8.2 src/sys/arch/i386/conf/kern.ldscript.Xen cvs rdiff -u -r1.22 -r1.22.8.1 src/sys/arch/x86/include/cpufunc.h cvs rdiff -u -r1.22 -r1.22.22.1 src/sys/arch/x86/x86/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/kern.ldscript diff -u src/sys/arch/amd64/conf/kern.ldscript:1.22.6.1 src/sys/arch/amd64/conf/kern.ldscript:1.22.6.2 --- src/sys/arch/amd64/conf/kern.ldscript:1.22.6.1 Wed Jun 21 17:41:50 2017 +++ src/sys/arch/amd64/conf/kern.ldscript Tue Mar 6 10:17:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.22.6.1 2017/06/21 17:41:50 snj Exp $ */ +/* $NetBSD: kern.ldscript,v 1.22.6.2 2018/03/06 10:17:11 martin Exp $ */ #include "assym.h" @@ -29,6 +29,14 @@ SECTIONS . = ALIGN(__LARGE_PAGE_SIZE); __rodata_start = . ; + + .rodata.hotpatch : + { + __rodata_hotpatch_start = . ; + *(.rodata.hotpatch) + __rodata_hotpatch_end = . ; + } + .rodata : { *(.rodata) Index: src/sys/arch/amd64/conf/kern.ldscript.Xen diff -u src/sys/arch/amd64/conf/kern.ldscript.Xen:1.13 src/sys/arch/amd64/conf/kern.ldscript.Xen:1.13.8.1 --- src/sys/arch/amd64/conf/kern.ldscript.Xen:1.13 Tue Aug 2 14:03:34 2016 +++ src/sys/arch/amd64/conf/kern.ldscript.Xen Tue Mar 6 10:17:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.Xen,v 1.13 2016/08/02 14:03:34 maxv Exp $ */ +/* $NetBSD: kern.ldscript.Xen,v 1.13.8.1 2018/03/06 10:17:11 martin Exp $ */ #include "assym.h" @@ -19,6 +19,14 @@ SECTIONS . = ALIGN(__PAGE_SIZE); __rodata_start = . ; + + .rodata.hotpatch : + { + __rodata_hotpatch_start = . ; + *(.rodata.hotpatch) + __rodata_hotpatch_end = . ; + } + .rodata : { *(.rodata) Index: src/sys/arch/i386/conf/kern.ldscript diff -u src/sys/arch/i386/conf/kern.ldscript:1.19 src/sys/arch/i386/conf/kern.ldscript:1.19.10.1 --- src/sys/arch/i386/conf/kern.ldscript:1.19 Sat May 14 08:19:42 2016 +++ src/sys/arch/i386/conf/kern.ldscript Tue Mar 6 10:17:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.19 2016/05/14 08:19:42 maxv Exp $ */ +/* $NetBSD: kern.ldscript,v 1.19.10.1 2018/03/06 10:17:12 martin Exp $ */ #include "assym.h" @@ -19,6 +19,14 @@ SECTIONS . = ALIGN(__PAGE_SIZE); __rodata_start = . ; + + .rodata.hotpatch : + { + __rodata_hotpatch_start = . ; + *(.rodata.hotpatch) + __rodata_hotpatch_end = . ; + } + .rodata : { *(.rodata) Index: src/sys/arch/i386/conf/kern.ldscript.Xen diff -u src/sys/arch/i386/conf/kern.ldscript.Xen:1.13.8.1 src/sys/arch/i386/conf/kern.ldscript.Xen:1.13.8.2 --- src/sys/arch/i386/conf/kern.ldscript.Xen:1.13.8.1 Wed Jul 5 20:02:27 2017 +++ src/sys/arch/i386/conf/kern.ldscript.Xen Tue Mar 6 10:17:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.Xen,v 1.13.8.1 2017/07/05 20:02:27 snj Exp $ */ +/* $NetBSD: kern.ldscript.Xen,v 1.13.8.2 2018/03/06 10:17:12 martin Exp $ */ #include "assym.h" @@ -18,6 +18,14 @@ SECTIONS . = ALIGN(__PAGE_SIZE); __rodata_start = . ; + + .rodata.hotpatch : + { + __rodata_hotpatch_start = . ; + *(.rodata.hotpatch) + __rodata_hotpatch_end = . ; + } + .rodata : { *(.rodata) Index: src/sys/arch/x86/include/cpufunc.h diff -u src/sys/arch/x86/include/cpufunc.h:1.22 src/sys/arch/x86/include/cpufunc.h:1.22.8.1 --- src/sys/arch/x86/include/cpufunc.h:1.22 Tue Dec 13 10:54:27 2016 +++ src/sys/arch/x86/include/cpufunc.h Tue Mar 6 10:17:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.22 2016/12/13 10:54:27 kamil Exp $ */ +/* $NetBSD: cpufunc.h,v 1.22.8.1 2018/03/06 10:17:11 martin Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -50,6 +50,9 @@ void x86_sfence(void); void x86_mfence(void); void x86_flush(void); #ifndef XEN +void x86_hotpatch(uint32_t, const uint8_t *, size_t); +void x86_patch_window_open(u_long *, u_long *); +void x86_patch_window_close(u_long, u_long); void x86_patch(bool); #endif void
CVS commit: [pgoyette-compat] src/sys/conf
Module Name:src Committed By: pgoyette Date: Tue Mar 6 10:07:36 UTC 2018 Modified Files: src/sys/conf [pgoyette-compat]: files Log Message: Re-sequence to declare dependency before depending on it To generate a diff of this commit: cvs rdiff -u -r1.1196.2.2 -r1.1196.2.3 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1196.2.2 src/sys/conf/files:1.1196.2.3 --- src/sys/conf/files:1.1196.2.2 Tue Mar 6 09:55:59 2018 +++ src/sys/conf/files Tue Mar 6 10:07:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1196.2.2 2018/03/06 09:55:59 pgoyette Exp $ +# $NetBSD: files,v 1.1196.2.3 2018/03/06 10:07:35 pgoyette Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -85,7 +85,6 @@ defflag opt_exec.h DEBUG_EXEC defflag opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF64 EXEC_SCRIPT EXEC_ELF_NOTELESS -defflag opt_execfmt.h EXEC_ELF32 : COMPAT_NETBSD32 defflag opt_dkwedge.h DKWEDGE_AUTODISCOVER DKWEDGE_METHOD_BSDLABEL @@ -158,6 +157,7 @@ defflagCOMPAT_SUNOS: COMPAT_30 defflag opt_compat_svr4.h COMPAT_SVR4 COMPAT_SVR4_32 SVR4_COMPAT_SOLARIS2 defflagCOMPAT_ULTRIX: COMPAT_50 defflagCOMPAT_NETBSD32 +defflag opt_execfmt.h EXEC_ELF32 : COMPAT_NETBSD32 defflagCOMPAT_LINUX32 : COMPAT_LINUX, COMPAT_NETBSD32, COMPAT_50 defflagCOMPAT_AOUT_M68K: COMPAT_40
CVS commit: src/sys/netipsec
Module Name:src Committed By: knakahara Date: Tue Mar 6 10:07:06 UTC 2018 Modified Files: src/sys/netipsec: ipsecif.c Log Message: Fix fragment processing in ipsec4_fragout(). Pointed out by maxv@n.o, thanks. XXX need pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/netipsec/ipsecif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsecif.c diff -u src/sys/netipsec/ipsecif.c:1.2 src/sys/netipsec/ipsecif.c:1.3 --- src/sys/netipsec/ipsecif.c:1.2 Mon Feb 26 06:17:01 2018 +++ src/sys/netipsec/ipsecif.c Tue Mar 6 10:07:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsecif.c,v 1.2 2018/02/26 06:17:01 maxv Exp $ */ +/* $NetBSD: ipsecif.c,v 1.3 2018/03/06 10:07:06 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.2 2018/02/26 06:17:01 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.3 2018/03/06 10:07:06 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -265,7 +265,7 @@ ipsecif4_fragout(struct ipsec_variant *v for (error = 0; m; m = next) { next = m->m_nextpkt; - m->m_next = NULL; + m->m_nextpkt = NULL; if (error) { m_freem(m); continue;
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Tue Mar 6 10:00:10 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: files.common Log Message: compat_util.c is included in all kernels, so does not need to be listed here. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/files.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/files.common diff -u src/sys/compat/common/files.common:1.1.2.1 src/sys/compat/common/files.common:1.1.2.2 --- src/sys/compat/common/files.common:1.1.2.1 Tue Mar 6 05:38:20 2018 +++ src/sys/compat/common/files.common Tue Mar 6 10:00:10 2018 @@ -1,11 +1,10 @@ -# $NetBSD: files.common,v 1.1.2.1 2018/03/06 05:38:20 pgoyette Exp $ +# $NetBSD: files.common,v 1.1.2.2 2018/03/06 10:00:10 pgoyette Exp $ # # Generic files, used by all compat options. # file compat/common/compat_mod.c compat_netbsd file compat/common/compat_exec.c compat_netbsd -file compat/common/compat_util.c compat_netbsd # # Sources for syscall and ioctl compatibility across the versions.
CVS commit: [pgoyette-compat] src/sys/conf
Module Name:src Committed By: pgoyette Date: Tue Mar 6 09:55:59 UTC 2018 Modified Files: src/sys/conf [pgoyette-compat]: files Log Message: Expand dependencies for EXEC_ELF32 and COMPAT_LINUX32 To generate a diff of this commit: cvs rdiff -u -r1.1196.2.1 -r1.1196.2.2 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1196.2.1 src/sys/conf/files:1.1196.2.2 --- src/sys/conf/files:1.1196.2.1 Tue Mar 6 05:41:51 2018 +++ src/sys/conf/files Tue Mar 6 09:55:59 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1196.2.1 2018/03/06 05:41:51 pgoyette Exp $ +# $NetBSD: files,v 1.1196.2.2 2018/03/06 09:55:59 pgoyette Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -82,9 +82,10 @@ defflag opt_revcache.h NAMECACHE_ENTER_ defflag opt_exec.h DEBUG_EXEC -defflag opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF32 +defflag opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF64 EXEC_SCRIPT EXEC_ELF_NOTELESS +defflag opt_execfmt.h EXEC_ELF32 : COMPAT_NETBSD32 defflag opt_dkwedge.h DKWEDGE_AUTODISCOVER DKWEDGE_METHOD_BSDLABEL @@ -157,7 +158,8 @@ defflagCOMPAT_SUNOS: COMPAT_30 defflag opt_compat_svr4.h COMPAT_SVR4 COMPAT_SVR4_32 SVR4_COMPAT_SOLARIS2 defflagCOMPAT_ULTRIX: COMPAT_50 defflagCOMPAT_NETBSD32 -defflagCOMPAT_LINUX32 : COMPAT_LINUX, COMPAT_NETBSD32 +defflagCOMPAT_LINUX32 : COMPAT_LINUX, COMPAT_NETBSD32, + COMPAT_50 defflagCOMPAT_AOUT_M68K: COMPAT_40 defflagCOMPAT_M68K4K defflagCOMPAT_VAX1K
CVS commit: [netbsd-8] src
Module Name:src Committed By: martin Date: Tue Mar 6 09:52:09 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES src/lib/libc/sys [netbsd-8]: ptrace.2 src/sys/kern [netbsd-8]: sys_ptrace_common.c src/sys/sys [netbsd-8]: ptrace.h src/tests/lib/libc/sys [netbsd-8]: t_ptrace_wait.c Log Message: Pull up following revision(s) (requested by kamil in ticket #602): doc/CHANGES{,.prev}: revision 1.138 sys/sys/ptrace.h: revision 1.63 lib/libc/sys/ptrace.2: revision 1.68 sys/kern/sys_ptrace_common.c: revision 1.35 (via patch) tests/lib/libc/sys/t_ptrace_wait.c: revision 1.23 Remove PT_GET_SIGMASK / PT_SET_SIGMASK These operations cloned Linux's specific PTRACE_GETSIGMASK / PTRACE_SETSIGMASK. This feature was useful in applications like rr/criu/reptyr-like, where the ptrace(2) interface is abused for the purpose of constructing an arbitrary process. It's not reliable and not portable. For the NetBSD case it will = be better to invent something dedicated for serializing and deserializing a process with threads. Noted on tech-toolchain@ and blog entry "LLDB restoration and return to ptrace(2)" https://blog.netbsd.org/tnf/entry/lldb_restoration_and_return_to To generate a diff of this commit: cvs rdiff -u -r1.2286.2.2 -r1.2286.2.3 src/doc/CHANGES cvs rdiff -u -r1.67 -r1.67.2.1 src/lib/libc/sys/ptrace.2 cvs rdiff -u -r1.22 -r1.22.2.1 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r1.60 -r1.60.6.1 src/sys/sys/ptrace.h cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2286.2.2 src/doc/CHANGES:1.2286.2.3 --- src/doc/CHANGES:1.2286.2.2 Wed Aug 30 15:45:05 2017 +++ src/doc/CHANGES Tue Mar 6 09:52:09 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2286.2.2 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2286.2.3 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -355,6 +355,8 @@ Changes from NetBSD 7.0 to NetBSD 8.0: amd64: Use fine-grained permissions for architecture-specific memory areas (W^X). [maxv 20160725] sdtemp(4): Add support for Atmel AT30TS00, AT30TSE004, Giantec + kernel: SMBFS uses low-overhead NT Directory Change Notify SMB to watch + for vnode kqueue(2) events on directories [jdolecek 20030407] GT30TS00, GT34TS02, Microchip MCP9804, MCP98244, IDT TS3000GB[02], TS3001GB2, TSE200[24]GB2 and On Semiconductor CAT34TS04. [msaitoh 20160726] Index: src/lib/libc/sys/ptrace.2 diff -u src/lib/libc/sys/ptrace.2:1.67 src/lib/libc/sys/ptrace.2:1.67.2.1 --- src/lib/libc/sys/ptrace.2:1.67 Sat Jun 3 19:41:14 2017 +++ src/lib/libc/sys/ptrace.2 Tue Mar 6 09:52:09 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ptrace.2,v 1.67 2017/06/03 19:41:14 abhinav Exp $ +.\" $NetBSD: ptrace.2,v 1.67.2.1 2018/03/06 09:52:09 martin Exp $ .\" .\" This file is in the public domain. .Dd April 7, 2017 @@ -561,31 +561,6 @@ The .Fa data argument should be set to .Li sizeof(struct ptrace_siginfo) . -.It Dv PT_SET_SIGMASK -This request loads the traced process' signal mask from -.Dq Li "sigset_t" -(defined in -.In sys/sigtypes.h ) -pointed to by -.Fa addr . -The -.Fa data -argument contains the LWP ID of the thread whose registers are to -be written. -If zero is supplied, the first thread of the process is written. -.It Dv PT_GET_SIGMASK -This request is the converse of -.Dv PT_SET_SIGMASK ; -it reads the traced process' signal mask into -.Dq Li "sigset_t" -(defined in -.In sys/sigtypes.h ) -pointed to by -.Fa addr . -The -.Fa data -argument contains the LWP ID of the thread whose mask is to be read. -If zero is supplied, the first thread of the process is read. .It Dv PT_RESUME Allow execution of a specified thread, change its state from suspended to continued. Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.22 src/sys/kern/sys_ptrace_common.c:1.22.2.1 --- src/sys/kern/sys_ptrace_common.c:1.22 Wed May 3 15:53:31 2017 +++ src/sys/kern/sys_ptrace_common.c Tue Mar 6 09:52:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.22 2017/05/03 15:53:31 kamil Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.22.2.1 2018/03/06 09:52:09 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.22 2017/05/03 15:53:31 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.22.2.1 2018/03/06 09:52:09 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -213,8 +213,6 @@ ptrace_listener_cb(kauth_cred_t cred, ka case PT_GET_PROCESS_STATE: case PT_SET_SIGINFO: case PT_GET_SIGINFO: - case PT_SET_SIGMASK: - case PT_GET_SIGMASK: #ifdef __HAVE_PTRACE_MACHDEP PTRACE_MACHDEP_REQUEST_CASES
CVS commit: [pgoyette-compat] src/sys/kern
Module Name:src Committed By: pgoyette Date: Tue Mar 6 09:43:06 UTC 2018 Modified Files: src/sys/kern [pgoyette-compat]: files.kern Log Message: Routine emulexec() in kern_exec.c needs emul_find_root(). Since kern_exec.c is included in every kernel, so compat_util.c needs to be included, too. To generate a diff of this commit: cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/kern/files.kern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/files.kern diff -u src/sys/kern/files.kern:1.16.2.1 src/sys/kern/files.kern:1.16.2.2 --- src/sys/kern/files.kern:1.16.2.1 Tue Mar 6 05:44:37 2018 +++ src/sys/kern/files.kern Tue Mar 6 09:43:06 2018 @@ -1,11 +1,11 @@ -# $NetBSD: files.kern,v 1.16.2.1 2018/03/06 05:44:37 pgoyette Exp $ +# $NetBSD: files.kern,v 1.16.2.2 2018/03/06 09:43:06 pgoyette Exp $ # # kernel sources # define kern: machdep, uvm defflag opt_kern.h KERN -#file compat/common/compat_util.c kern +file compat/common/compat_util.c kern file conf/debugsyms.c kern file conf/param.c kern file kern/bufq_disksort.c bufq_disksort
CVS commit: [netbsd-8] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Tue Mar 6 09:27:28 UTC 2018 Modified Files: src/sys/arch/mips/mips [netbsd-8]: cache.c Log Message: Pull up following revision(s) (requested by flxd in ticket #601): sys/arch/mips/mips/cache.c: revision 1.59 Add missing call to mips_dcache_compute_align() affecting "modern" MIPS (MIPS32{,R2}/MIPS64{,R2}). Thanks jmcneill@; OK skrll@. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.58.2.1 src/sys/arch/mips/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.58 src/sys/arch/mips/mips/cache.c:1.58.2.1 --- src/sys/arch/mips/mips/cache.c:1.58 Sun May 14 09:37:13 2017 +++ src/sys/arch/mips/mips/cache.c Tue Mar 6 09:27:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.58 2017/05/14 09:37:13 skrll Exp $ */ +/* $NetBSD: cache.c,v 1.58.2.1 2018/03/06 09:27:27 martin Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.58 2017/05/14 09:37:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.58.2.1 2018/03/06 09:27:27 martin Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -1455,5 +1455,7 @@ mips_config_cache_modern(uint32_t cpu_id mco->mco_intern_pdcache_sync_range_index = no_cache_op_range_index; mco->mco_intern_pdcache_sync_range = no_cache_op_range; } + + mips_dcache_compute_align(); } #endif /* MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2 > 0 */
CVS commit: [netbsd-8] src/sys/netipsec
Module Name:src Committed By: martin Date: Tue Mar 6 09:21:35 UTC 2018 Modified Files: src/sys/netipsec [netbsd-8]: ipsec_input.c Log Message: Pull up following revision(s) (requested by maxv): sys/netipsec/ipsec_input.c: revision 1.57 sys/netipsec/ipsec_input.c: revision 1.58 Extend these #ifdef notyet. The m_copydata's in these branches are wrong, we are not guaranteed to have enough room for another struct ip, and we may crash here. Triggerable remotely, but after authentication, by sending an AH packet that has a one-byte-sized IPIP payload. Argh, in my previous commit in this file I forgot to fix the IPv6 entry point; apply the same fix there. To generate a diff of this commit: cvs rdiff -u -r1.43.2.2 -r1.43.2.3 src/sys/netipsec/ipsec_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.43.2.2 src/sys/netipsec/ipsec_input.c:1.43.2.3 --- src/sys/netipsec/ipsec_input.c:1.43.2.2 Mon Feb 5 14:55:16 2018 +++ src/sys/netipsec/ipsec_input.c Tue Mar 6 09:21:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.43.2.2 2018/02/05 14:55:16 martin Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.43.2.3 2018/03/06 09:21:35 martin Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.43.2.2 2018/02/05 14:55:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.43.2.3 2018/03/06 09:21:35 martin Exp $"); /* * IPsec input processing. @@ -384,14 +384,15 @@ cantpull: prot = ip->ip_p; +#ifdef notyet /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip), ); -#ifdef notyet /* XXX PROXY address isn't recorded in SAH */ /* * Check that the inner source address is the same as @@ -420,7 +421,6 @@ cantpull: error = EACCES; goto bad; } -#endif /*XXX*/ } #if INET6 /* IPv6-in-IP encapsulation. */ @@ -428,9 +428,9 @@ cantpull: struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip6_hdr), ); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -458,9 +458,9 @@ cantpull: error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET6 */ +#endif /* notyet */ key_sa_recordxfer(sav, m); /* record data transfer */ @@ -587,15 +587,16 @@ ipsec6_common_input_cb(struct mbuf *m, s /* Save protocol */ m_copydata(m, protoff, 1, ); +#ifdef notyet #ifdef INET /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip), ); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -621,18 +622,16 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6) { struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip6_hdr), ); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -659,8 +658,8 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } +#endif /* notyet */ key_sa_recordxfer(sav, m);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Mar 6 08:53:41 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Ammend ticket #593 for additional pullup of sys/arch/x86/x86/pmap.c r1.267 To generate a diff of this commit: cvs rdiff -u -r1.1.2.136 -r1.1.2.137 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.136 src/doc/CHANGES-8.0:1.1.2.137 --- src/doc/CHANGES-8.0:1.1.2.136 Thu Mar 1 19:09:02 2018 +++ src/doc/CHANGES-8.0 Tue Mar 6 08:53:41 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.136 2018/03/01 19:09:02 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.137 2018/03/06 08:53:41 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -9973,7 +9973,7 @@ sys/arch/alpha/alpha/pmap.c 1.262 sys/arch/m68k/m68k/pmap_motorola.c 1.70 sys/arch/powerpc/oea/pmap.c 1.95 sys/arch/sparc64/sparc64/pmap.c 1.308 -sys/arch/x86/x86/pmap.c1.266 (via patch) +sys/arch/x86/x86/pmap.c1.266 (via patch),1.267 sys/dev/dtv/dtv_scatter.c 1.4 sys/dev/marvell/mvxpsec.c 1.2 sys/kern/subr_extent.c1.86
CVS commit: [netbsd-8] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Tue Mar 6 08:45:59 UTC 2018 Modified Files: src/sys/arch/x86/x86 [netbsd-8]: pmap.c Log Message: Also pull up r1.267, requested by mrg in ticket #593: avoid a NULL pointer deref and simplify. To generate a diff of this commit: cvs rdiff -u -r1.245.6.2 -r1.245.6.3 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.245.6.2 src/sys/arch/x86/x86/pmap.c:1.245.6.3 --- src/sys/arch/x86/x86/pmap.c:1.245.6.2 Tue Feb 27 09:07:33 2018 +++ src/sys/arch/x86/x86/pmap.c Tue Mar 6 08:45:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.245.6.2 2018/02/27 09:07:33 martin Exp $ */ +/* $NetBSD: pmap.c,v 1.245.6.3 2018/03/06 08:45:59 martin Exp $ */ /*- * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.245.6.2 2018/02/27 09:07:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.245.6.3 2018/03/06 08:45:59 martin Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -1737,8 +1737,8 @@ pmap_pp_needs_pve(struct pmap_page *pp) * since the first pv entry is stored in the pmap_page. */ - return (pp->pp_flags & PP_EMBEDDED) != 0 || - !LIST_EMPTY(>pp_head.pvh_list); + return pp && ((pp->pp_flags & PP_EMBEDDED) != 0 || + !LIST_EMPTY(>pp_head.pvh_list)); } /* @@ -4123,7 +4123,7 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t */ bool needpves = pmap_pp_needs_pve(new_pp); - if (new_pp && needpves) { + if (needpves) { new_pve = pool_cache_get(_pv_cache, PR_NOWAIT); new_sparepve = pool_cache_get(_pv_cache, PR_NOWAIT); } else {
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: skrll Date: Tue Mar 6 08:20:22 UTC 2018 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: Sprinkle __volatile on asm instructions To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/include/armreg.h diff -u src/sys/arch/aarch64/include/armreg.h:1.6 src/sys/arch/aarch64/include/armreg.h:1.7 --- src/sys/arch/aarch64/include/armreg.h:1.6 Tue Mar 6 08:14:17 2018 +++ src/sys/arch/aarch64/include/armreg.h Tue Mar 6 08:20:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.6 2018/03/06 08:14:17 skrll Exp $ */ +/* $NetBSD: armreg.h,v 1.7 2018/03/06 08:20:22 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -36,36 +36,36 @@ #include -#define AARCH64REG_READ_INLINE2(regname, regdesc) \ -static uint64_t inline \ -reg_##regname##_read(void)\ -{ \ - uint64_t __rv; \ - __asm("mrs %0, " #regdesc : "=r"(__rv)); \ - return __rv; \ +#define AARCH64REG_READ_INLINE2(regname, regdesc) \ +static uint64_t inline \ +reg_##regname##_read(void) \ +{\ + uint64_t __rv; \ + __asm __volatile("mrs %0, " #regdesc : "=r"(__rv)); \ + return __rv; \ } -#define AARCH64REG_WRITE_INLINE2(regname, regdesc) \ -static void inline \ -reg_##regname##_write(uint64_t __val) \ -{ \ - __asm("msr " #regdesc ", %0" :: "r"(__val)); \ +#define AARCH64REG_WRITE_INLINE2(regname, regdesc) \ +static void inline \ +reg_##regname##_write(uint64_t __val)\ +{\ + __asm __volatile("msr " #regdesc ", %0" :: "r"(__val)); \ } -#define AARCH64REG_WRITEIMM_INLINE2(regname, regdesc) \ -static void inline \ -reg_##regname##_write(uint64_t __val) \ -{ \ - __asm("msr " #regdesc ", %0" :: "n"(__val)); \ +#define AARCH64REG_WRITEIMM_INLINE2(regname, regdesc) \ +static void inline \ +reg_##regname##_write(uint64_t __val)\ +{\ + __asm __volatile("msr " #regdesc ", %0" :: "n"(__val)); \ } -#define AARCH64REG_READ_INLINE(regname) \ +#define AARCH64REG_READ_INLINE(regname)\ AARCH64REG_READ_INLINE2(regname, regname) -#define AARCH64REG_WRITE_INLINE(regname) \ +#define AARCH64REG_WRITE_INLINE(regname) \ AARCH64REG_WRITE_INLINE2(regname, regname) -#define AARCH64REG_WRITEIMM_INLINE(regname) \ +#define AARCH64REG_WRITEIMM_INLINE(regname) \ AARCH64REG_WRITEIMM_INLINE2(regname, regname) /* * System registers available at EL0 (user)
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: skrll Date: Tue Mar 6 08:14:17 UTC 2018 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: Convert decimal to hex to make comparison to arm arm (slightly) easier. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/include/armreg.h diff -u src/sys/arch/aarch64/include/armreg.h:1.5 src/sys/arch/aarch64/include/armreg.h:1.6 --- src/sys/arch/aarch64/include/armreg.h:1.5 Tue Mar 6 07:36:09 2018 +++ src/sys/arch/aarch64/include/armreg.h Tue Mar 6 08:14:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.5 2018/03/06 07:36:09 skrll Exp $ */ +/* $NetBSD: armreg.h,v 1.6 2018/03/06 08:14:17 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -201,41 +201,41 @@ AARCH64REG_WRITE_INLINE(esr_el1) static const uintmax_t ESR_EC = __BITS(31,26), // Exception Cause - ESR_EC_UNKNOWN = 0, // AXX: Unknown Reason - ESR_EC_WFX = 1, // AXX: WFI or WFE instruction execution - ESR_EC_CP15_RT = 3, // A32: MCR/MRC access to CP15 !EC=0 - ESR_EC_CP15_RRT = 4, // A32: MCRR/MRRC access to CP15 !EC=0 - ESR_EC_CP14_RT = 5, // A32: MCR/MRC access to CP14 - ESR_EC_CP14_DT = 6, // A32: LDC/STC access to CP14 - ESR_EC_FP_ACCESS = 7, // AXX: Access to SIMD/FP Registers - ESR_EC_FPID = 8, // A32: MCR/MRC access to CP10 !EC=7 - ESR_EC_CP14_RRT = 12, // A32: MRRC access to CP14 - ESR_EC_ILL_STATE = 14, // AXX: Illegal Execution State - ESR_EC_SVC_A32 = 17, // A32: SVC Instruction Execution - ESR_EC_HVC_A32 = 18, // A32: HVC Instruction Execution - ESR_EC_SMC_A32 = 19, // A32: SMC Instruction Execution - ESR_EC_SVC_A64 = 21, // A64: SVC Instruction Execution - ESR_EC_HVC_A64 = 22, // A64: HVC Instruction Execution - ESR_EC_SMC_A64 = 23, // A64: SMC Instruction Execution - ESR_EC_SYS_REG = 24, // A64: MSR/MRS/SYS instruction (!EC0/1/7) - ESR_EC_INSN_ABT_EL0 = 32, // AXX: Instruction Abort (EL0) - ESR_EC_INSN_ABT_EL1 = 33, // AXX: Instruction Abort (EL1) - ESR_EC_PC_ALIGNMENT = 34, // AXX: Misaligned PC - ESR_EC_DATA_ABT_EL0 = 36, // AXX: Data Abort (EL0) - ESR_EC_DATA_ABT_EL1 = 37, // AXX: Data Abort (EL1) - ESR_EC_SP_ALIGNMENT = 38, // AXX: Misaligned SP - ESR_EC_FP_TRAP_A32 = 40, // A32: FP Exception - ESR_EC_FP_TRAP_A64 = 44, // A64: FP Exception - ESR_EC_SERROR = 47, // AXX: SError Interrupt - ESR_EC_BRKPNT_EL0 = 48, // AXX: Breakpoint Exception (EL0) - ESR_EC_BRKPNT_EL1 = 49, // AXX: Breakpoint Exception (EL1) - ESR_EC_SW_STEP_EL0 = 50, // AXX: Software Step (EL0) - ESR_EC_SW_STEP_EL1 = 51, // AXX: Software Step (EL1) - ESR_EC_WTCHPNT_EL0 = 52, // AXX: Watchpoint (EL0) - ESR_EC_WTCHPNT_EL1 = 53, // AXX: Watchpoint (EL1) - ESR_EC_BKPT_INSN_A32 = 56, // A32: BKPT Instruction Execution - ESR_EC_VECTOR_CATCH = 58, // A32: Vector Catch Exception - ESR_EC_BKPT_INSN_A64 = 60, // A64: BKPT Instruction Execution + ESR_EC_UNKNOWN = 0x00, // AXX: Unknown Reason + ESR_EC_WFX = 0x01, // AXX: WFI or WFE instruction execution + ESR_EC_CP15_RT = 0x03, // A32: MCR/MRC access to CP15 !EC=0 + ESR_EC_CP15_RRT = 0x04, // A32: MCRR/MRRC access to CP15 !EC=0 + ESR_EC_CP14_RT = 0x05, // A32: MCR/MRC access to CP14 + ESR_EC_CP14_DT = 0x06, // A32: LDC/STC access to CP14 + ESR_EC_FP_ACCESS = 0x07, // AXX: Access to SIMD/FP Registers + ESR_EC_FPID = 0x08, // A32: MCR/MRC access to CP10 !EC=7 + ESR_EC_CP14_RRT = 0x0c, // A32: MRRC access to CP14 + ESR_EC_ILL_STATE = 0x0e, // AXX: Illegal Execution State + ESR_EC_SVC_A32 = 0x11, // A32: SVC Instruction Execution + ESR_EC_HVC_A32 = 0x12, // A32: HVC Instruction Execution + ESR_EC_SMC_A32 = 0x13, // A32: SMC Instruction Execution + ESR_EC_SVC_A64 = 0x15, // A64: SVC Instruction Execution + ESR_EC_HVC_A64 = 0x16, // A64: HVC Instruction Execution + ESR_EC_SMC_A64 = 0x17, // A64: SMC Instruction Execution + ESR_EC_SYS_REG = 0x18, // A64: MSR/MRS/SYS instruction (!EC0/1/7) + ESR_EC_INSN_ABT_EL0 = 0x20, // AXX: Instruction Abort (EL0) + ESR_EC_INSN_ABT_EL1 = 0x21, // AXX: Instruction Abort (EL1) + ESR_EC_PC_ALIGNMENT = 0x22, // AXX: Misaligned PC + ESR_EC_DATA_ABT_EL0 = 0x24, // AXX: Data Abort (EL0) + ESR_EC_DATA_ABT_EL1 = 0x25, // AXX: Data Abort (EL1) + ESR_EC_SP_ALIGNMENT = 0x26, // AXX: Misaligned SP + ESR_EC_FP_TRAP_A32 = 0x28, // A32: FP Exception + ESR_EC_FP_TRAP_A64 = 0x2c, // A64: FP Exception + ESR_EC_SERROR = 0x2f, // AXX: SError Interrupt + ESR_EC_BRKPNT_EL0 = 0x30, // AXX: Breakpoint Exception (EL0) + ESR_EC_BRKPNT_EL1 = 0x31, // AXX: Breakpoint Exception (EL1) + ESR_EC_SW_STEP_EL0 = 0x32, // AXX: Software Step (EL0) +
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: mlelstv Date: Tue Mar 6 07:59:59 UTC 2018 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: Add DIOCLWEDGES To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.58 -r1.59 src/sys/compat/netbsd32/netbsd32_ioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.91 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.92 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.91 Fri Jan 19 23:38:56 2018 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Tue Mar 6 07:59:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.91 2018/01/19 23:38:56 macallan Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.92 2018/03/06 07:59:59 mlelstv Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.91 2018/01/19 23:38:56 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.92 2018/03/06 07:59:59 mlelstv Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -535,6 +535,18 @@ netbsd32_to_devrescanargs( p->locators = NETBSD32PTR64(s32p->locators); } +static inline void +netbsd32_to_dkwedge_list( +const struct netbsd32_dkwedge_list *s32p, +struct dkwedge_list *p, +u_long cmd) +{ + p->dkwl_buf = s32p->dkwl_buf; + p->dkwl_bufsize = s32p->dkwl_bufsize; + p->dkwl_nwedges = s32p->dkwl_nwedges; + p->dkwl_ncopied = s32p->dkwl_ncopied; +} + /* * handle ioctl conversions from 64-bit kernel -> netbsd32 */ @@ -977,6 +989,18 @@ netbsd32_from_devrescanargs( NETBSD32PTR32(s32p->locators, p->locators); } +static inline void +netbsd32_from_dkwedge_list( +const struct dkwedge_list *p, +struct netbsd32_dkwedge_list *s32p, +u_long cmd) +{ + s32p->dkwl_buf = p->dkwl_buf; + s32p->dkwl_bufsize = p->dkwl_bufsize; + s32p->dkwl_nwedges = p->dkwl_nwedges; + s32p->dkwl_ncopied = p->dkwl_ncopied; +} + #ifdef NTP static int netbsd32_do_clockctl_ntp_adjtime(struct clockctl_ntp_adjtime *args) @@ -1433,6 +1457,9 @@ netbsd32_ioctl(struct lwp *l, const stru case DRVGETEVENT32: IOCTL_STRUCT_CONV_TO(DRVGETEVENT, plistref); + case DIOCLWEDGES32: + IOCTL_STRUCT_CONV_TO(DIOCLWEDGES, dkwedge_list); + default: #ifdef NETBSD32_MD_IOCTL error = netbsd32_md_ioctl(fp, com, data32, l); Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.58 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.59 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.58 Fri Jan 19 23:38:56 2018 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Tue Mar 6 07:59:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.h,v 1.58 2018/01/19 23:38:56 macallan Exp $ */ +/* $NetBSD: netbsd32_ioctl.h,v 1.59 2018/03/06 07:59:59 mlelstv Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -633,3 +633,15 @@ struct netbsd32_devrescanargs { #define DRVCTLCOMMAND32 _IOWR('D', 125, struct netbsd32_plistref) #define DRVLISTDEV32 _IOWR('D', 127, struct netbsd32_devlistargs) #define DRVGETEVENT32 _IOR('D', 128, struct netbsd32_plistref) + +/* From sys/disk.h, sys/dkio.h */ + +struct netbsd32_dkwedge_list { + void *dkwl_buf; /* storage for dkwedge_info array */ + netbsd32_size_t dkwl_bufsize; /* size of that buffer */ + u_int dkwl_nwedges; /* total number of wedges */ + u_int dkwl_ncopied; /* number actually copied */ +}; + +#define DIOCLWEDGES32 _IOWR('d', 124, struct netbsd32_dkwedge_list) +