CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Feb 20 07:30:57 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Increment rxr->packets correctly in ixgbe_rxeof() to calculate ITR value of AIM (Auto Interrupt Moderation) correctly. See also ixgbe.c rev. 1.124. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ix_txrx.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.30 src/sys/dev/pci/ixgbe/ix_txrx.c:1.31 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.30 Mon Dec 4 09:29:42 2017 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue Feb 20 07:30:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.30 2017/12/04 09:29:42 msaitoh Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.31 2018/02/20 07:30:57 msaitoh Exp $ */ /** @@ -1855,6 +1855,7 @@ ixgbe_rxeof(struct ix_queue *que) mp->m_next = nbuf->buf; } else { /* Sending this frame */ m_set_rcvif(sendmp, ifp); + ++rxr->packets; rxr->rx_packets.ev_count++; /* capture data for AIM */ rxr->bytes += sendmp->m_pkthdr.len;
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Feb 20 07:30:57 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Increment rxr->packets correctly in ixgbe_rxeof() to calculate ITR value of AIM (Auto Interrupt Moderation) correctly. See also ixgbe.c rev. 1.124. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Feb 20 07:24:37 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h Log Message: - Fix a bug that RX may stall on heavy load on ixg(4) derived from FreeBSD's AIM (Auto Interrupt Moderation) bug. When I use a machine as a NFS client, sometimes one of queue pairs doesn't get any interrupt other than every second tick via ixgbe_local_timer1(). When the problem occured, the queue pair's hw.ixgM.qN.interrupt_rate is always 50. When this problem occuring, set hw.ixgM.qN.interrupt_rate lower than 17 recover from stall. i.e.: sysctl -w hw.ixgM.qN.interrupt_rate=17 (don't revocer) sysctl -w hw.ixgM.qN.interrupt_rate=16 (recover) Relatios between the interrupt_rate and EICR's ITR_INTERVAL field is as follows: int_rate | EICR[11:0] | interval in us | recover | |(ITR_INTERVAL)| (10G and 1G) | | -+--++-+ 50 | 0x008(0) | 2 | not | 17 | 0x010(1) | 4 | not | 16 | 0x018(2) | 6 | recover | The reason why int_rate becomes 50 is that xgbe_tx_eof() doesn't increment rxr->packets(*1). Even if we fix rxr->packets' bug, interrupt_rate might become greater than 16 and it might cause stall. While reading datasheets, knakahara noticed a section titled with "ITR Affect on RSC Functionality". It says "When RSC is enabled on specific RX queues, the associated ITR interval with these queus must be enabled and must be larger (in time uints) than RSC delay". Currently, RSC_DELAY field in the GPIE register is 0 and it means 4us for 10G and 1G. The greater ITR_INTERVAL value of 4us is 6us == 16. Yes, BINGO! This description is noted in 82599 and newer datasheets and not in 82598 datasheet. I don't know if 82598 has this limitation but, I apply this limitation all of chips. (*1) Note that this bug is going to be fixed in the next commit to distinct between two different bugs. - The bitfield of EITR register is different between 82598 and others. Only ixgbe_msix_que() taken care of it. Make new function ixgbe_eitr_write() and use it in all of functions which modify ITR_INTERVAL. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixgbe_type.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue Feb 20 07:24:37 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h Log Message: - Fix a bug that RX may stall on heavy load on ixg(4) derived from FreeBSD's AIM (Auto Interrupt Moderation) bug. When I use a machine as a NFS client, sometimes one of queue pairs doesn't get any interrupt other than every second tick via ixgbe_local_timer1(). When the problem occured, the queue pair's hw.ixgM.qN.interrupt_rate is always 50. When this problem occuring, set hw.ixgM.qN.interrupt_rate lower than 17 recover from stall. i.e.: sysctl -w hw.ixgM.qN.interrupt_rate=17 (don't revocer) sysctl -w hw.ixgM.qN.interrupt_rate=16 (recover) Relatios between the interrupt_rate and EICR's ITR_INTERVAL field is as follows: int_rate | EICR[11:0] | interval in us | recover | |(ITR_INTERVAL)| (10G and 1G) | | -+--++-+ 50 | 0x008(0) | 2 | not | 17 | 0x010(1) | 4 | not | 16 | 0x018(2) | 6 | recover | The reason why int_rate becomes 50 is that xgbe_tx_eof() doesn't increment rxr->packets(*1). Even if we fix rxr->packets' bug, interrupt_rate might become greater than 16 and it might cause stall. While reading datasheets, knakahara noticed a section titled with "ITR Affect on RSC Functionality". It says "When RSC is enabled on specific RX queues, the associated ITR interval with these queus must be enabled and must be larger (in time uints) than RSC delay". Currently, RSC_DELAY field in the GPIE register is 0 and it means 4us for 10G and 1G. The greater ITR_INTERVAL value of 4us is 6us == 16. Yes, BINGO! This description is noted in 82599 and newer datasheets and not in 82598 datasheet. I don't know if 82598 has this limitation but, I apply this limitation all of chips. (*1) Note that this bug is going to be fixed in the next commit to distinct between two different bugs. - The bitfield of EITR register is different between 82598 and others. Only ixgbe_msix_que() taken care of it. Make new function ixgbe_eitr_write() and use it in all of functions which modify ITR_INTERVAL. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixgbe_type.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/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.123 src/sys/dev/pci/ixgbe/ixgbe.c:1.124 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.123 Fri Feb 16 10:11:21 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 20 07:24:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.123 2018/02/16 10:11:21 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.124 2018/02/20 07:24:37 msaitoh Exp $ */ /** @@ -207,6 +207,7 @@ static void ixgbe_update_link_status static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); static void ixgbe_configure_ivars(struct adapter *); static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); +static void ixgbe_eitr_write(struct ix_queue *, uint32_t); static void ixgbe_setup_vlan_hw_support(struct adapter *); #if 0 @@ -2465,8 +2466,7 @@ ixgbe_msix_que(void *arg) *the last interval. */ if (que->eitr_setting) - IXGBE_WRITE_REG(>hw, IXGBE_EITR(que->msix), - que->eitr_setting); + ixgbe_eitr_write(que, que->eitr_setting); que->eitr_setting = 0; @@ -2489,11 +2489,18 @@ ixgbe_msix_que(void *arg) else newitr = (newitr / 2); -if (adapter->hw.mac.type == ixgbe_mac_82598EB) -newitr |= newitr << 16; -else -newitr |= IXGBE_EITR_CNT_WDIS; - + /* + * When RSC is used, ITR interval must be larger than RSC_DELAY. + * Currently, we use 2us for RSC_DELAY. The minimum value is always + * greater than 2us on 100M (and 10M?(not documented)), but it's not + * on 1G and higher. + */ + if ((adapter->link_speed != IXGBE_LINK_SPEED_100_FULL) + && (adapter->link_speed != IXGBE_LINK_SPEED_10_FULL)) { + if (newitr < IXGBE_MIN_RSC_EITR_10G1G) + newitr = IXGBE_MIN_RSC_EITR_10G1G; + } + /* save for next interrupt */ que->eitr_setting = newitr; @@ -2933,6 +2940,21 @@ ixgbe_msix_link(void *arg) return 1; } /* ixgbe_msix_link */ +static void +ixgbe_eitr_write(struct ix_queue *que, uint32_t itr) +{ + struct adapter *adapter = que->adapter; + +if (adapter->hw.mac.type == ixgbe_mac_82598EB) +itr |= itr << 16; +else +itr |= IXGBE_EITR_CNT_WDIS; + + IXGBE_WRITE_REG(>hw, IXGBE_EITR(que->msix), + itr); +} + + / *
Re: CVS commit: src/sys/dist/pf/net
Christos Zoulas wrote: > + if (so == NULL) > + return -1; > + if (so->so_cred == NULL) { > + DPFPRINTF(PF_DEBUG_URGENT, > + ("%s: so->so_cred == NULL so=%p\n", __func__, so)); > + return -1; > + } > pd->lookup.uid = kauth_cred_geteuid(so->so_cred); > pd->lookup.gid = kauth_cred_getegid(so->so_cred); > #else I think it's perfectly normal for an incoming packet to have no cred. For instance, if that packet is about to be accepted. pd->lookup.uid and pd->lookup.gid are set to UID_MAX and GID_MAX at the beginning of the function. They can be probably changed only if so_cred is set: if (so == NULL) return -1; if (so->so_cred != NULL) { pd->lookup.uid = kauth_cred_geteuid(so->so_cred); pd->lookup.gid = kauth_cred_getegid(so->so_cred); } -- Alex
CVS commit: src/lib/libpthread
Module Name:src Committed By: kamil Date: Tue Feb 20 05:10:52 UTC 2018 Modified Files: src/lib/libpthread: pthread.h Log Message: Remove namespace restriction from pthread_condattr_{g,s}etclock(3) These functions were marked as _NETBSD_SOURCE when introduced to the sources. In fact they are regular POSIX threading functions available since the 2001 standard. There is an older mention about alignment with "IEEE Std 1003.1j-2000". This corrects usage of these functions when a source code is compiled with a POSIX namespace option. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libpthread/pthread.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libpthread
Module Name:src Committed By: kamil Date: Tue Feb 20 05:10:52 UTC 2018 Modified Files: src/lib/libpthread: pthread.h Log Message: Remove namespace restriction from pthread_condattr_{g,s}etclock(3) These functions were marked as _NETBSD_SOURCE when introduced to the sources. In fact they are regular POSIX threading functions available since the 2001 standard. There is an older mention about alignment with "IEEE Std 1003.1j-2000". This corrects usage of these functions when a source code is compiled with a POSIX namespace option. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libpthread/pthread.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpthread/pthread.h diff -u src/lib/libpthread/pthread.h:1.40 src/lib/libpthread/pthread.h:1.41 --- src/lib/libpthread/pthread.h:1.40 Tue Feb 6 20:22:23 2018 +++ src/lib/libpthread/pthread.h Tue Feb 20 05:10:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.h,v 1.40 2018/02/06 20:22:23 christos Exp $ */ +/* $NetBSD: pthread.h,v 1.41 2018/02/20 05:10:51 kamil Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -135,11 +135,9 @@ int pthread_cond_timedwait(pthread_cond_ int pthread_cond_signal(pthread_cond_t *); int pthread_cond_broadcast(pthread_cond_t *); int pthread_condattr_init(pthread_condattr_t *); -#if defined(_NETBSD_SOURCE) int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); int pthread_condattr_getclock(const pthread_condattr_t * __restrict, clockid_t * __restrict); -#endif int pthread_condattr_destroy(pthread_condattr_t *); #ifdef _PTHREAD_PSHARED int pthread_condattr_getpshared(const pthread_condattr_t * __restrict,
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Tue Feb 20 03:34:52 UTC 2018 Modified Files: src/sys/kern: subr_lockdebug.c Log Message: Spinkle __predict_false to LOCKDEBUG functions Panics and lockdebug failures are unlikely to occur normally. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/kern/subr_lockdebug.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/kern/subr_lockdebug.c diff -u src/sys/kern/subr_lockdebug.c:1.59 src/sys/kern/subr_lockdebug.c:1.60 --- src/sys/kern/subr_lockdebug.c:1.59 Wed Feb 14 03:56:26 2018 +++ src/sys/kern/subr_lockdebug.c Tue Feb 20 03:34:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_lockdebug.c,v 1.59 2018/02/14 03:56:26 ozaki-r Exp $ */ +/* $NetBSD: subr_lockdebug.c,v 1.60 2018/02/20 03:34:52 ozaki-r Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.59 2018/02/14 03:56:26 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.60 2018/02/20 03:34:52 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -196,7 +196,7 @@ lockdebug_lookup(const char *func, size_ lockdebug_t *ld; ld = lockdebug_lookup1(lock); - if (ld == NULL) { + if (__predict_false(ld == NULL)) { panic("%s,%zu: uninitialized lock (lock=%p, from=%08" PRIxPTR ")", func, line, lock, where); } @@ -246,14 +246,14 @@ lockdebug_alloc(const char *func, size_t lockdebug_t *ld; int s; - if (lo == NULL || panicstr != NULL || ld_panic) + if (__predict_false(lo == NULL || panicstr != NULL || ld_panic)) return false; - if (ld_freeptr == 0) + if (__predict_false(ld_freeptr == 0)) lockdebug_init(); s = splhigh(); __cpu_simple_lock(_mod_lk); - if ((ld = lockdebug_lookup1(lock)) != NULL) { + if (__predict_false((ld = lockdebug_lookup1(lock)) != NULL)) { __cpu_simple_unlock(_mod_lk); lockdebug_abort1(func, line, ld, s, "already initialized", true); @@ -281,7 +281,7 @@ lockdebug_alloc(const char *func, size_t } else if (ci->ci_lkdebug_recurse == 1 && ld_nfree < LD_SLOP) { s = lockdebug_more(s); } - if ((ld = TAILQ_FIRST(_free)) == NULL) { + if (__predict_false((ld = TAILQ_FIRST(_free)) == NULL)) { __cpu_simple_unlock(_mod_lk); splx(s); return false; @@ -290,7 +290,7 @@ lockdebug_alloc(const char *func, size_t ld_nfree--; ci->ci_lkdebug_recurse--; - if (ld->ld_lock != NULL) { + if (__predict_false(ld->ld_lock != NULL)) { panic("%s,%zu: corrupt table ld %p", func, line, ld); } @@ -322,20 +322,21 @@ lockdebug_free(const char *func, size_t lockdebug_t *ld; int s; - if (panicstr != NULL || ld_panic) + if (__predict_false(panicstr != NULL || ld_panic)) return; s = splhigh(); __cpu_simple_lock(_mod_lk); ld = lockdebug_lookup(func, line, lock, (uintptr_t) __builtin_return_address(0)); - if (ld == NULL) { + if (__predict_false(ld == NULL)) { __cpu_simple_unlock(_mod_lk); panic("%s,%zu: destroying uninitialized object %p" "(ld_lock=%p)", func, line, lock, ld->ld_lock); return; } - if ((ld->ld_flags & LD_LOCKED) != 0 || ld->ld_shares != 0) { + if (__predict_false((ld->ld_flags & LD_LOCKED) != 0 || + ld->ld_shares != 0)) { __cpu_simple_unlock(_mod_lk); lockdebug_abort1(func, line, ld, s, "is locked or in use", true); @@ -430,7 +431,7 @@ lockdebug_wantlock(const char *func, siz (void)shared; recurse = false; - if (panicstr != NULL || ld_panic) + if (__predict_false(panicstr != NULL || ld_panic)) return; s = splhigh(); @@ -446,7 +447,7 @@ lockdebug_wantlock(const char *func, siz recurse = true; } if (cpu_intr_p()) { - if ((ld->ld_flags & LD_SLEEPER) != 0) { + if (__predict_false((ld->ld_flags & LD_SLEEPER) != 0)) { lockdebug_abort1(func, line, ld, s, "acquiring sleep lock from interrupt context", true); @@ -457,7 +458,7 @@ lockdebug_wantlock(const char *func, siz ld->ld_shwant++; else if (shared == 0) ld->ld_exwant++; - if (recurse) { + if (__predict_false(recurse)) { lockdebug_abort1(func, line, ld, s, "locking against myself", true); return; @@ -479,7 +480,7 @@ lockdebug_locked(const char *func, size_ lockdebug_t *ld; int s; - if (panicstr != NULL || ld_panic) + if (__predict_false(panicstr != NULL || ld_panic)) return; s = splhigh(); @@ -493,7 +494,7 @@ lockdebug_locked(const char *func, size_ /* nothing */ } else if (ld->ld_shares++ == 0) { ld->ld_locked = (uintptr_t)cvlock; - } else if (cvlock != (void *)ld->ld_locked) { + } else if (__predict_false(cvlock != (void *)ld->ld_locked)) { lockdebug_abort1(func, line, ld, s, "multiple locks used with condition variable", true); @@ -505,7 +506,7 @@ lockdebug_locked(const char *func, size_ ld->ld_shares++; ld->ld_shwant--; } else { - if ((ld->ld_flags & LD_LOCKED) !=
CVS commit: src/sys/kern
Module Name:src Committed By: ozaki-r Date: Tue Feb 20 03:34:52 UTC 2018 Modified Files: src/sys/kern: subr_lockdebug.c Log Message: Spinkle __predict_false to LOCKDEBUG functions Panics and lockdebug failures are unlikely to occur normally. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/kern/subr_lockdebug.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: kamil Date: Tue Feb 20 02:52:41 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Improve the setbuf(3) man-page Move historical lines to newly added HISTORY section. Additional historical notes obtained from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: kamil Date: Tue Feb 20 02:52:41 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Improve the setbuf(3) man-page Move historical lines to newly added HISTORY section. Additional historical notes obtained from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.14 src/lib/libc/stdio/setbuf.3:1.15 --- src/lib/libc/stdio/setbuf.3:1.14 Wed Jul 15 19:08:43 2015 +++ src/lib/libc/stdio/setbuf.3 Tue Feb 20 02:52:41 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: setbuf.3,v 1.14 2015/07/15 19:08:43 christos Exp $ +.\" $NetBSD: setbuf.3,v 1.15 2018/02/20 02:52:41 kamil Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -205,19 +205,24 @@ and functions conform to .St -ansiC . -.Sh BUGS +.Sh HISTORY +The +.Fn setbuf +function first appeared in +.At v7 . The .Fn setbuffer -and +function first appeared in +.Bx 4.1c . +The .Fn setlinebuf -functions are not portable to versions of -.Bx -before +function first appeared in .Bx 4.2 . -On -.Bx 4.2 -and -.Bx 4.3 -systems, +The +.Fn setvbuf +function first appeared in +.Bx 4.4 . +.Sh BUGS +The .Fn setbuf -always uses a suboptimal buffer size and should be avoided. +function usually uses a suboptimal buffer size and should be avoided.
CVS commit: src/include
Module Name:src Committed By: kamil Date: Tue Feb 20 02:35:24 UTC 2018 Modified Files: src/include: string.h Log Message: Mark in string.h: memccpy(3) and strdup(3) as _POSIX_C_SOURCE >= 2001 To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/include/string.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/string.h diff -u src/include/string.h:1.51 src/include/string.h:1.52 --- src/include/string.h:1.51 Wed Oct 12 20:01:22 2016 +++ src/include/string.h Tue Feb 20 02:35:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: string.h,v 1.51 2016/10/12 20:01:22 christos Exp $ */ +/* $NetBSD: string.h,v 1.52 2018/02/20 02:35:24 kamil Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -74,7 +74,8 @@ int strerror_r(int, char *, size_t); #endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */ size_t strxfrm(char * __restrict, const char * __restrict, size_t); -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) +#if (_POSIX_C_SOURCE - 0 >= 200112L) || defined(_XOPEN_SOURCE) || \ +defined(_NETBSD_SOURCE) void *memccpy(void *, const void *, int, size_t); char *strdup(const char *); #endif
CVS commit: src/include
Module Name:src Committed By: kamil Date: Tue Feb 20 02:35:24 UTC 2018 Modified Files: src/include: string.h Log Message: Mark in string.h: memccpy(3) and strdup(3) as _POSIX_C_SOURCE >= 2001 To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/include/string.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: pgoyette Date: Tue Feb 20 01:53:39 UTC 2018 Modified Files: src/sys/dev/isa: wbsio.c Log Message: Handle watchdog attachment in the wbsio_rescan() function, where we take care of other children. ok knakahara@ and yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/wbsio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: pgoyette Date: Tue Feb 20 01:53:39 UTC 2018 Modified Files: src/sys/dev/isa: wbsio.c Log Message: Handle watchdog attachment in the wbsio_rescan() function, where we take care of other children. ok knakahara@ and yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/wbsio.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/isa/wbsio.c diff -u src/sys/dev/isa/wbsio.c:1.21 src/sys/dev/isa/wbsio.c:1.22 --- src/sys/dev/isa/wbsio.c:1.21 Tue Jan 2 00:47:14 2018 +++ src/sys/dev/isa/wbsio.c Tue Feb 20 01:53:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wbsio.c,v 1.21 2018/01/02 00:47:14 pgoyette Exp $ */ +/* $NetBSD: wbsio.c,v 1.22 2018/02/20 01:53:39 pgoyette Exp $ */ /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis@@ -284,8 +284,7 @@ wbsio_attach(device_t parent, device_t s if (!pmf_device_register(self, wbsio_suspend, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - wbsio_wdog_attach(self); - + sc->sc_smw_valid = false; wbsio_rescan(self, "wbsio", NULL); #if NGPIO > 0 @@ -336,6 +335,8 @@ wbsio_rescan(device_t self, const char * #endif config_search_loc(wbsio_search, self, ifattr, locators, NULL); + wbsio_wdog_attach(self); + return 0; } @@ -799,7 +800,8 @@ wbsio_wdog_attach(device_t self) uint16_t devid; uint8_t rev; - sc->sc_smw_valid = false; + if (sc->sc_smw_valid) + return; /* watchdog already attached */ wbsio_conf_enable(>sc_conf_lock, sc->sc_iot, sc->sc_ioh); devid = wbsio_conf_read(sc->sc_iot, sc->sc_ioh, WBSIO_ID);
Re: CVS commit: src/sys/dist/pf/net
On Feb 19, 11:35pm, al...@yandex.ru (Alexander Nasonov) wrote: -- Subject: Re: CVS commit: src/sys/dist/pf/net | Christos Zoulas wrote: | > On Feb 19, 10:55pm, al...@yandex.ru (Alexander Nasonov) wrote: | > -- Subject: Re: CVS commit: src/sys/dist/pf/net | > | > | I think it's perfectly normal for an incoming packet to have no | > | cred. For instance, if that packet is about to be accepted. | > | > Yes, that is what I was thinking. | > | > | pd->lookup.uid and pd->lookup.gid are set to UID_MAX and GID_MAX | > | at the beginning of the function. They can be probably changed only | > | if so_cred is set: | > | | > | if (so == NULL) return -1; if (so->so_cred != NULL) { pd->lookup.uid = kauth_cred_geteuid(so->so_cred); pd->lookup.gid = kauth_cred_getegid(so->so_cred); } | > | > Or should return -1 there too without printing anything... | > I have not looked if -1 is handled differently. | > | | What does return -1 do? Skip a packet? Reject? | | I think it reasonable to set uid to something that can't belong to | a real user and pass control to pf matching engine. I don't know | about pf internals to confirm whether this can work as expected. | | So, I'm running the new kernel with my change to pf_socket_lookup | and without your change in ipc_socket2.c. I see randomly rejected | packets in pflog but otherwise it runs fine. | | I'll try your change tomorrow. I changed it to return -1 and did not change the uipc_socket2.c code to add the credentials. Returning -1 means that there is no info to do the matching there, so it is ok (looking at the lookup.done variable). christos
Re: CVS commit: src/sys/dist/pf/net
Christos Zoulas wrote: > On Feb 19, 10:55pm, al...@yandex.ru (Alexander Nasonov) wrote: > -- Subject: Re: CVS commit: src/sys/dist/pf/net > > | I think it's perfectly normal for an incoming packet to have no > | cred. For instance, if that packet is about to be accepted. > > Yes, that is what I was thinking. > > | pd->lookup.uid and pd->lookup.gid are set to UID_MAX and GID_MAX > | at the beginning of the function. They can be probably changed only > | if so_cred is set: > | > | if (so == NULL) > > return -1; >if (so->so_cred != NULL) { > > pd->lookup.uid = > kauth_cred_geteuid(so->so_cred); > pd->lookup.gid = > kauth_cred_getegid(so->so_cred); > } > > Or should return -1 there too without printing anything... > I have not looked if -1 is handled differently. > What does return -1 do? Skip a packet? Reject? I think it reasonable to set uid to something that can't belong to a real user and pass control to pf matching engine. I don't know about pf internals to confirm whether this can work as expected. So, I'm running the new kernel with my change to pf_socket_lookup and without your change in ipc_socket2.c. I see randomly rejected packets in pflog but otherwise it runs fine. I'll try your change tomorrow. -- Alex
CVS commit: src/sys/dist/pf/net
Module Name:src Committed By: christos Date: Mon Feb 19 23:03:00 UTC 2018 Modified Files: src/sys/dist/pf/net: pf.c Log Message: It is normal for socket credentials to be missing for incoming sockets, so don't warn. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dist/pf/net/pf.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/dist/pf/net/pf.c diff -u src/sys/dist/pf/net/pf.c:1.79 src/sys/dist/pf/net/pf.c:1.80 --- src/sys/dist/pf/net/pf.c:1.79 Sun Feb 18 16:51:28 2018 +++ src/sys/dist/pf/net/pf.c Mon Feb 19 18:03:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pf.c,v 1.79 2018/02/18 21:51:28 christos Exp $ */ +/* $NetBSD: pf.c,v 1.80 2018/02/19 23:03:00 christos Exp $ */ /* $OpenBSD: pf.c,v 1.552.2.1 2007/11/27 16:37:57 henning Exp $ */ /* @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.79 2018/02/18 21:51:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.80 2018/02/19 23:03:00 christos Exp $"); #include "pflog.h" @@ -2847,13 +2847,8 @@ pf_socket_lookup(int direction, struct p break; #endif /* INET6 */ } - if (so == NULL) + if (so == NULL || so->so_cred == NULL) return -1; - if (so->so_cred == NULL) { - DPFPRINTF(PF_DEBUG_URGENT, - ("%s: so->so_cred == NULL so=%p\n", __func__, so)); - return -1; - } pd->lookup.uid = kauth_cred_geteuid(so->so_cred); pd->lookup.gid = kauth_cred_getegid(so->so_cred); #else
CVS commit: src/sys/dist/pf/net
Module Name:src Committed By: christos Date: Mon Feb 19 23:03:00 UTC 2018 Modified Files: src/sys/dist/pf/net: pf.c Log Message: It is normal for socket credentials to be missing for incoming sockets, so don't warn. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dist/pf/net/pf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dist/pf/net
On Feb 19, 10:55pm, al...@yandex.ru (Alexander Nasonov) wrote: -- Subject: Re: CVS commit: src/sys/dist/pf/net | I think it's perfectly normal for an incoming packet to have no | cred. For instance, if that packet is about to be accepted. Yes, that is what I was thinking. | pd->lookup.uid and pd->lookup.gid are set to UID_MAX and GID_MAX | at the beginning of the function. They can be probably changed only | if so_cred is set: | | if (so == NULL) return -1; if (so->so_cred != NULL) { pd->lookup.uid = kauth_cred_geteuid(so->so_cred); pd->lookup.gid = kauth_cred_getegid(so->so_cred); } Or should return -1 there too without printing anything... I have not looked if -1 is handled differently. christos
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 22:01:16 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h Log Message: convert to use actual __BITMAP_*() macros from , and make it possible to override the ASID bitmap length; default to 256 ASIDs as before XXX NFCI; compile tested only on evbpcc and evbmips, unfortunately didn't find any combination of port using the MI pmap_tlb.c and working in QEMU To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/uvm/pmap/pmap_tlb.c cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.24 src/sys/uvm/pmap/pmap_tlb.c:1.25 --- src/sys/uvm/pmap/pmap_tlb.c:1.24 Mon Feb 19 21:40:45 2018 +++ src/sys/uvm/pmap/pmap_tlb.c Mon Feb 19 22:01:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.24 2018/02/19 21:40:45 jdolecek Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.25 2018/02/19 22:01:15 jdolecek Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.24 2018/02/19 21:40:45 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.25 2018/02/19 22:01:15 jdolecek Exp $"); /* * Manages address spaces in a TLB. @@ -140,6 +140,10 @@ static kmutex_t pmap_tlb0_lock __cacheli #define IFCONSTANT(x) (__builtin_constant_p((x)) ? (x) : 0) +#if KERNEL_PID > 31 +#error "KERNEL_PID expected in range 0-31" +#endif + struct pmap_tlb_info pmap_tlb0_info = { .ti_name = "tlb0", .ti_asid_hint = KERNEL_PID + 1, @@ -147,7 +151,7 @@ struct pmap_tlb_info pmap_tlb0_info = { .ti_asid_max = IFCONSTANT(PMAP_TLB_NUM_PIDS - 1), .ti_asids_free = IFCONSTANT(PMAP_TLB_NUM_PIDS - (1 + KERNEL_PID)), #endif - .ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1, + .ti_asid_bitmap._b[0] = __BIT(KERNEL_PID), #ifdef PMAP_TLB_WIRED_UPAGES .ti_wired = PMAP_TLB_WIRED_UPAGES, #endif @@ -167,22 +171,19 @@ struct pmap_tlb_info *pmap_tlbs[PMAP_TLB u_int pmap_ntlbs = 1; #endif -#define __BITMAP_SET(bm, n) \ - ((bm)[(n) / (8*sizeof(bm[0]))] |= 1LU << ((n) % (8*sizeof(bm[0] -#define __BITMAP_CLR(bm, n) \ - ((bm)[(n) / (8*sizeof(bm[0]))] &= ~(1LU << ((n) % (8*sizeof(bm[0]) -#define __BITMAP_ISSET_P(bm, n) \ - (((bm)[(n) / (8*sizeof(bm[0]))] & (1LU << ((n) % (8*sizeof(bm[0]) != 0) - #define TLBINFO_ASID_MARK_UNUSED(ti, asid) \ - __BITMAP_CLR((ti)->ti_asid_bitmap, (asid)) + __BITMAP_CLR((asid), &(ti)->ti_asid_bitmap) #define TLBINFO_ASID_MARK_USED(ti, asid) \ - __BITMAP_SET((ti)->ti_asid_bitmap, (asid)) + __BITMAP_SET((asid), &(ti)->ti_asid_bitmap) #define TLBINFO_ASID_INUSE_P(ti, asid) \ - __BITMAP_ISSET_P((ti)->ti_asid_bitmap, (asid)) + __BITMAP_ISSET((asid), &(ti)->ti_asid_bitmap) +#define TLBINFO_ASID_RESET(ti) \ + do { \ + __BITMAP_ZERO(>ti_asid_bitmap); \ + TLBINFO_ASID_MARK_USED(ti, KERNEL_PID); \ + } while (0) #define TLBINFO_ASID_INITIAL_FREE(ti) \ ((ti)->ti_asid_max + 1 /* 0 */ - 1 /* reserved KERNEL_PID */) - #ifdef MULTIPROCESSOR __unused static inline bool @@ -337,7 +338,7 @@ pmap_tlb_info_init(struct pmap_tlb_info KASSERT(pmap_tlbs[pmap_ntlbs] == NULL); ti->ti_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); - ti->ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1; + TLBINFO_ASID_MARK_USED(ti, KERNEL_PID); ti->ti_asid_hint = KERNEL_PID + 1; ti->ti_asid_max = pmap_tlbs[0]->ti_asid_max; ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); @@ -350,6 +351,8 @@ pmap_tlb_info_init(struct pmap_tlb_info snprintf(ti->ti_name, sizeof(ti->ti_name), "tlb%u", ti->ti_index); pmap_tlb_info_evcnt_attach(ti); + + KASSERT(ti->ti_asid_max < PMAP_TLB_BITMAP_LENGTH); return; } #endif @@ -368,7 +371,7 @@ pmap_tlb_info_init(struct pmap_tlb_info ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); } - KASSERT(ti->ti_asid_max < sizeof(ti->ti_asid_bitmap)*8); + KASSERT(ti->ti_asid_max < PMAP_TLB_BITMAP_LENGTH); } #if defined(MULTIPROCESSOR) @@ -413,9 +416,6 @@ pmap_tlb_asid_count(struct pmap_tlb_info static void pmap_tlb_asid_reinitialize(struct pmap_tlb_info *ti, enum tlb_invalidate_op op) { - const size_t asid_bitmap_words = - ti->ti_asid_max / (8 * sizeof(ti->ti_asid_bitmap[0])); - UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist); UVMHIST_LOG(maphist, "(ti=%#jx, op=%ju)", (uintptr_t)ti, op, 0, 0); @@ -429,10 +429,7 @@ pmap_tlb_asid_reinitialize(struct pmap_t */ ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); ti->ti_asid_hint = KERNEL_PID + 1; - ti->ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1; - for (size_t word = 1; word <= asid_bitmap_words; word++) { - ti->ti_asid_bitmap[word] = 0; - } + TLBINFO_ASID_RESET(ti); switch (op) { #if defined(MULTIPROCESSOR) && defined(PMAP_TLB_NEED_SHOOTDOWN) @@ -455,8 +452,8 @@ pmap_tlb_asid_reinitialize(struct pmap_t */ #if
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 22:01:16 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h Log Message: convert to use actual __BITMAP_*() macros from , and make it possible to override the ASID bitmap length; default to 256 ASIDs as before XXX NFCI; compile tested only on evbpcc and evbmips, unfortunately didn't find any combination of port using the MI pmap_tlb.c and working in QEMU To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/uvm/pmap/pmap_tlb.c cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap_tlb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 21:40:45 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c Log Message: a bit of DRY - add macro for initial free ASID count To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.23 src/sys/uvm/pmap/pmap_tlb.c:1.24 --- src/sys/uvm/pmap/pmap_tlb.c:1.23 Mon Feb 19 21:20:33 2018 +++ src/sys/uvm/pmap/pmap_tlb.c Mon Feb 19 21:40:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.24 2018/02/19 21:40:45 jdolecek Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.24 2018/02/19 21:40:45 jdolecek Exp $"); /* * Manages address spaces in a TLB. @@ -180,6 +180,9 @@ u_int pmap_ntlbs = 1; __BITMAP_SET((ti)->ti_asid_bitmap, (asid)) #define TLBINFO_ASID_INUSE_P(ti, asid) \ __BITMAP_ISSET_P((ti)->ti_asid_bitmap, (asid)) +#define TLBINFO_ASID_INITIAL_FREE(ti) \ + ((ti)->ti_asid_max + 1 /* 0 */ - 1 /* reserved KERNEL_PID */) + #ifdef MULTIPROCESSOR __unused static inline bool @@ -337,7 +340,7 @@ pmap_tlb_info_init(struct pmap_tlb_info ti->ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1; ti->ti_asid_hint = KERNEL_PID + 1; ti->ti_asid_max = pmap_tlbs[0]->ti_asid_max; - ti->ti_asids_free = ti->ti_asid_max - KERNEL_PID; + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); ti->ti_tlbinvop = TLBINV_NOBODY; ti->ti_victim = NULL; kcpuset_create(>ti_kcpuset, true); @@ -362,7 +365,7 @@ pmap_tlb_info_init(struct pmap_tlb_info //printf("asid "); if (ti->ti_asid_max == 0) { ti->ti_asid_max = pmap_md_tlb_asid_max(); - ti->ti_asids_free = ti->ti_asid_max - KERNEL_PID; + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); } KASSERT(ti->ti_asid_max < sizeof(ti->ti_asid_bitmap)*8); @@ -424,7 +427,7 @@ pmap_tlb_asid_reinitialize(struct pmap_t * First, clear the ASID bitmap (except for ASID 0 which belongs * to the kernel). */ - ti->ti_asids_free = ti->ti_asid_max - KERNEL_PID; + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); ti->ti_asid_hint = KERNEL_PID + 1; ti->ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1; for (size_t word = 1; word <= asid_bitmap_words; word++) { @@ -476,7 +479,7 @@ pmap_tlb_asid_reinitialize(struct pmap_t word++) { ti->ti_asid_bitmap[word] = 0; } - ti->ti_asids_free = ti->ti_asid_max - KERNEL_PID; + ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti); #if !defined(MULTIPROCESSOR) || defined(PMAP_TLB_NEED_SHOOTDOWN) } else { ti->ti_asids_free -= asids_found;
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 21:40:45 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c Log Message: a bit of DRY - add macro for initial free ASID count To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/uvm/pmap/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 21:20:34 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h Log Message: make it possible to not use the icache evcnts To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/uvm/pmap/pmap_tlb.c cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.22 src/sys/uvm/pmap/pmap_tlb.c:1.23 --- src/sys/uvm/pmap/pmap_tlb.c:1.22 Sat Oct 28 00:37:13 2017 +++ src/sys/uvm/pmap/pmap_tlb.c Mon Feb 19 21:20:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.22 2017/10/28 00:37:13 pgoyette Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.22 2017/10/28 00:37:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek Exp $"); /* * Manages address spaces in a TLB. @@ -296,7 +296,7 @@ pmap_tlb_pai_reset(struct pmap_tlb_info void pmap_tlb_info_evcnt_attach(struct pmap_tlb_info *ti) { -#if defined(MULTIPROCESSOR) +#if defined(MULTIPROCESSOR) && !defined(PMAP_TLB_NO_SYNCI_EVCNT) evcnt_attach_dynamic_nozero(>ti_evcnt_synci_desired, EVCNT_TYPE_MISC, NULL, ti->ti_name, "icache syncs desired"); @@ -315,7 +315,7 @@ pmap_tlb_info_evcnt_attach(struct pmap_t evcnt_attach_dynamic_nozero(>ti_evcnt_synci_deferred, EVCNT_TYPE_MISC, >ti_evcnt_synci_desired, ti->ti_name, "icache pages deferred"); -#endif /* MULTIPROCESSOR */ +#endif /* MULTIPROCESSOR && !PMAP_TLB_NO_SYNCI_EVCNT */ evcnt_attach_dynamic_nozero(>ti_evcnt_asid_reinits, EVCNT_TYPE_MISC, NULL, ti->ti_name, "asid pool reinit"); Index: src/sys/uvm/pmap/pmap_tlb.h diff -u src/sys/uvm/pmap/pmap_tlb.h:1.11 src/sys/uvm/pmap/pmap_tlb.h:1.12 --- src/sys/uvm/pmap/pmap_tlb.h:1.11 Sat Jun 24 05:31:03 2017 +++ src/sys/uvm/pmap/pmap_tlb.h Mon Feb 19 21:20:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.h,v 1.11 2017/06/24 05:31:03 skrll Exp $ */ +/* $NetBSD: pmap_tlb.h,v 1.12 2018/02/19 21:20:33 jdolecek Exp $ */ /* * Copyright (c) 1992, 1993 @@ -129,12 +129,14 @@ struct pmap_tlb_info { #else #define tlbinfo_index(ti) ((void)(ti), 0) #endif +#if !defined(PMAP_TLB_NO_SYNCI_EVCNT) struct evcnt ti_evcnt_synci_asts; struct evcnt ti_evcnt_synci_all; struct evcnt ti_evcnt_synci_pages; struct evcnt ti_evcnt_synci_deferred; struct evcnt ti_evcnt_synci_desired; struct evcnt ti_evcnt_synci_duplicate; +#endif /* !PMAP_TLB_NO_SYNCI_EVCNT */ #else #define tlbinfo_index(ti) ((void)(ti), 0) #endif
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jdolecek Date: Mon Feb 19 21:20:34 UTC 2018 Modified Files: src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h Log Message: make it possible to not use the icache evcnts To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/uvm/pmap/pmap_tlb.c cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/pmap/pmap_tlb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:37 UTC 2018 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.324 -r1.1.2.325 src/doc/CHANGES-6.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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.324 src/doc/CHANGES-6.2:1.1.2.325 --- src/doc/CHANGES-6.2:1.1.2.324 Fri Feb 16 18:10:40 2018 +++ src/doc/CHANGES-6.2 Mon Feb 19 20:56:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.324 2018/02/16 18:10:40 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.325 2018/02/19 20:56:37 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -21064,3 +21064,12 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #1531] +sys/arch/amd64/amd64/machdep.c 1.280 via patch +sys/arch/amd64/include/segments.h 1.34 via patch +sys/arch/i386/i386/machdep.c 1.800 via patch +sys/arch/i386/include/segments.h 1.64 via patch +sys/arch/x86/x86/vm_machdep.c 1.30 via patch + + Prevent unrestricted userland access to I/O ports in XEN. + [maxv, ticket #1517] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:37 UTC 2018 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.324 -r1.1.2.325 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:16 UTC 2018 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.128 -r1.1.2.129 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.128 src/doc/CHANGES-6.1.6:1.1.2.129 --- src/doc/CHANGES-6.1.6:1.1.2.128 Fri Feb 16 18:12:03 2018 +++ src/doc/CHANGES-6.1.6 Mon Feb 19 20:56:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.128 2018/02/16 18:12:03 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.129 2018/02/19 20:56:16 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -15007,3 +15007,12 @@ sys/netipsec/ipsec.c1.130 [maxv, ticket #1531] +sys/arch/amd64/amd64/machdep.c 1.280 via patch +sys/arch/amd64/include/segments.h 1.34 via patch +sys/arch/i386/i386/machdep.c 1.800 via patch +sys/arch/i386/include/segments.h 1.64 via patch +sys/arch/x86/x86/vm_machdep.c 1.30 via patch + + Prevent unrestricted userland access to I/O ports in XEN. + [maxv, ticket #1517] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:16 UTC 2018 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.128 -r1.1.2.129 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:55:45 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-0]: machdep.c src/sys/arch/amd64/include [netbsd-6-0]: segments.h src/sys/arch/i386/i386 [netbsd-6-0]: machdep.c src/sys/arch/i386/include [netbsd-6-0]: segments.h src/sys/arch/x86/x86 [netbsd-6-0]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.7.2.2 -r1.175.2.7.2.3 \ src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.14.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.7.4.1 -r1.717.2.7.4.2 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.16.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.6.1 src/sys/arch/x86/x86/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:02 UTC 2018 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.131 -r1.1.2.132 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 20:56:02 UTC 2018 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1517 To generate a diff of this commit: cvs rdiff -u -r1.1.2.131 -r1.1.2.132 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.131 src/doc/CHANGES-6.0.7:1.1.2.132 --- src/doc/CHANGES-6.0.7:1.1.2.131 Fri Feb 16 18:13:22 2018 +++ src/doc/CHANGES-6.0.7 Mon Feb 19 20:56:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.131 2018/02/16 18:13:22 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.132 2018/02/19 20:56:02 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -15333,3 +15333,12 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #1531] +sys/arch/amd64/amd64/machdep.c 1.280 via patch +sys/arch/amd64/include/segments.h 1.34 via patch +sys/arch/i386/i386/machdep.c 1.800 via patch +sys/arch/i386/include/segments.h 1.64 via patch +sys/arch/x86/x86/vm_machdep.c 1.30 via patch + + Prevent unrestricted userland access to I/O ports in XEN. + [maxv, ticket #1517] +
CVS commit: [netbsd-6-0] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:55:45 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-0]: machdep.c src/sys/arch/amd64/include [netbsd-6-0]: segments.h src/sys/arch/i386/i386 [netbsd-6-0]: machdep.c src/sys/arch/i386/include [netbsd-6-0]: segments.h src/sys/arch/x86/x86 [netbsd-6-0]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.7.2.2 -r1.175.2.7.2.3 \ src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.14.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.7.4.1 -r1.717.2.7.4.2 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.16.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.6.1 src/sys/arch/x86/x86/vm_machdep.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/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.175.2.7.2.2 src/sys/arch/amd64/amd64/machdep.c:1.175.2.7.2.3 --- src/sys/arch/amd64/amd64/machdep.c:1.175.2.7.2.2 Tue Aug 8 11:55:20 2017 +++ src/sys/arch/amd64/amd64/machdep.c Mon Feb 19 20:55:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.175.2.7.2.2 2017/08/08 11:55:20 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.175.2.7.2.3 2018/02/19 20:55:44 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.7.2.2 2017/08/08 11:55:20 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.7.2.3 2018/02/19 20:55:44 snj Exp $"); /* #define XENDEBUG_LOW */ @@ -477,7 +477,7 @@ x86_64_proc0_tss_ldt_init(void) pcb->pcb_fs = 0; pcb->pcb_gs = 0; pcb->pcb_rsp0 = (uvm_lwp_getuarea(l) + KSTACK_SIZE - 16) & ~0xf; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; pmap_kernel()->pm_ldt_sel = GSYSSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; Index: src/sys/arch/amd64/include/segments.h diff -u src/sys/arch/amd64/include/segments.h:1.22 src/sys/arch/amd64/include/segments.h:1.22.14.1 --- src/sys/arch/amd64/include/segments.h:1.22 Mon Feb 7 03:54:45 2011 +++ src/sys/arch/amd64/include/segments.h Mon Feb 19 20:55:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.22 2011/02/07 03:54:45 chs Exp $ */ +/* $NetBSD: segments.h,v 1.22.14.1 2018/02/19 20:55:44 snj Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -107,6 +107,12 @@ #define ISLDT(s) ((s) & SEL_LDT) /* is it local or global */ #define SEL_LDT 4 /* local descriptor table */ +#ifdef XEN +#define IOPL_KPL 1 +#else +#define IOPL_KPL SEL_KPL +#endif + /* Dynamically allocated TSSs and LDTs start (byte offset) */ #define SYSSEL_START (NGDT_MEM << 3) #define DYNSEL_START (SYSSEL_START + (NGDT_SYS << 4)) Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.717.2.7.4.1 src/sys/arch/i386/i386/machdep.c:1.717.2.7.4.2 --- src/sys/arch/i386/i386/machdep.c:1.717.2.7.4.1 Tue Aug 8 11:55:20 2017 +++ src/sys/arch/i386/i386/machdep.c Mon Feb 19 20:55:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.717.2.7.4.1 2017/08/08 11:55:20 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.717.2.7.4.2 2018/02/19 20:55:44 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.7.4.1 2017/08/08 11:55:20 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.7.4.2 2018/02/19 20:55:44 snj Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -509,7 +509,7 @@ i386_proc0_tss_ldt_init(void) pmap_kernel()->pm_ldt_sel = GSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; pcb->pcb_esp0 = uvm_lwp_getuarea(l) + KSTACK_SIZE - 16; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; l->l_md.md_regs = (struct trapframe
CVS commit: [netbsd-6-1] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:54:53 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-1]: machdep.c src/sys/arch/amd64/include [netbsd-6-1]: segments.h src/sys/arch/i386/i386 [netbsd-6-1]: machdep.c src/sys/arch/i386/include [netbsd-6-1]: segments.h src/sys/arch/x86/x86 [netbsd-6-1]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.8.2.1 -r1.175.2.8.2.2 \ src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.16.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.7.6.1 -r1.717.2.7.6.2 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.24.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.8.1 src/sys/arch/x86/x86/vm_machdep.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/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.175.2.8.2.1 src/sys/arch/amd64/amd64/machdep.c:1.175.2.8.2.2 --- src/sys/arch/amd64/amd64/machdep.c:1.175.2.8.2.1 Tue Aug 8 11:59:16 2017 +++ src/sys/arch/amd64/amd64/machdep.c Mon Feb 19 20:54:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.175.2.8.2.1 2017/08/08 11:59:16 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.175.2.8.2.2 2018/02/19 20:54:52 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.8.2.1 2017/08/08 11:59:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.8.2.2 2018/02/19 20:54:52 snj Exp $"); /* #define XENDEBUG_LOW */ @@ -477,7 +477,7 @@ x86_64_proc0_tss_ldt_init(void) pcb->pcb_fs = 0; pcb->pcb_gs = 0; pcb->pcb_rsp0 = (uvm_lwp_getuarea(l) + KSTACK_SIZE - 16) & ~0xf; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; pmap_kernel()->pm_ldt_sel = GSYSSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; Index: src/sys/arch/amd64/include/segments.h diff -u src/sys/arch/amd64/include/segments.h:1.22 src/sys/arch/amd64/include/segments.h:1.22.16.1 --- src/sys/arch/amd64/include/segments.h:1.22 Mon Feb 7 03:54:45 2011 +++ src/sys/arch/amd64/include/segments.h Mon Feb 19 20:54:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.22 2011/02/07 03:54:45 chs Exp $ */ +/* $NetBSD: segments.h,v 1.22.16.1 2018/02/19 20:54:52 snj Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -107,6 +107,12 @@ #define ISLDT(s) ((s) & SEL_LDT) /* is it local or global */ #define SEL_LDT 4 /* local descriptor table */ +#ifdef XEN +#define IOPL_KPL 1 +#else +#define IOPL_KPL SEL_KPL +#endif + /* Dynamically allocated TSSs and LDTs start (byte offset) */ #define SYSSEL_START (NGDT_MEM << 3) #define DYNSEL_START (SYSSEL_START + (NGDT_SYS << 4)) Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.717.2.7.6.1 src/sys/arch/i386/i386/machdep.c:1.717.2.7.6.2 --- src/sys/arch/i386/i386/machdep.c:1.717.2.7.6.1 Tue Aug 8 11:59:16 2017 +++ src/sys/arch/i386/i386/machdep.c Mon Feb 19 20:54:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.717.2.7.6.1 2017/08/08 11:59:16 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.717.2.7.6.2 2018/02/19 20:54:53 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.7.6.1 2017/08/08 11:59:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.7.6.2 2018/02/19 20:54:53 snj Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -509,7 +509,7 @@ i386_proc0_tss_ldt_init(void) pmap_kernel()->pm_ldt_sel = GSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; pcb->pcb_esp0 = uvm_lwp_getuarea(l) + KSTACK_SIZE - 16; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; l->l_md.md_regs = (struct trapframe
CVS commit: [netbsd-6-1] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:54:53 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-1]: machdep.c src/sys/arch/amd64/include [netbsd-6-1]: segments.h src/sys/arch/i386/i386 [netbsd-6-1]: machdep.c src/sys/arch/i386/include [netbsd-6-1]: segments.h src/sys/arch/x86/x86 [netbsd-6-1]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.8.2.1 -r1.175.2.8.2.2 \ src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.16.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.7.6.1 -r1.717.2.7.6.2 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.24.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.8.1 src/sys/arch/x86/x86/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:54:38 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6]: machdep.c src/sys/arch/amd64/include [netbsd-6]: segments.h src/sys/arch/i386/i386 [netbsd-6]: machdep.c src/sys/arch/i386/include [netbsd-6]: segments.h src/sys/arch/x86/x86 [netbsd-6]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.9 -r1.175.2.10 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.10.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.8 -r1.717.2.9 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.10.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.2.1 src/sys/arch/x86/x86/vm_machdep.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/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.175.2.9 src/sys/arch/amd64/amd64/machdep.c:1.175.2.10 --- src/sys/arch/amd64/amd64/machdep.c:1.175.2.9 Tue Aug 8 12:00:35 2017 +++ src/sys/arch/amd64/amd64/machdep.c Mon Feb 19 20:54:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.175.2.9 2017/08/08 12:00:35 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.175.2.10 2018/02/19 20:54:37 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.9 2017/08/08 12:00:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.10 2018/02/19 20:54:37 snj Exp $"); /* #define XENDEBUG_LOW */ @@ -477,7 +477,7 @@ x86_64_proc0_tss_ldt_init(void) pcb->pcb_fs = 0; pcb->pcb_gs = 0; pcb->pcb_rsp0 = (uvm_lwp_getuarea(l) + KSTACK_SIZE - 16) & ~0xf; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; pmap_kernel()->pm_ldt_sel = GSYSSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; Index: src/sys/arch/amd64/include/segments.h diff -u src/sys/arch/amd64/include/segments.h:1.22 src/sys/arch/amd64/include/segments.h:1.22.10.1 --- src/sys/arch/amd64/include/segments.h:1.22 Mon Feb 7 03:54:45 2011 +++ src/sys/arch/amd64/include/segments.h Mon Feb 19 20:54:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.22 2011/02/07 03:54:45 chs Exp $ */ +/* $NetBSD: segments.h,v 1.22.10.1 2018/02/19 20:54:37 snj Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -107,6 +107,12 @@ #define ISLDT(s) ((s) & SEL_LDT) /* is it local or global */ #define SEL_LDT 4 /* local descriptor table */ +#ifdef XEN +#define IOPL_KPL 1 +#else +#define IOPL_KPL SEL_KPL +#endif + /* Dynamically allocated TSSs and LDTs start (byte offset) */ #define SYSSEL_START (NGDT_MEM << 3) #define DYNSEL_START (SYSSEL_START + (NGDT_SYS << 4)) Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.717.2.8 src/sys/arch/i386/i386/machdep.c:1.717.2.9 --- src/sys/arch/i386/i386/machdep.c:1.717.2.8 Tue Aug 8 12:00:35 2017 +++ src/sys/arch/i386/i386/machdep.c Mon Feb 19 20:54:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.717.2.8 2017/08/08 12:00:35 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.717.2.9 2018/02/19 20:54:38 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.8 2017/08/08 12:00:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.9 2018/02/19 20:54:38 snj Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -509,7 +509,7 @@ i386_proc0_tss_ldt_init(void) pmap_kernel()->pm_ldt_sel = GSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0() & ~CR0_TS; pcb->pcb_esp0 = uvm_lwp_getuarea(l) + KSTACK_SIZE - 16; - pcb->pcb_iopl = SEL_KPL; + pcb->pcb_iopl = IOPL_KPL; l->l_md.md_regs = (struct trapframe *)pcb->pcb_esp0 - 1; memcpy(>pcb_fsd, [GUDATA_SEL], sizeof(pcb->pcb_fsd));
CVS commit: [netbsd-6] src/sys/arch
Module Name:src Committed By: snj Date: Mon Feb 19 20:54:38 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6]: machdep.c src/sys/arch/amd64/include [netbsd-6]: segments.h src/sys/arch/i386/i386 [netbsd-6]: machdep.c src/sys/arch/i386/include [netbsd-6]: segments.h src/sys/arch/x86/x86 [netbsd-6]: vm_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1517): sys/arch/amd64/amd64/machdep.c: 1.280 via patch sys/arch/amd64/include/segments.h: 1.34 via patch sys/arch/i386/i386/machdep.c: 1.800 sys/arch/i386/include/segments.h: 1.64 sys/arch/x86/x86/vm_machdep.c: 1.30 Fix a huge privilege separation vulnerability in Xen-amd64. On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL equals SEL_UPL. While Xen can make a distinction between usermode and kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes to read and write to the CPU ports. It is easy, then, to completely escalate privileges; by reprogramming the PIC, by reading the ATA disks, by intercepting the keyboard interrupts (keylogger), etc. Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use the ports but not userland. I didn't test this change on i386, but it seems fine enough. To generate a diff of this commit: cvs rdiff -u -r1.175.2.9 -r1.175.2.10 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.22 -r1.22.10.1 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.717.2.8 -r1.717.2.9 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.54 -r1.54.10.1 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.14 -r1.14.2.1 src/sys/arch/x86/x86/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Feb 19 20:52:09 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch sparc to openssl-1.1 To generate a diff of this commit: cvs rdiff -u -r1.1034 -r1.1035 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Feb 19 20:52:09 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch sparc to openssl-1.1 To generate a diff of this commit: cvs rdiff -u -r1.1034 -r1.1035 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1034 src/share/mk/bsd.own.mk:1.1035 --- src/share/mk/bsd.own.mk:1.1034 Sat Feb 17 16:46:15 2018 +++ src/share/mk/bsd.own.mk Mon Feb 19 15:52:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1034 2018/02/17 21:46:15 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1035 2018/02/19 20:52:09 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -101,7 +101,9 @@ MKGCCCMDS?= no # What OpenSSL is used? # .if ${MACHINE} == "amd64" || \ -${MACHINE} == "i386" +${MACHINE} == "i386" || \ +${MACHINE} == "sparc64" || \ +${MACHINE} == "sparc" HAVE_OPENSSL?= 11 .else HAVE_OPENSSL?= 10
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Mon Feb 19 20:49:01 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add ANR and another ARC acronyms To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.191 src/share/misc/acronyms.comp:1.192 --- src/share/misc/acronyms.comp:1.191 Mon Feb 12 20:43:17 2018 +++ src/share/misc/acronyms.comp Mon Feb 19 20:49:01 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.191 2018/02/12 20:43:17 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.192 2018/02/19 20:49:01 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -46,6 +46,7 @@ AMP asymmetric multiprocessing AMQP advanced message queuing protocol AMT active management technology AN Arabic number +ANR application not responding ANSI American National Standards Institute AO analog output AOL Alert-on-LAN @@ -59,6 +60,7 @@ APT advanced persistent threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache +ARC automatic reference counting ARM Advanced RISC Machines ARP Address Resolution Protocol ARPA Advanced Research Projects Agency
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Mon Feb 19 20:49:01 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add ANR and another ARC acronyms To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:26:51 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Add H6 support To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/sunxi/sunxi_mmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:26:51 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Add H6 support To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/sunxi/sunxi_mmc.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/arm/sunxi/sunxi_mmc.c diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.19 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.20 --- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.19 Mon Jan 8 14:40:18 2018 +++ src/sys/arch/arm/sunxi/sunxi_mmc.c Mon Feb 19 20:26:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mmc.c,v 1.19 2018/01/08 14:40:18 jakllsch Exp $ */ +/* $NetBSD: sunxi_mmc.c,v 1.20 2018/02/19 20:26:51 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_sunximmc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.19 2018/01/08 14:40:18 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.20 2018/02/19 20:26:51 jmcneill Exp $"); #include #include @@ -252,6 +252,22 @@ static const struct sunxi_mmc_config sun .flags = SUNXI_MMC_FLAG_CALIB_REG, }; +static const struct sunxi_mmc_config sun50i_h6_mmc_config = { + .idma_xferlen = 0x1, + .dma_ftrglevel = 0x20070008, + .delays = NULL, + .flags = SUNXI_MMC_FLAG_CALIB_REG | + SUNXI_MMC_FLAG_NEW_TIMINGS | + SUNXI_MMC_FLAG_MASK_DATA0, +}; + +static const struct sunxi_mmc_config sun50i_h6_emmc_config = { + .idma_xferlen = 0x2000, + .dma_ftrglevel = 0x20070008, + .delays = NULL, + .flags = SUNXI_MMC_FLAG_CALIB_REG, +}; + static const struct of_compat_data compat_data[] = { { "allwinner,sun4i-a10-mmc", (uintptr_t)_a10_mmc_config }, { "allwinner,sun5i-a13-mmc", (uintptr_t)_a13_mmc_config }, @@ -260,6 +276,8 @@ static const struct of_compat_data compa { "allwinner,sun9i-a80-mmc", (uintptr_t)_a80_mmc_config }, { "allwinner,sun50i-a64-mmc", (uintptr_t)_a64_mmc_config }, { "allwinner,sun50i-a64-emmc", (uintptr_t)_a64_emmc_config }, + { "allwinner,sun50i-h6-mmc", (uintptr_t)_h6_mmc_config }, + { "allwinner,sun50i-h6-emmc", (uintptr_t)_h6_emmc_config }, { NULL } };
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:22:48 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_emac.c Log Message: Add H6 support To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sunxi_emac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:22:48 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_emac.c Log Message: Add H6 support To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sunxi_emac.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/arm/sunxi/sunxi_emac.c diff -u src/sys/arch/arm/sunxi/sunxi_emac.c:1.12 src/sys/arch/arm/sunxi/sunxi_emac.c:1.13 --- src/sys/arch/arm/sunxi/sunxi_emac.c:1.12 Fri Dec 22 13:39:57 2017 +++ src/sys/arch/arm/sunxi/sunxi_emac.c Mon Feb 19 20:22:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_emac.c,v 1.12 2017/12/22 13:39:57 jmcneill Exp $ */ +/* $NetBSD: sunxi_emac.c,v 1.13 2018/02/19 20:22:48 jmcneill Exp $ */ /*- * Copyright (c) 2016-2017 Jared McNeill@@ -33,7 +33,7 @@ #include "opt_net_mpsafe.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.12 2017/12/22 13:39:57 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.13 2018/02/19 20:22:48 jmcneill Exp $"); #include #include @@ -126,15 +126,17 @@ static int sunxi_emac_rx_tx_pri = RX_TX_ static int sunxi_emac_pause_time = PAUSE_TIME_DEFAULT; enum sunxi_emac_type { - EMAC_A83T = 1, + EMAC_A64 = 1, + EMAC_A83T, EMAC_H3, - EMAC_A64, + EMAC_H6, }; static const struct of_compat_data compat_data[] = { { "allwinner,sun8i-a83t-emac", EMAC_A83T }, { "allwinner,sun8i-h3-emac", EMAC_H3 }, { "allwinner,sun50i-a64-emac", EMAC_A64 }, + { "allwinner,sun50i-h6-emac", EMAC_H6 }, { NULL } }; @@ -933,11 +935,19 @@ sunxi_emac_setup_phy(struct sunxi_emac_s else reg |= EMAC_CLK_PIT_MII | EMAC_CLK_SRC_MII; - if (of_getprop_uint32(sc->phandle, "tx-delay", _delay) == 0) { + if (of_getprop_uint32(sc->phandle, "allwinner,tx-delay-ps", + _delay) == 0) { + reg &= ~EMAC_CLK_ETXDC; + reg |= ((tx_delay / 100) << EMAC_CLK_ETXDC_SHIFT); + } else if (of_getprop_uint32(sc->phandle, "tx-delay", _delay) == 0) { reg &= ~EMAC_CLK_ETXDC; reg |= (tx_delay << EMAC_CLK_ETXDC_SHIFT); } - if (of_getprop_uint32(sc->phandle, "rx-delay", _delay) == 0) { + if (of_getprop_uint32(sc->phandle, "allwinner,rx-delay-ps", + _delay) == 0) { + reg &= ~EMAC_CLK_ERXDC; + reg |= ((rx_delay / 100) << EMAC_CLK_ERXDC_SHIFT); + } else if (of_getprop_uint32(sc->phandle, "rx-delay", _delay) == 0) { reg &= ~EMAC_CLK_ERXDC; reg |= (rx_delay << EMAC_CLK_ERXDC_SHIFT); }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:15:23 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_usbphy.c Log Message: Add support for H6 USB PHY To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/sunxi/sunxi_usbphy.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/arm/sunxi/sunxi_usbphy.c diff -u src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.10 src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.11 --- src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.10 Sat Oct 28 12:56:27 2017 +++ src/sys/arch/arm/sunxi/sunxi_usbphy.c Mon Feb 19 20:15:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_usbphy.c,v 1.10 2017/10/28 12:56:27 jmcneill Exp $ */ +/* $NetBSD: sunxi_usbphy.c,v 1.11 2018/02/19 20:15:23 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_usbphy.c,v 1.10 2017/10/28 12:56:27 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_usbphy.c,v 1.11 2018/02/19 20:15:23 jmcneill Exp $"); #include #include @@ -81,6 +81,7 @@ enum sunxi_usbphy_type { USBPHY_A64, USBPHY_A83T, USBPHY_H3, + USBPHY_H6, }; static const struct of_compat_data compat_data[] = { @@ -91,6 +92,7 @@ static const struct of_compat_data compa { "allwinner,sun8i-a83t-usb-phy", USBPHY_A83T }, { "allwinner,sun8i-h3-usb-phy", USBPHY_H3 }, { "allwinner,sun50i-a64-usb-phy", USBPHY_A64 }, + { "allwinner,sun50i-h6-usb-phy", USBPHY_H6 }, { NULL } }; @@ -148,6 +150,7 @@ sunxi_usbphy_write(struct sunxi_usbphy_s reg = PHYCTL_A10; break; case USBPHY_H3: + case USBPHY_H6: case USBPHY_A64: case USBPHY_A83T: reg = PHYCTL_A33; @@ -197,7 +200,7 @@ sunxi_usbphy_acquire(device_t dev, const return NULL; const int phy_id = be32dec(data); - if (phy_id >= sc->sc_nphys) + if (phy_id >= sc->sc_nphys || !sc->sc_phys[phy_id].phy_bsh) return NULL; return >sc_phys[phy_id]; @@ -230,6 +233,7 @@ sunxi_usbphy_enable(device_t dev, void * break; case USBPHY_A64: case USBPHY_H3: + case USBPHY_H6: disc_thresh = 0x3; phy0_reroute = true; break; @@ -268,10 +272,17 @@ sunxi_usbphy_enable(device_t dev, void * } if (enable) { - if (phy->phy_index == 0) - sunxi_usbphy_write(sc, phy, PHY_RES45_CAL_EN, 0x1, 1); - sunxi_usbphy_write(sc, phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5); - sunxi_usbphy_write(sc, phy, PHY_DISCON_TH_SEL, disc_thresh, 2); + switch (sc->sc_type) { + case USBPHY_A83T: + case USBPHY_H6: + break; + default: + if (phy->phy_index == 0) +sunxi_usbphy_write(sc, phy, PHY_RES45_CAL_EN, 0x1, 1); + sunxi_usbphy_write(sc, phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5); + sunxi_usbphy_write(sc, phy, PHY_DISCON_TH_SEL, disc_thresh, 2); + break; + } } if (phy->phy_index == 0) { @@ -358,9 +369,7 @@ sunxi_usbphy_attach(device_t parent, dev phy->phy_index = sc->sc_nphys; snprintf(pname, sizeof(pname), "pmu%d", sc->sc_nphys); if (fdtbus_get_reg_byname(phandle, pname, , ) != 0) { - /* There may be no registers for OTG PHY */ - if (sc->sc_nphys > 0) -break; + continue; } else if (bus_space_map(sc->sc_bst, addr, size, 0, >phy_bsh) != 0) { aprint_error(": failed to map reg #%d\n", sc->sc_nphys); return;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Mon Feb 19 20:15:23 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_usbphy.c Log Message: Add support for H6 USB PHY To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/sunxi/sunxi_usbphy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:50:53 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:50:53 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-7.0.3 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.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.84 src/doc/CHANGES-7.0.3:1.1.2.85 --- src/doc/CHANGES-7.0.3:1.1.2.84 Fri Feb 16 16:43:12 2018 +++ src/doc/CHANGES-7.0.3 Mon Feb 19 19:50:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.84 2018/02/16 16:43:12 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.85 2018/02/19 19:50:53 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5257,3 +5257,9 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #1570] +usr.sbin/ypserv/ypserv/ypserv_proc.c 1.18 + + PR/47615: Always zero out the result structs in the svc + procs to avoid returning stale request data to the client. + [christos, ticket #1566] +
CVS commit: [netbsd-7-0] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:49:31 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7-0]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.1.2.1 \ src/usr.sbin/ypserv/ypserv/ypserv_proc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:49:31 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7-0]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.1.2.1 \ src/usr.sbin/ypserv/ypserv/ypserv_proc.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.sbin/ypserv/ypserv/ypserv_proc.c diff -u src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1.2.1 --- src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 Fri Jul 31 17:06:56 2015 +++ src/usr.sbin/ypserv/ypserv/ypserv_proc.c Mon Feb 19 19:49:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $ */ +/* $NetBSD: ypserv_proc.c,v 1.16.20.1.2.1 2018/02/19 19:49:31 snj Exp $ */ /* * Copyright (c) 1994 Mats O Jansson@@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $"); +__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.1.2.1 2018/02/19 19:49:31 snj Exp $"); #endif #include @@ -163,9 +163,10 @@ ypproc_match_2_svc(void *argp, struct sv "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_record(k->domain, k->map, k->keydat, secure); return ((void *)); @@ -190,9 +191,10 @@ ypproc_first_2_svc(void *argp, struct sv "first_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_first(k->domain, k->map, FALSE); return ((void *)); @@ -218,9 +220,10 @@ ypproc_next_2_svc(void *argp, struct svc "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_next(k->domain, k->map, k->keydat, FALSE); return ((void *)); @@ -326,6 +329,7 @@ ypproc_all_2_svc(void *argp, struct svc_ (void)memset(, 0, sizeof(res)); if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.ypresp_all_u.val.status = YP_YPERR; return (); } @@ -368,9 +372,10 @@ ypproc_master_2_svc(void *argp, struct s "master_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_master(k->domain, k->map); /* @@ -409,12 +414,15 @@ ypproc_order_2_svc(void *argp, struct sv "order_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else if (_yp_invalid_map(k->map)) + } else if (_yp_invalid_map(k->map)) { + memset(, 0, sizeof(res)); res.status = YP_NOMAP; - else + } else { res = ypdb_get_order(k->domain, k->map); + } return ((void *)); } @@ -446,7 +454,7 @@ ypproc_maplist_2_svc(void *argp, struct (void)snprintf(domain_path, sizeof(domain_path), "%s/%s", YP_DB_PATH, domain); - res.list = NULL; + memset(, 0, sizeof(res)); status = YP_TRUE; if ((stat(domain_path, ) != 0) || !S_ISDIR(finfo.st_mode)) {
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:48:49 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.2 Log Message: 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-7.1.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:48:49 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.2 Log Message: 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-7.1.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.1.2 diff -u src/doc/CHANGES-7.1.2:1.1.2.14 src/doc/CHANGES-7.1.2:1.1.2.15 --- src/doc/CHANGES-7.1.2:1.1.2.14 Fri Feb 16 16:41:23 2018 +++ src/doc/CHANGES-7.1.2 Mon Feb 19 19:48:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.2,v 1.1.2.14 2018/02/16 16:41:23 martin Exp $ +# $NetBSD: CHANGES-7.1.2,v 1.1.2.15 2018/02/19 19:48:49 snj Exp $ A complete list of changes from the NetBSD 7.1.1 release to the NetBSD 7.1.2 release: @@ -145,3 +145,9 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #1570] +usr.sbin/ypserv/ypserv/ypserv_proc.c 1.18 + + PR/47615: Always zero out the result structs in the svc + procs to avoid returning stale request data to the client. + [christos, ticket #1566] +
CVS commit: [netbsd-7-1] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:48:20 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7-1]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.1.6.1 \ src/usr.sbin/ypserv/ypserv/ypserv_proc.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.sbin/ypserv/ypserv/ypserv_proc.c diff -u src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1.6.1 --- src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 Fri Jul 31 17:06:56 2015 +++ src/usr.sbin/ypserv/ypserv/ypserv_proc.c Mon Feb 19 19:48:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $ */ +/* $NetBSD: ypserv_proc.c,v 1.16.20.1.6.1 2018/02/19 19:48:20 snj Exp $ */ /* * Copyright (c) 1994 Mats O Jansson@@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $"); +__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.1.6.1 2018/02/19 19:48:20 snj Exp $"); #endif #include @@ -163,9 +163,10 @@ ypproc_match_2_svc(void *argp, struct sv "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_record(k->domain, k->map, k->keydat, secure); return ((void *)); @@ -190,9 +191,10 @@ ypproc_first_2_svc(void *argp, struct sv "first_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_first(k->domain, k->map, FALSE); return ((void *)); @@ -218,9 +220,10 @@ ypproc_next_2_svc(void *argp, struct svc "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_next(k->domain, k->map, k->keydat, FALSE); return ((void *)); @@ -326,6 +329,7 @@ ypproc_all_2_svc(void *argp, struct svc_ (void)memset(, 0, sizeof(res)); if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.ypresp_all_u.val.status = YP_YPERR; return (); } @@ -368,9 +372,10 @@ ypproc_master_2_svc(void *argp, struct s "master_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_master(k->domain, k->map); /* @@ -409,12 +414,15 @@ ypproc_order_2_svc(void *argp, struct sv "order_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else if (_yp_invalid_map(k->map)) + } else if (_yp_invalid_map(k->map)) { + memset(, 0, sizeof(res)); res.status = YP_NOMAP; - else + } else { res = ypdb_get_order(k->domain, k->map); + } return ((void *)); } @@ -446,7 +454,7 @@ ypproc_maplist_2_svc(void *argp, struct (void)snprintf(domain_path, sizeof(domain_path), "%s/%s", YP_DB_PATH, domain); - res.list = NULL; + memset(, 0, sizeof(res)); status = YP_TRUE; if ((stat(domain_path, ) != 0) || !S_ISDIR(finfo.st_mode)) {
CVS commit: [netbsd-7-1] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:48:20 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7-1]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.1.6.1 \ src/usr.sbin/ypserv/ypserv/ypserv_proc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:46:27 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1533, 1555, 1556, 1558, 1559, 1564, 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:46:27 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1533, 1555, 1556, 1558, 1559, 1564, 1566 To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 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.70 src/doc/CHANGES-7.2:1.1.2.71 --- src/doc/CHANGES-7.2:1.1.2.70 Fri Feb 16 16:39:48 2018 +++ src/doc/CHANGES-7.2 Mon Feb 19 19:46:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.70 2018/02/16 16:39:48 martin Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.71 2018/02/19 19:46:26 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5134,3 +5134,86 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #1570] +external/gpl3/gcc/dist/gcc/config/m68k/m68k.md revert to 1.1.1.2 + + Undo the attempt to figure out mult clobbering. PR 51783. + [mlelstv, ticket #1553] + +sys/arch/arm/arm/cpufunc_asm_arm11x6.S 1.10 + + PR/52934: Yasushi Oshima: Apply the erratum fix that was + applied to wbinv_range to isync_range so that we don't hang + when we try to sync from execcmd_readvn(). + [skrll, ticket #1555] + +sys/dev/usb/if_athn_usb.c 1.25 +sys/dev/usb/if_atu.c1.56 +sys/dev/usb/if_aue.c1.142 +sys/dev/usb/if_axe.c1.84 +sys/dev/usb/if_axen.c1.12 +sys/dev/usb/if_cdce.c1.45 +sys/dev/usb/if_cue.c1.77 +sys/dev/usb/if_kue.c1.91 +sys/dev/usb/if_otus.c1.32 +sys/dev/usb/if_rum.c1.59 +sys/dev/usb/if_run.c1.25 +sys/dev/usb/if_smsc.c1.33 +sys/dev/usb/if_udav.c1.52 +sys/dev/usb/if_upgt.c1.18 +sys/dev/usb/if_upl.c1.61 +sys/dev/usb/if_ural.c1.53 +sys/dev/usb/if_url.c1.57 +sys/dev/usb/if_urndis.c1.17 +sys/dev/usb/if_urtw.c1.14 +sys/dev/usb/if_urtwn.c1.56 +sys/dev/usb/if_zyd.c1.45 +sys/dev/usb/irmce.c1.4 +sys/dev/usb/pseye.c1.24 +sys/dev/usb/ubt.c1.60 +sys/dev/usb/ucom.c1.120 +sys/dev/usb/udsir.c1.6 +sys/dev/usb/ugen.c1.137 +sys/dev/usb/uhso.c1.27 +sys/dev/usb/uirda.c1.43 +sys/dev/usb/ulpt.c1.99 +sys/dev/usb/umass.c1.163 +sys/dev/usb/umidi.c1.74 +sys/dev/usb/uscanner.c1.82 +sys/dev/usb/usscanner.c1.43 +sys/dev/usb/ustir.c1.39 +sys/dev/usb/utoppy.c1.30 +sys/dev/usb/uvideo.c1.46 + + PR kern/52931 Kernel panics with Atheros usb wireless interface + + Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER + is supplied wherever such a transfer is setup. We can drop + USBD_SHORT_XFER_OK as it has not bearing on number of TDs + [skrll, ticket #1556] + +sys/fs/msdosfs/msdosfs_fat.c 1.32 +usr.sbin/makefs/msdos/msdosfs_vfsops.c 1.11 + + Need strings.h for ffs() + Resolves implict declaration warning of ffs() when building + tools via build.sh + [sevan, ticket #1558] + +sys/arch/macppc/dev/snapper.c 1.42 + + Fix issue with audio being downpitched. + PR port-macppc/52949 + [sevan, ticket #1559] + +libexec/httpd/bozohttpd.c 1.87 + + Use a protocol-agnostic URL (don't degrade HTTPS->HTTP) + Suggested by Travis Paul in PR bin/52958. + [maya, ticket #1564] + +usr.sbin/ypserv/ypserv/ypserv_proc.c 1.18 + + PR/47615: Always zero out the result structs in the svc procs + to avoid returning stale request data to the client. + [christos, ticket #1566] +
CVS commit: [netbsd-7] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:45:23 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.2 src/usr.sbin/ypserv/ypserv/ypserv_proc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/usr.sbin/ypserv/ypserv
Module Name:src Committed By: snj Date: Mon Feb 19 19:45:23 UTC 2018 Modified Files: src/usr.sbin/ypserv/ypserv [netbsd-7]: ypserv_proc.c Log Message: Pull up following revision(s) (requested by christos in ticket #1566): usr.sbin/ypserv/ypserv/ypserv_proc.c: 1.18 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the svc procs to avoid returning stale request data to the client. To generate a diff of this commit: cvs rdiff -u -r1.16.20.1 -r1.16.20.2 src/usr.sbin/ypserv/ypserv/ypserv_proc.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.sbin/ypserv/ypserv/ypserv_proc.c diff -u src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.2 --- src/usr.sbin/ypserv/ypserv/ypserv_proc.c:1.16.20.1 Fri Jul 31 17:06:56 2015 +++ src/usr.sbin/ypserv/ypserv/ypserv_proc.c Mon Feb 19 19:45:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $ */ +/* $NetBSD: ypserv_proc.c,v 1.16.20.2 2018/02/19 19:45:23 snj Exp $ */ /* * Copyright (c) 1994 Mats O Jansson@@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.1 2015/07/31 17:06:56 snj Exp $"); +__RCSID("$NetBSD: ypserv_proc.c,v 1.16.20.2 2018/02/19 19:45:23 snj Exp $"); #endif #include @@ -163,9 +163,10 @@ ypproc_match_2_svc(void *argp, struct sv "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_record(k->domain, k->map, k->keydat, secure); return ((void *)); @@ -190,9 +191,10 @@ ypproc_first_2_svc(void *argp, struct sv "first_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_first(k->domain, k->map, FALSE); return ((void *)); @@ -218,9 +220,10 @@ ypproc_next_2_svc(void *argp, struct svc "key %.*s", clientstr, TORF(secure), k->domain, k->map, k->keydat.dsize, k->keydat.dptr)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_next(k->domain, k->map, k->keydat, FALSE); return ((void *)); @@ -326,6 +329,7 @@ ypproc_all_2_svc(void *argp, struct svc_ (void)memset(, 0, sizeof(res)); if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.ypresp_all_u.val.status = YP_YPERR; return (); } @@ -368,9 +372,10 @@ ypproc_master_2_svc(void *argp, struct s "master_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else + } else res = ypdb_get_master(k->domain, k->map); /* @@ -409,12 +414,15 @@ ypproc_order_2_svc(void *argp, struct sv "order_2: request from %.500s, secure %s, domain %s, map %s", clientstr, TORF(secure), k->domain, k->map)); - if (secure && securecheck(caller)) + if (secure && securecheck(caller)) { + memset(, 0, sizeof(res)); res.status = YP_YPERR; - else if (_yp_invalid_map(k->map)) + } else if (_yp_invalid_map(k->map)) { + memset(, 0, sizeof(res)); res.status = YP_NOMAP; - else + } else { res = ypdb_get_order(k->domain, k->map); + } return ((void *)); } @@ -446,7 +454,7 @@ ypproc_maplist_2_svc(void *argp, struct (void)snprintf(domain_path, sizeof(domain_path), "%s/%s", YP_DB_PATH, domain); - res.list = NULL; + memset(, 0, sizeof(res)); status = YP_TRUE; if ((stat(domain_path, ) != 0) || !S_ISDIR(finfo.st_mode)) {
CVS commit: [netbsd-7] src/libexec/httpd
Module Name:src Committed By: snj Date: Mon Feb 19 19:43:14 UTC 2018 Modified Files: src/libexec/httpd [netbsd-7]: bozohttpd.c Log Message: Pull up following revision(s) (requested by maya in ticket #1564): libexec/httpd/bozohttpd.c: 1.87 Use a protocol-agnostic URL (don't degrade HTTPS->HTTP) Suggested by Travis Paul in PR bin/52958. To generate a diff of this commit: cvs rdiff -u -r1.56.2.8 -r1.56.2.9 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.56.2.8 src/libexec/httpd/bozohttpd.c:1.56.2.9 --- src/libexec/httpd/bozohttpd.c:1.56.2.8 Sun Feb 12 22:07:17 2017 +++ src/libexec/httpd/bozohttpd.c Mon Feb 19 19:43:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.56.2.8 2017/02/12 22:07:17 snj Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.56.2.9 2018/02/19 19:43:14 snj Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -1990,7 +1990,7 @@ bozo_http_error(bozohttpd_t *httpd, int "%s\n" "%s\n" "%s%s: %s\n" - "http://%s%s/\;>%s%s\n" + "%s%s\n" "\n", header, header, user ? user : "", file,
CVS commit: [netbsd-7] src/libexec/httpd
Module Name:src Committed By: snj Date: Mon Feb 19 19:43:14 UTC 2018 Modified Files: src/libexec/httpd [netbsd-7]: bozohttpd.c Log Message: Pull up following revision(s) (requested by maya in ticket #1564): libexec/httpd/bozohttpd.c: 1.87 Use a protocol-agnostic URL (don't degrade HTTPS->HTTP) Suggested by Travis Paul in PR bin/52958. To generate a diff of this commit: cvs rdiff -u -r1.56.2.8 -r1.56.2.9 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/arch/macppc/dev
Module Name:src Committed By: snj Date: Mon Feb 19 19:41:43 UTC 2018 Modified Files: src/sys/arch/macppc/dev [netbsd-7]: snapper.c Log Message: Pull up following revision(s) (requested by sevan in ticket #1559): sys/arch/macppc/dev/snapper.c: 1.42 Fix issue with audio being downpitched, thanks to "it seems that snapper_init should be called before audio_attach_mi, as snapper init is setting the rate to 44100 after the hardware format has been configured by audio_attach_mi. audio_attach_mi should be the last thing called during an attach of an audio device so the audio device is ready to be configured when audio_attach_mi is called." Resolves PR port-macppc/52949 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/arch/macppc/dev/snapper.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/arch/macppc/dev
Module Name:src Committed By: snj Date: Mon Feb 19 19:41:43 UTC 2018 Modified Files: src/sys/arch/macppc/dev [netbsd-7]: snapper.c Log Message: Pull up following revision(s) (requested by sevan in ticket #1559): sys/arch/macppc/dev/snapper.c: 1.42 Fix issue with audio being downpitched, thanks to "it seems that snapper_init should be called before audio_attach_mi, as snapper init is setting the rate to 44100 after the hardware format has been configured by audio_attach_mi. audio_attach_mi should be the last thing called during an attach of an audio device so the audio device is ready to be configured when audio_attach_mi is called." Resolves PR port-macppc/52949 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.39 src/sys/arch/macppc/dev/snapper.c:1.39.4.1 --- src/sys/arch/macppc/dev/snapper.c:1.39 Fri Mar 14 21:59:41 2014 +++ src/sys/arch/macppc/dev/snapper.c Mon Feb 19 19:41:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.39 2014/03/14 21:59:41 mrg Exp $ */ +/* $NetBSD: snapper.c,v 1.39.4.1 2018/02/19 19:41:43 snj Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.39 2014/03/14 21:59:41 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.39.4.1 2018/02/19 19:41:43 snj Exp $"); #include #include @@ -839,10 +839,10 @@ snapper_defer(device_t dev) break; } - audio_attach_mi(_hw_if, sc, sc->sc_dev); - /* ki2c_setmode(sc->sc_i2c, I2C_STDSUBMODE); */ snapper_init(sc, sc->sc_node); + + audio_attach_mi(_hw_if, sc, sc->sc_dev); } static int
CVS commit: [netbsd-7] src
Module Name:src Committed By: snj Date: Mon Feb 19 19:39:52 UTC 2018 Modified Files: src/sys/fs/msdosfs [netbsd-7]: msdosfs_fat.c src/usr.sbin/makefs/msdos [netbsd-7]: msdosfs_vfsops.c Log Message: Pull up following revision(s) (requested by sevan in ticket #1558): sys/fs/msdosfs/msdosfs_fat.c: 1.32 usr.sbin/makefs/msdos/msdosfs_vfsops.c: 1.11 Need strings.h for ffs() -- Need strings.h for ffs() Resolves implict declaration warning of ffs() when building tools via build.sh To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.12.1 src/sys/fs/msdosfs/msdosfs_fat.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/makefs/msdos/msdosfs_vfsops.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/fs/msdosfs/msdosfs_fat.c diff -u src/sys/fs/msdosfs/msdosfs_fat.c:1.28 src/sys/fs/msdosfs/msdosfs_fat.c:1.28.12.1 --- src/sys/fs/msdosfs/msdosfs_fat.c:1.28 Mon Jan 28 00:17:18 2013 +++ src/sys/fs/msdosfs/msdosfs_fat.c Mon Feb 19 19:39:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_fat.c,v 1.28 2013/01/28 00:17:18 christos Exp $ */ +/* $NetBSD: msdosfs_fat.c,v 1.28.12.1 2018/02/19 19:39:52 snj Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -52,7 +52,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.28 2013/01/28 00:17:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.28.12.1 2018/02/19 19:39:52 snj Exp $"); /* * kernel include files. @@ -69,6 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: msdosfs_fat. #include #include /* to define vattr structure */ #else +#include #include #endif Index: src/usr.sbin/makefs/msdos/msdosfs_vfsops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.8 src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.8.2.1 --- src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.8 Wed Jul 9 06:04:16 2014 +++ src/usr.sbin/makefs/msdos/msdosfs_vfsops.c Mon Feb 19 19:39:52 2018 @@ -50,7 +50,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.8 2014/07/09 06:04:16 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.8.2.1 2018/02/19 19:39:52 snj Exp $"); #include @@ -68,6 +68,7 @@ __KERNEL_RCSID(0, "$NetBSD: msdosfs_vfso #include #include #include +#include #include "makefs.h" #include "msdos.h"
CVS commit: [netbsd-7] src
Module Name:src Committed By: snj Date: Mon Feb 19 19:39:52 UTC 2018 Modified Files: src/sys/fs/msdosfs [netbsd-7]: msdosfs_fat.c src/usr.sbin/makefs/msdos [netbsd-7]: msdosfs_vfsops.c Log Message: Pull up following revision(s) (requested by sevan in ticket #1558): sys/fs/msdosfs/msdosfs_fat.c: 1.32 usr.sbin/makefs/msdos/msdosfs_vfsops.c: 1.11 Need strings.h for ffs() -- Need strings.h for ffs() Resolves implict declaration warning of ffs() when building tools via build.sh To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.12.1 src/sys/fs/msdosfs/msdosfs_fat.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/makefs/msdos/msdosfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: snj Date: Mon Feb 19 19:33:06 UTC 2018 Modified Files: src/sys/dev/usb [netbsd-7]: if_athn_usb.c if_atu.c if_aue.c if_axe.c if_axen.c if_cdce.c if_cue.c if_kue.c if_otus.c if_rum.c if_run.c if_smsc.c if_udav.c if_upgt.c if_upl.c if_ural.c if_url.c if_urndis.c if_urtw.c if_urtwn.c if_zyd.c irmce.c pseye.c ubt.c ucom.c udsir.c ugen.c uhso.c uirda.c ulpt.c umass.c umidi.c uscanner.c usscanner.c ustir.c utoppy.c uvideo.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1556): sys/dev/usb/if_athn_usb.c: 1.25 sys/dev/usb/if_atu.c: 1.56 sys/dev/usb/if_aue.c: 1.142 sys/dev/usb/if_axe.c: 1.84 sys/dev/usb/if_axen.c: 1.12 sys/dev/usb/if_cdce.c: 1.45 sys/dev/usb/if_cue.c: 1.77 sys/dev/usb/if_kue.c: 1.91 sys/dev/usb/if_otus.c: 1.32 sys/dev/usb/if_rum.c: 1.59 sys/dev/usb/if_run.c: 1.25 sys/dev/usb/if_smsc.c: 1.33 sys/dev/usb/if_udav.c: 1.52 sys/dev/usb/if_upgt.c: 1.18 sys/dev/usb/if_upl.c: 1.61 sys/dev/usb/if_ural.c: 1.53 sys/dev/usb/if_url.c: 1.57 sys/dev/usb/if_urndis.c: 1.17 sys/dev/usb/if_urtw.c: 1.14 sys/dev/usb/if_urtwn.c: 1.56 sys/dev/usb/if_zyd.c: 1.45 sys/dev/usb/irmce.c: 1.4 sys/dev/usb/pseye.c: 1.24 sys/dev/usb/ubt.c: 1.60 sys/dev/usb/ucom.c: 1.120 sys/dev/usb/udsir.c: 1.6 sys/dev/usb/ugen.c: 1.137 sys/dev/usb/uhso.c: 1.27 sys/dev/usb/uirda.c: 1.43 sys/dev/usb/ulpt.c: 1.99 sys/dev/usb/umass.c: 1.163 sys/dev/usb/umidi.c: 1.74 sys/dev/usb/uscanner.c: 1.82 sys/dev/usb/usscanner.c: 1.43 sys/dev/usb/ustir.c: 1.39 sys/dev/usb/utoppy.c: 1.30 sys/dev/usb/uvideo.c: 1.46 PR kern/52931 Kernel panics with Atheros usb wireless interface Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is supplied wherever such a transfer is setup. We can drop USBD_SHORT_XFER_OK as it has not bearing on number of TDs To generate a diff of this commit: cvs rdiff -u -r1.6.6.2 -r1.6.6.3 src/sys/dev/usb/if_athn_usb.c cvs rdiff -u -r1.49.10.1 -r1.49.10.2 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.132.2.1 -r1.132.2.2 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.67.2.2 -r1.67.2.3 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.38.12.1 -r1.38.12.2 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.68.2.1 -r1.68.2.2 src/sys/dev/usb/if_cue.c cvs rdiff -u -r1.81.2.1 -r1.81.2.2 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.25.4.1 -r1.25.4.2 src/sys/dev/usb/if_otus.c cvs rdiff -u -r1.48.4.1 -r1.48.4.2 src/sys/dev/usb/if_rum.c cvs rdiff -u -r1.10.4.2 -r1.10.4.3 src/sys/dev/usb/if_run.c cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.12.2.1 -r1.12.2.2 src/sys/dev/usb/if_upgt.c cvs rdiff -u -r1.47.2.1 -r1.47.2.2 src/sys/dev/usb/if_upl.c cvs rdiff -u -r1.44.12.2 -r1.44.12.3 src/sys/dev/usb/if_ural.c cvs rdiff -u -r1.48.2.1 -r1.48.2.2 src/sys/dev/usb/if_url.c cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/sys/dev/usb/if_urndis.c cvs rdiff -u -r1.6.4.1 -r1.6.4.2 src/sys/dev/usb/if_urtw.c cvs rdiff -u -r1.34.2.2 -r1.34.2.3 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.36.12.1 -r1.36.12.2 src/sys/dev/usb/if_zyd.c cvs rdiff -u -r1.1.30.1 -r1.1.30.2 src/sys/dev/usb/irmce.c cvs rdiff -u -r1.21.32.1 -r1.21.32.2 src/sys/dev/usb/pseye.c cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.107.2.2 -r1.107.2.3 src/sys/dev/usb/ucom.c cvs rdiff -u -r1.1.12.1 -r1.1.12.2 src/sys/dev/usb/udsir.c cvs rdiff -u -r1.124.2.3 -r1.124.2.4 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/dev/usb/uhso.c cvs rdiff -u -r1.38.4.1 -r1.38.4.2 src/sys/dev/usb/uirda.c \ src/sys/dev/usb/usscanner.c cvs rdiff -u -r1.95.2.1 -r1.95.2.2 src/sys/dev/usb/ulpt.c cvs rdiff -u -r1.148.4.1 -r1.148.4.2 src/sys/dev/usb/umass.c cvs rdiff -u -r1.65.12.2 -r1.65.12.3 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.75.2.1 -r1.75.2.2 src/sys/dev/usb/uscanner.c cvs rdiff -u -r1.33.8.1 -r1.33.8.2 src/sys/dev/usb/ustir.c cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/usb/utoppy.c cvs rdiff -u -r1.40.4.1 -r1.40.4.2 src/sys/dev/usb/uvideo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: snj Date: Mon Feb 19 19:33:06 UTC 2018 Modified Files: src/sys/dev/usb [netbsd-7]: if_athn_usb.c if_atu.c if_aue.c if_axe.c if_axen.c if_cdce.c if_cue.c if_kue.c if_otus.c if_rum.c if_run.c if_smsc.c if_udav.c if_upgt.c if_upl.c if_ural.c if_url.c if_urndis.c if_urtw.c if_urtwn.c if_zyd.c irmce.c pseye.c ubt.c ucom.c udsir.c ugen.c uhso.c uirda.c ulpt.c umass.c umidi.c uscanner.c usscanner.c ustir.c utoppy.c uvideo.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1556): sys/dev/usb/if_athn_usb.c: 1.25 sys/dev/usb/if_atu.c: 1.56 sys/dev/usb/if_aue.c: 1.142 sys/dev/usb/if_axe.c: 1.84 sys/dev/usb/if_axen.c: 1.12 sys/dev/usb/if_cdce.c: 1.45 sys/dev/usb/if_cue.c: 1.77 sys/dev/usb/if_kue.c: 1.91 sys/dev/usb/if_otus.c: 1.32 sys/dev/usb/if_rum.c: 1.59 sys/dev/usb/if_run.c: 1.25 sys/dev/usb/if_smsc.c: 1.33 sys/dev/usb/if_udav.c: 1.52 sys/dev/usb/if_upgt.c: 1.18 sys/dev/usb/if_upl.c: 1.61 sys/dev/usb/if_ural.c: 1.53 sys/dev/usb/if_url.c: 1.57 sys/dev/usb/if_urndis.c: 1.17 sys/dev/usb/if_urtw.c: 1.14 sys/dev/usb/if_urtwn.c: 1.56 sys/dev/usb/if_zyd.c: 1.45 sys/dev/usb/irmce.c: 1.4 sys/dev/usb/pseye.c: 1.24 sys/dev/usb/ubt.c: 1.60 sys/dev/usb/ucom.c: 1.120 sys/dev/usb/udsir.c: 1.6 sys/dev/usb/ugen.c: 1.137 sys/dev/usb/uhso.c: 1.27 sys/dev/usb/uirda.c: 1.43 sys/dev/usb/ulpt.c: 1.99 sys/dev/usb/umass.c: 1.163 sys/dev/usb/umidi.c: 1.74 sys/dev/usb/uscanner.c: 1.82 sys/dev/usb/usscanner.c: 1.43 sys/dev/usb/ustir.c: 1.39 sys/dev/usb/utoppy.c: 1.30 sys/dev/usb/uvideo.c: 1.46 PR kern/52931 Kernel panics with Atheros usb wireless interface Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is supplied wherever such a transfer is setup. We can drop USBD_SHORT_XFER_OK as it has not bearing on number of TDs To generate a diff of this commit: cvs rdiff -u -r1.6.6.2 -r1.6.6.3 src/sys/dev/usb/if_athn_usb.c cvs rdiff -u -r1.49.10.1 -r1.49.10.2 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.132.2.1 -r1.132.2.2 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.67.2.2 -r1.67.2.3 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.38.12.1 -r1.38.12.2 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.68.2.1 -r1.68.2.2 src/sys/dev/usb/if_cue.c cvs rdiff -u -r1.81.2.1 -r1.81.2.2 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.25.4.1 -r1.25.4.2 src/sys/dev/usb/if_otus.c cvs rdiff -u -r1.48.4.1 -r1.48.4.2 src/sys/dev/usb/if_rum.c cvs rdiff -u -r1.10.4.2 -r1.10.4.3 src/sys/dev/usb/if_run.c cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.12.2.1 -r1.12.2.2 src/sys/dev/usb/if_upgt.c cvs rdiff -u -r1.47.2.1 -r1.47.2.2 src/sys/dev/usb/if_upl.c cvs rdiff -u -r1.44.12.2 -r1.44.12.3 src/sys/dev/usb/if_ural.c cvs rdiff -u -r1.48.2.1 -r1.48.2.2 src/sys/dev/usb/if_url.c cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/sys/dev/usb/if_urndis.c cvs rdiff -u -r1.6.4.1 -r1.6.4.2 src/sys/dev/usb/if_urtw.c cvs rdiff -u -r1.34.2.2 -r1.34.2.3 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.36.12.1 -r1.36.12.2 src/sys/dev/usb/if_zyd.c cvs rdiff -u -r1.1.30.1 -r1.1.30.2 src/sys/dev/usb/irmce.c cvs rdiff -u -r1.21.32.1 -r1.21.32.2 src/sys/dev/usb/pseye.c cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.107.2.2 -r1.107.2.3 src/sys/dev/usb/ucom.c cvs rdiff -u -r1.1.12.1 -r1.1.12.2 src/sys/dev/usb/udsir.c cvs rdiff -u -r1.124.2.3 -r1.124.2.4 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/dev/usb/uhso.c cvs rdiff -u -r1.38.4.1 -r1.38.4.2 src/sys/dev/usb/uirda.c \ src/sys/dev/usb/usscanner.c cvs rdiff -u -r1.95.2.1 -r1.95.2.2 src/sys/dev/usb/ulpt.c cvs rdiff -u -r1.148.4.1 -r1.148.4.2 src/sys/dev/usb/umass.c cvs rdiff -u -r1.65.12.2 -r1.65.12.3 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.75.2.1 -r1.75.2.2 src/sys/dev/usb/uscanner.c cvs rdiff -u -r1.33.8.1 -r1.33.8.2 src/sys/dev/usb/ustir.c cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/usb/utoppy.c cvs rdiff -u -r1.40.4.1 -r1.40.4.2 src/sys/dev/usb/uvideo.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/usb/if_athn_usb.c diff -u src/sys/dev/usb/if_athn_usb.c:1.6.6.2 src/sys/dev/usb/if_athn_usb.c:1.6.6.3 --- src/sys/dev/usb/if_athn_usb.c:1.6.6.2 Mon Oct 23 19:15:09 2017 +++ src/sys/dev/usb/if_athn_usb.c Mon Feb 19 19:33:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_athn_usb.c,v 1.6.6.2 2017/10/23 19:15:09 snj Exp $ */ +/* $NetBSD: if_athn_usb.c,v 1.6.6.3 2018/02/19 19:33:06 snj Exp $ */ /* $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14
CVS commit: [netbsd-7] src/sys/arch/arm/arm
Module Name:src Committed By: snj Date: Mon Feb 19 19:24:43 UTC 2018 Modified Files: src/sys/arch/arm/arm [netbsd-7]: cpufunc_asm_arm11x6.S Log Message: Pull up following revision(s) (requested by skrll in ticket #1555): sys/arch/arm/arm/cpufunc_asm_arm11x6.S: 1.10 PR/52934: Yasushi Oshima: Apply the erratum fix that was applied to wbinv_range to isync_range so that we don't hang when we try to sync from execcmd_readvn(). To generate a diff of this commit: cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/arch/arm/arm
Module Name:src Committed By: snj Date: Mon Feb 19 19:24:43 UTC 2018 Modified Files: src/sys/arch/arm/arm [netbsd-7]: cpufunc_asm_arm11x6.S Log Message: Pull up following revision(s) (requested by skrll in ticket #1555): sys/arch/arm/arm/cpufunc_asm_arm11x6.S: 1.10 PR/52934: Yasushi Oshima: Apply the erratum fix that was applied to wbinv_range to isync_range so that we don't hang when we try to sync from execcmd_readvn(). To generate a diff of this commit: cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S 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/arm/arm/cpufunc_asm_arm11x6.S diff -u src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7.2.1 src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7.2.2 --- src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7.2.1 Sun Jul 23 06:14:03 2017 +++ src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S Mon Feb 19 19:24:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.1 2017/07/23 06:14:03 snj Exp $ */ +/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.2 2018/02/19 19:24:43 snj Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.1 2017/07/23 06:14:03 snj Exp $") +RCSID("$NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.2 2018/02/19 19:24:43 snj Exp $") #if 0 #define Invalidate_I_cache(Rtmp1, Rtmp2) \ @@ -137,6 +137,11 @@ ENTRY_NP(arm11x6_flush_prefetchbuf) END(arm11x6_flush_prefetchbuf) ENTRY_NP(arm11x6_icache_sync_range) + ldr r2, .Larm_pcache + ldr r2, [r2, #DCACHE_SIZE] + cmp r1, r2 + bge arm11x6_icache_sync_all + add r1, r1, r0 sub r1, r1, #1 /* Erratum ARM1136 371025, workaround #2 */
CVS commit: [netbsd-7] src/external/gpl3/gcc/dist/gcc/config/m68k
Module Name:src Committed By: snj Date: Mon Feb 19 19:22:22 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc/config/m68k [netbsd-7]: m68k.md Log Message: Revert to revision 1.1.1.2, as requested by mlelstv in ticket #1533: Undo the attempt to figure out mult clobbering. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 \ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/external/gpl3/gcc/dist/gcc/config/m68k
Module Name:src Committed By: snj Date: Mon Feb 19 19:22:22 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc/config/m68k [netbsd-7]: m68k.md Log Message: Revert to revision 1.1.1.2, as requested by mlelstv in ticket #1533: Undo the attempt to figure out mult clobbering. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 \ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.3 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.3.4.1 --- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.3 Sat Mar 1 08:58:31 2014 +++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md Mon Feb 19 19:22:22 2018 @@ -3124,33 +3124,16 @@ ;; We need a separate DEFINE_EXPAND for u?mulsidi3 to be able to use the ;; proper matching constraint. This is because the matching is between ;; the high-numbered word of the DImode operand[0] and operand[1]. -;; -;; Note: life_analysis() does not keep track of the individual halves of the -;; DImode register. To prevent spurious liveness before the u?mulsidi3 insn -;; (which causes "uninitialized variable" warnings), we explicitly clobber -;; the DImode register. (define_expand "umulsidi3" - [(set (match_operand:DI 0 "register_operand" "") - (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "")) - (zero_extend:DI (match_operand:SI 2 "register_operand" ""] - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - "") - -(define_insn_and_split "*umulsidi3_split" - [(set (match_operand:DI 0 "register_operand" "") - (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "")) - (zero_extend:DI (match_operand:SI 2 "register_operand" ""] - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - "#" - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - [(clobber (match_dup 0)) - (parallel -[(set (subreg:SI (match_dup 0) 4) - (mult:SI (match_dup 1) (match_dup 2))) + [(parallel +[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4) + (mult:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "register_operand" ""))) (set (subreg:SI (match_dup 0) 0) (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) (zero_extend:DI (match_dup 2))) (const_int 32])] + "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" "") (define_insn "" @@ -3181,27 +3164,15 @@ "mulu%.l %2,%3:%0") (define_expand "mulsidi3" - [(set (match_operand:DI 0 "register_operand" "") - (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "")) - (sign_extend:DI (match_operand:SI 2 "register_operand" ""] - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - "") - -(define_insn_and_split "*mulsidi3_split" - [(set (match_operand:DI 0 "register_operand" "") - (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "")) - (sign_extend:DI (match_operand:SI 2 "register_operand" ""] - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - "#" - "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" - [(clobber (match_dup 0)) - (parallel -[(set (subreg:SI (match_dup 0) 4) - (mult:SI (match_dup 1) (match_dup 2))) + [(parallel +[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4) + (mult:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "register_operand" ""))) (set (subreg:SI (match_dup 0) 0) (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1)) (sign_extend:DI (match_dup 2))) (const_int 32])] + "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE" "") (define_insn ""
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:08:19 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: tickets 553-558, 560 To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 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.127 src/doc/CHANGES-8.0:1.1.2.128 --- src/doc/CHANGES-8.0:1.1.2.127 Fri Feb 16 16:36:03 2018 +++ src/doc/CHANGES-8.0 Mon Feb 19 19:08:18 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.127 2018/02/16 16:36:03 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.128 2018/02/19 19:08:18 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -9668,3 +9668,52 @@ sys/netipsec/ipsec.c1.130 Fix inverted logic that could crash the kernel. [maxv, ticket #559] +sys/dev/pci/virtio_pci.c 1.2 via patch to sys/dev/pci/virtio.c + + Explicitly enable PCI_COMMAND_MASTER_ENABLE and + PCI_COMMAND_IO_ENABLE. Recent versions of VirtualBox do + not enable bus-mastering by default. + [uwe, ticket #553] + +sys/arch/sh3/sh3/exception.c 1.66 + + tlb_exception - set ksi_addr to va also when a userland page + is not found. Helps SIGSEGV handlers for PROT_NONE red zones. + [uwe, ticket #554] + +build.sh 1.322-1.323 +tools/make/buildmake.sh.in 1.9-1.12 + + Fix issues on host systems with older /usr/share/mk. + [uwe, ticket #555] + +share/man/man9/xcall.91.11-1.12 +sys/kern/subr_psref.c1.11 +sys/kern/subr_xcall.c1.21-1.25 +sys/sys/xcall.h 1.6 + + Improve stability of psref, which mitigates unexpected long + turn-around time of psref_target_destroy under load, by + extending xcall to use a softint with an arbitrary IPL for + its fast cross call. + [ozaki-r, ticket #556] + +sys/netinet/ip_output.c1.295 + + Fix a NULL pointer dereference in ip_drop_membership. + [ozaki-r, ticket #557] + +share/man/man4/wbsio.41.7-1.8 +sys/dev/isa/files.isa1.168-1.169 +sys/dev/isa/wbsio.c1.16-1.21 +sys/dev/isa/wbsioreg.h1.6-1.7 + + Add wbsio(4) GPIO and watchdog timer driver. + [yamaguchi, ticket #558] + +share/man/man4/gif.41.31 + + Add 'tunnel mode ipip' to the cisco configuration as + requested in PR kern/53037. + [pgoyette, ticket #560] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Mon Feb 19 19:08:19 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: tickets 553-558, 560 To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Feb 19 19:00:42 UTC 2018 Modified Files: src/sys/dev/ic: pl181.c pl181var.h Log Message: Rewrite data transfer path to take advantage of the PL181's 64-byte FIFO. Before: 134217728 bytes transferred in 43.683 secs (3072539 bytes/sec) After: 134217728 bytes transferred in 23.789 secs (5642007 bytes/sec) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/pl181.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/pl181var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Feb 19 19:00:42 UTC 2018 Modified Files: src/sys/dev/ic: pl181.c pl181var.h Log Message: Rewrite data transfer path to take advantage of the PL181's 64-byte FIFO. Before: 134217728 bytes transferred in 43.683 secs (3072539 bytes/sec) After: 134217728 bytes transferred in 23.789 secs (5642007 bytes/sec) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/pl181.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/pl181var.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/dev/ic/pl181.c diff -u src/sys/dev/ic/pl181.c:1.4 src/sys/dev/ic/pl181.c:1.5 --- src/sys/dev/ic/pl181.c:1.4 Sun Jun 4 15:08:30 2017 +++ src/sys/dev/ic/pl181.c Mon Feb 19 19:00:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pl181.c,v 1.4 2017/06/04 15:08:30 jmcneill Exp $ */ +/* $NetBSD: pl181.c,v 1.5 2018/02/19 19:00:42 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.4 2017/06/04 15:08:30 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.5 2018/02/19 19:00:42 jmcneill Exp $"); #include #include @@ -49,6 +49,22 @@ __KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1. */ #define PLMMC_MAXXFER rounddown(65535, SDMMC_SECTOR_SIZE) +/* + * PL181 FIFO is 16 words deep (64 bytes) + */ +#define PL181_FIFO_DEPTH 64 + +/* + * Data transfer IRQ status bits + */ +#define PLMMC_INT_DATA_MASK \ + (MMCI_INT_DATA_TIMEOUT|MMCI_INT_DATA_CRC_FAIL| \ + MMCI_INT_TX_FIFO_EMPTY|MMCI_INT_TX_FIFO_HALF_EMPTY| \ + MMCI_INT_RX_FIFO_FULL|MMCI_INT_RX_FIFO_HALF_FULL| \ + MMCI_INT_DATA_END|MMCI_INT_DATA_BLOCK_END) +#define PLMMC_INT_CMD_MASK \ + (MMCI_INT_CMD_TIMEOUT|MMCI_INT_CMD_RESP_END) + static int plmmc_host_reset(sdmmc_chipset_handle_t); static uint32_t plmmc_host_ocr(sdmmc_chipset_handle_t); static int plmmc_host_maxblklen(sdmmc_chipset_handle_t); @@ -63,9 +79,7 @@ static void plmmc_exec_command(sdmmc_chi static void plmmc_card_enable_intr(sdmmc_chipset_handle_t, int); static void plmmc_card_intr_ack(sdmmc_chipset_handle_t); -static int plmmc_wait_status(struct plmmc_softc *, uint32_t, int); -static int plmmc_pio_wait(struct plmmc_softc *, - struct sdmmc_command *); +static int plmmc_wait_cmd(struct plmmc_softc *); static int plmmc_pio_transfer(struct plmmc_softc *, struct sdmmc_command *, int); @@ -86,15 +100,19 @@ static struct sdmmc_chip_functions plmmc #define MMCI_WRITE(sc, reg, val) \ bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) +#define MMCI_WRITE_MULTI(sc, reg, datap, cnt) \ + bus_space_write_multi_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (datap), (cnt)) #define MMCI_READ(sc, reg) \ bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define MMCI_READ_MULTI(sc, reg, datap, cnt) \ + bus_space_read_multi_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (datap), (cnt)) void plmmc_init(struct plmmc_softc *sc) { struct sdmmcbus_attach_args saa; - mutex_init(>sc_intr_lock, MUTEX_DEFAULT, IPL_BIO); + mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_BIO); cv_init(>sc_intr_cv, "plmmcirq"); #ifdef PLMMC_DEBUG @@ -130,80 +148,124 @@ plmmc_init(struct plmmc_softc *sc) sc->sc_sdmmc_dev = config_found(sc->sc_dev, , NULL); } -int -plmmc_intr(void *priv) +static int +plmmc_intr_xfer(struct plmmc_softc *sc, struct sdmmc_command *cmd) { - struct plmmc_softc *sc = priv; - uint32_t status; + uint32_t len; - mutex_enter(>sc_intr_lock); - status = MMCI_READ(sc, MMCI_STATUS_REG); -#ifdef PLMMC_DEBUG - printf("%s: MMCI_STATUS_REG = %#x\n", __func__, status); -#endif - if (!status) { - mutex_exit(>sc_intr_lock); - return 0; + if (cmd == NULL) { + device_printf(sc->sc_dev, "TX/RX interrupt with no active transfer\n"); + return EINVAL; } - sc->sc_intr_status |= status; - cv_broadcast(>sc_intr_cv); + if (cmd->c_buf == NULL) { + return EINVAL; + } + + const uint32_t fifo_cnt = + __SHIFTOUT(MMCI_READ(sc, MMCI_FIFO_CNT_REG), MMCI_FIFO_CNT) * 4; + if (fifo_cnt > sc->sc_fifo_resid) { + device_printf(sc->sc_dev, "FIFO counter is out of sync with active transfer\n"); + return EIO; + } - mutex_exit(>sc_intr_lock); + if (cmd->c_flags & SCF_CMD_READ) + len = sc->sc_fifo_resid - fifo_cnt; + else + len = min(sc->sc_fifo_resid, PL181_FIFO_DEPTH); - return 1; + if (len == 0) + return 0; + + if (cmd->c_flags & SCF_CMD_READ) + MMCI_READ_MULTI(sc, MMCI_FIFO_REG, (uint32_t *)cmd->c_buf, len / 4); + else + MMCI_WRITE_MULTI(sc, MMCI_FIFO_REG, (uint32_t *)cmd->c_buf, len / 4); + + sc->sc_fifo_resid -= len; + cmd->c_resid -= len; + cmd->c_buf += len; + + return 0; } -static int -plmmc_wait_status(struct plmmc_softc *sc, uint32_t mask, int timeout) +int +plmmc_intr(void *priv) { - int retry, error; + struct plmmc_softc *sc = priv; + uint32_t status, mask; + int retry = 10; - KASSERT(mutex_owned(>sc_intr_lock)); +
CVS commit: [netbsd-8] src/share/man/man4
Module Name:src Committed By: snj Date: Mon Feb 19 18:52:14 UTC 2018 Modified Files: src/share/man/man4 [netbsd-8]: gif.4 Log Message: Pull up following revision(s) (requested by pgoyette in ticket #560): share/man/man4/gif.4: 1.31 Add 'tunnel mode ipip' to the cisco configuration as requested in PR kern/53037 To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.40.1 src/share/man/man4/gif.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/share/man/man4
Module Name:src Committed By: snj Date: Mon Feb 19 18:52:14 UTC 2018 Modified Files: src/share/man/man4 [netbsd-8]: gif.4 Log Message: Pull up following revision(s) (requested by pgoyette in ticket #560): share/man/man4/gif.4: 1.31 Add 'tunnel mode ipip' to the cisco configuration as requested in PR kern/53037 To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.40.1 src/share/man/man4/gif.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/gif.4 diff -u src/share/man/man4/gif.4:1.30 src/share/man/man4/gif.4:1.30.40.1 --- src/share/man/man4/gif.4:1.30 Fri Jan 15 19:23:38 2010 +++ src/share/man/man4/gif.4 Mon Feb 19 18:52:13 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: gif.4,v 1.30 2010/01/15 19:23:38 joerg Exp $ +.\" $NetBSD: gif.4,v 1.30.40.1 2018/02/19 18:52:13 snj Exp $ .\" $KAME: gif.4,v 1.24 2001/02/20 12:54:01 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 15, 2009 +.Dd February 19, 2018 .Dt GIF 4 .Os .Sh NAME @@ -185,6 +185,7 @@ On Host D (Cisco): ip unnumbered D ! e.g. address from Ethernet interface tunnel source D ! e.g. address from Ethernet interface tunnel destination A +tunnel mode ipip ip route C ip route A mask C ip route X mask tunnelX
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Mon Feb 19 18:50:35 UTC 2018 Modified Files: src/share/man/man4 [netbsd-8]: wbsio.4 src/sys/dev/isa [netbsd-8]: files.isa wbsio.c wbsioreg.h Log Message: Pull up following revision(s) (requested by yamaguchi in ticket #558): share/man/man4/wbsio.4: 1.7-1.8 sys/dev/isa/files.isa: 1.168-1.169 sys/dev/isa/wbsio.c: 1.16-1.21 sys/dev/isa/wbsioreg.h: 1.6-1.7 Add wbsio(4) GPIO driver. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Fix NCT6779 gpio pin configuration. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Add Watchdog timer implementation to wbsio(4). Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Add an option to enable GPIO function of wbsio. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Improve the error log message to use product name. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Update the manual of wbsio(4). Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- New sentence, new line. Fix xref. Sort SEE ALSO. -- PR/52887: HITOSHI Osada: wbsio needs sysmon_wdog. -- Now that watchdog support has been added, make sure that a modular driver requires the sysmon_wdog module. To generate a diff of this commit: cvs rdiff -u -r1.3.18.1 -r1.3.18.2 src/share/man/man4/wbsio.4 cvs rdiff -u -r1.167 -r1.167.8.1 src/sys/dev/isa/files.isa cvs rdiff -u -r1.10.10.1 -r1.10.10.2 src/sys/dev/isa/wbsio.c cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/isa/wbsioreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/wbsio.4 diff -u src/share/man/man4/wbsio.4:1.3.18.1 src/share/man/man4/wbsio.4:1.3.18.2 --- src/share/man/man4/wbsio.4:1.3.18.1 Wed Nov 22 14:56:30 2017 +++ src/share/man/man4/wbsio.4 Mon Feb 19 18:50:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: wbsio.4,v 1.3.18.1 2017/11/22 14:56:30 martin Exp $ +.\" $NetBSD: wbsio.4,v 1.3.18.2 2018/02/19 18:50:35 snj Exp $ .\" $OpenBSD: wbsio.4,v 1.2 2008/02/17 16:48:47 jmc Exp $ .\" .\" Copyright (c) 2008 Mark Kettenis@@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 12, 2017 +.Dd December 12, 2017 .Dt WBSIO 4 .Os .Sh NAME @@ -25,17 +25,25 @@ .Cd "wbsio* at isa? port 0x2e" .Cd "wbsio* at isa? port 0x4e" .Cd "lm* at wbsio?" +.Cd "gpio* at gpiobus?" +.Pp +.Cd "options WBSIO_GPIO" .Sh DESCRIPTION The .Nm -driver provides support for the Winbond (was spun off as Nuvoton) LPC Super I/O -ICs. -Only the hardware monitoring function is currently supported. +driver provides support for the Winbond (was spun off as Nuvoton) +LPC Super I/O ICs. +The hardware monitoring function and GPIO are currently supported. .Pp Support for the hardware monitor function is provided through the .Xr lm 4 driver. +The GPIO function supports 64 pins for NCT6795D. +Access to the pins provided by the +.Xr gpio 4 +interface. .Sh SEE ALSO +.Xr gpio 4 , .Xr intro 4 , .Xr isa 4 , .Xr lm 4 Index: src/sys/dev/isa/files.isa diff -u src/sys/dev/isa/files.isa:1.167 src/sys/dev/isa/files.isa:1.167.8.1 --- src/sys/dev/isa/files.isa:1.167 Fri Dec 9 04:32:39 2016 +++ src/sys/dev/isa/files.isa Mon Feb 19 18:50:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.isa,v 1.167 2016/12/09 04:32:39 christos Exp $ +# $NetBSD: files.isa,v 1.167.8.1 2018/02/19 18:50:35 snj Exp $ # # Config file and device description for machine-independent ISA code. # Included by ports that need it. Requires that the SCSI files be @@ -454,7 +454,7 @@ attach smsc at isa with smsc file dev/isa/smsc.c smsc needs-flag # Winbond LPC Super I/O -device wbsio {} +device wbsio { }: gpiobus, sysmon_wdog attach wbsio at isa file dev/isa/wbsio.c wbsio Index: src/sys/dev/isa/wbsio.c diff -u src/sys/dev/isa/wbsio.c:1.10.10.1 src/sys/dev/isa/wbsio.c:1.10.10.2 --- src/sys/dev/isa/wbsio.c:1.10.10.1 Wed Nov 22 14:56:30 2017 +++ src/sys/dev/isa/wbsio.c Mon Feb 19 18:50:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wbsio.c,v 1.10.10.1 2017/11/22 14:56:30 martin Exp $ */ +/* $NetBSD: wbsio.c,v 1.10.10.2 2018/02/19 18:50:35 snj Exp $ */ /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -20,27 +20,55 @@ * Winbond LPC Super I/O driver. */ +#include #include #include #include #include #include +#include +#include #include #include #include #include +#include + +/* Don't use gpio for now in the module */ +#if !defined(_MODULE) && defined(WBSIO_GPIO) +#include "gpio.h" +#endif + +#if NGPIO > 0 +#include +#endif struct wbsio_softc { device_t sc_dev; device_t sc_lm_dev;
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Mon Feb 19 18:50:35 UTC 2018 Modified Files: src/share/man/man4 [netbsd-8]: wbsio.4 src/sys/dev/isa [netbsd-8]: files.isa wbsio.c wbsioreg.h Log Message: Pull up following revision(s) (requested by yamaguchi in ticket #558): share/man/man4/wbsio.4: 1.7-1.8 sys/dev/isa/files.isa: 1.168-1.169 sys/dev/isa/wbsio.c: 1.16-1.21 sys/dev/isa/wbsioreg.h: 1.6-1.7 Add wbsio(4) GPIO driver. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Fix NCT6779 gpio pin configuration. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Add Watchdog timer implementation to wbsio(4). Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Add an option to enable GPIO function of wbsio. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Improve the error log message to use product name. Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- Update the manual of wbsio(4). Implemeted by s-yamaguchi@IIJ, reviewed by msaitoh@n.o. I just commit by proxy. -- New sentence, new line. Fix xref. Sort SEE ALSO. -- PR/52887: HITOSHI Osada: wbsio needs sysmon_wdog. -- Now that watchdog support has been added, make sure that a modular driver requires the sysmon_wdog module. To generate a diff of this commit: cvs rdiff -u -r1.3.18.1 -r1.3.18.2 src/share/man/man4/wbsio.4 cvs rdiff -u -r1.167 -r1.167.8.1 src/sys/dev/isa/files.isa cvs rdiff -u -r1.10.10.1 -r1.10.10.2 src/sys/dev/isa/wbsio.c cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/isa/wbsioreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/netinet
Module Name:src Committed By: snj Date: Mon Feb 19 18:39:43 UTC 2018 Modified Files: src/sys/netinet [netbsd-8]: ip_output.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #557): sys/netinet/ip_output.c: 1.295 Keep a pointer to the interface of the multicast membership, because the multicast element itself might go away in in_delmulti (but the interface can't because we hold the lock). From ozaki-r@ To generate a diff of this commit: cvs rdiff -u -r1.279.2.5 -r1.279.2.6 src/sys/netinet/ip_output.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/ip_output.c diff -u src/sys/netinet/ip_output.c:1.279.2.5 src/sys/netinet/ip_output.c:1.279.2.6 --- src/sys/netinet/ip_output.c:1.279.2.5 Sat Jan 13 21:52:06 2018 +++ src/sys/netinet/ip_output.c Mon Feb 19 18:39:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.279.2.5 2018/01/13 21:52:06 snj Exp $ */ +/* $NetBSD: ip_output.c,v 1.279.2.6 2018/02/19 18:39:43 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.279.2.5 2018/01/13 21:52:06 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.279.2.6 2018/02/19 18:39:43 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1836,9 +1836,10 @@ ip_drop_membership(struct ip_moptions *i * Give up the multicast address record to which the * membership points. */ - IFNET_LOCK(imo->imo_membership[i]->inm_ifp); + struct ifnet *inm_ifp = imo->imo_membership[i]->inm_ifp; + IFNET_LOCK(inm_ifp); in_delmulti(imo->imo_membership[i]); - IFNET_UNLOCK(imo->imo_membership[i]->inm_ifp); + IFNET_UNLOCK(inm_ifp); /* * Remove the gap in the membership array.
CVS commit: [netbsd-8] src/sys/netinet
Module Name:src Committed By: snj Date: Mon Feb 19 18:39:43 UTC 2018 Modified Files: src/sys/netinet [netbsd-8]: ip_output.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #557): sys/netinet/ip_output.c: 1.295 Keep a pointer to the interface of the multicast membership, because the multicast element itself might go away in in_delmulti (but the interface can't because we hold the lock). From ozaki-r@ To generate a diff of this commit: cvs rdiff -u -r1.279.2.5 -r1.279.2.6 src/sys/netinet/ip_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Mon Feb 19 18:33:38 UTC 2018 Modified Files: src/share/man/man9 [netbsd-8]: xcall.9 src/sys/kern [netbsd-8]: subr_psref.c subr_xcall.c src/sys/sys [netbsd-8]: xcall.h Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #556): sys/sys/xcall.h: 1.6 share/man/man9/xcall.9: 1.11-1.12 sys/kern/subr_xcall.c: 1.21-1.25 Refer softint(9) -- Support arbitrary softint IPLs in high priority xcall The high priority xcall supported only a softint of IPL_SOFTSERIAL. It meant that it didn't work for xcall callbacks depending on lower IPLs than IPL_SOFTSERIAL. The change makes xcall have multiple softints of IPLs and allow users to specify arbitrary IPLs. Users can specify an IPL by XC_HIGHPRI_IPL passed to the 1st argument of xc_broadcast or xc_unicast. Note that xcall still serves requests one by one (i.e., doesn't run them concurrently) even if requests have different IPLs. Proposed on tech-kern@ -- Use high priority xcall with a softint of an IPL the same as psref class's one This mitigates undesired delay of psref_target_destroy under load such as heavy netowrk traffic that loads softint. -- Try to fix the build: avoid duplicate case labels when IPL_SOFT* are all the same. -- Fix build of kernels that some (or all) IPL_SOFT* share a value (e.g., mips) -- Avoid allocating unused softints that share a value of IPL between another Sort XC_IPL_* in order of priority (NFC) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.18.1 src/share/man/man9/xcall.9 cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/kern/subr_psref.c cvs rdiff -u -r1.19 -r1.19.8.1 src/sys/kern/subr_xcall.c cvs rdiff -u -r1.5 -r1.5.30.1 src/sys/sys/xcall.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Mon Feb 19 18:26:44 UTC 2018 Modified Files: src [netbsd-8]: build.sh src/tools/make [netbsd-8]: buildmake.sh.in Log Message: Pull up following revision(s) (requested by uwe in ticket #555): build.sh: 1.322-1.323 tools/make/buildmake.sh.in: 1.9-1.12 Make sure nbmake is always built with the right _PATH_DEFSYSPATH. -- Restore formatting/indentation of the configure call in rebuildmake() to what it used to be. -- G/c unused runcmd. -- Do not use HOST_CFLAGS to link the make binary. -- Do not use HOST_CFLAGS and others. build.sh calls configure with CFLAGS set to HOST_CFLAGS, etc - so HOST_* environment variables are already taken into account if set. OTOH, if configure were to add anything to CFLAGS etc, the old code would happily ignore those changes, picking up original environment variables instead. To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.316.4.1 src/build.sh cvs rdiff -u -r1.8 -r1.8.74.1 src/tools/make/buildmake.sh.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.316 src/build.sh:1.316.4.1 --- src/build.sh:1.316 Sat Apr 8 18:22:35 2017 +++ src/build.sh Mon Feb 19 18:26:44 2018 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.316 2017/04/08 18:22:35 christos Exp $ +# $NetBSD: build.sh,v 1.316.4.1 2018/02/19 18:26:44 snj Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -1616,13 +1616,8 @@ rebuildmake() statusmsg "Bootstrapping ${toolprefix}make" ${runcmd} cd "${tmpdir}" - ${runcmd} env \ -\ -CC="${HOST_CC-cc}" \ -CPPFLAGS="${HOST_CPPFLAGS} -D_PATH_DEFSYSPATH="'\"'${NETBSDSRCDIR}/share/mk'\"' \ -CFLAGS="${HOST_CFLAGS--O}" \ -LDFLAGS="${HOST_LDFLAGS}" \ -\ + ${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ + CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \ ${HOST_SH} "${TOP}/tools/make/configure" || ( cp ${tmpdir}/config.log ${tmpdir}-config.log bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" ) @@ -1893,7 +1888,7 @@ createmakewrapper() eval cat <
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Mon Feb 19 18:26:44 UTC 2018 Modified Files: src [netbsd-8]: build.sh src/tools/make [netbsd-8]: buildmake.sh.in Log Message: Pull up following revision(s) (requested by uwe in ticket #555): build.sh: 1.322-1.323 tools/make/buildmake.sh.in: 1.9-1.12 Make sure nbmake is always built with the right _PATH_DEFSYSPATH. -- Restore formatting/indentation of the configure call in rebuildmake() to what it used to be. -- G/c unused runcmd. -- Do not use HOST_CFLAGS to link the make binary. -- Do not use HOST_CFLAGS and others. build.sh calls configure with CFLAGS set to HOST_CFLAGS, etc - so HOST_* environment variables are already taken into account if set. OTOH, if configure were to add anything to CFLAGS etc, the old code would happily ignore those changes, picking up original environment variables instead. To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.316.4.1 src/build.sh cvs rdiff -u -r1.8 -r1.8.74.1 src/tools/make/buildmake.sh.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/sh3/sh3
Module Name:src Committed By: snj Date: Mon Feb 19 18:21:21 UTC 2018 Modified Files: src/sys/arch/sh3/sh3 [netbsd-8]: exception.c Log Message: Pull up following revision(s) (requested by uwe in ticket #554): sys/arch/sh3/sh3/exception.c: 1.66 tlb_exception - set ksi_addr to va also when a userland page is not found. Helps SIGSEGV handlers for PROT_NONE red zones. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.64.10.1 src/sys/arch/sh3/sh3/exception.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/sh3/sh3/exception.c diff -u src/sys/arch/sh3/sh3/exception.c:1.64 src/sys/arch/sh3/sh3/exception.c:1.64.10.1 --- src/sys/arch/sh3/sh3/exception.c:1.64 Wed Mar 4 09:39:26 2015 +++ src/sys/arch/sh3/sh3/exception.c Mon Feb 19 18:21:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exception.c,v 1.64 2015/03/04 09:39:26 skrll Exp $ */ +/* $NetBSD: exception.c,v 1.64.10.1 2018/02/19 18:21:21 snj Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.64 2015/03/04 09:39:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.64.10.1 2018/02/19 18:21:21 snj Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -417,6 +417,8 @@ tlb_exception(struct lwp *l, struct trap /* Page not found. */ if (usermode) { KSI_INIT_TRAP(); + ksi.ksi_addr = (void *)va; + switch (err) { case ENOMEM: ksi.ksi_signo = SIGKILL;
CVS commit: [netbsd-8] src/sys/arch/sh3/sh3
Module Name:src Committed By: snj Date: Mon Feb 19 18:21:21 UTC 2018 Modified Files: src/sys/arch/sh3/sh3 [netbsd-8]: exception.c Log Message: Pull up following revision(s) (requested by uwe in ticket #554): sys/arch/sh3/sh3/exception.c: 1.66 tlb_exception - set ksi_addr to va also when a userland page is not found. Helps SIGSEGV handlers for PROT_NONE red zones. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.64.10.1 src/sys/arch/sh3/sh3/exception.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: snj Date: Mon Feb 19 18:19:15 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: virtio.c Log Message: Pull up following revision(s) (requested by uwe in ticket #553): sys/dev/pci/virtio_pci.c: 1.2 via patch to sys/dev/pci/virtio.c Explicitly enable PCI_COMMAND_MASTER_ENABLE and PCI_COMMAND_IO_ENABLE. Recent versions of VirtualBox do not enable bus-mastering by default - this will be fixed, but it doesn't hurt to do it ourselves too. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: snj Date: Mon Feb 19 18:19:15 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: virtio.c Log Message: Pull up following revision(s) (requested by uwe in ticket #553): sys/dev/pci/virtio_pci.c: 1.2 via patch to sys/dev/pci/virtio.c Explicitly enable PCI_COMMAND_MASTER_ENABLE and PCI_COMMAND_IO_ENABLE. Recent versions of VirtualBox do not enable bus-mastering by default - this will be fixed, but it doesn't hurt to do it ourselves too. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/dev/pci/virtio.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/virtio.c diff -u src/sys/dev/pci/virtio.c:1.28 src/sys/dev/pci/virtio.c:1.28.2.1 --- src/sys/dev/pci/virtio.c:1.28 Thu Jun 1 02:45:11 2017 +++ src/sys/dev/pci/virtio.c Mon Feb 19 18:19:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.28 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: virtio.c,v 1.28.2.1 2018/02/19 18:19:15 snj Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.28 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.28.2.1 2018/02/19 18:19:15 snj Exp $"); #include #include @@ -392,6 +392,7 @@ virtio_attach(device_t parent, device_t pcitag_t tag = pa->pa_tag; int revision; pcireg_t id; + pcireg_t csr; revision = PCI_REVISION(pa->pa_class); if (revision != 0) { @@ -409,6 +410,10 @@ virtio_attach(device_t parent, device_t virtio_device_name[PCI_SUBSYS_ID(id)] : "Unknown"), revision); + csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG); + csr |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE; + pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr); + sc->sc_dev = self; sc->sc_pc = pc; sc->sc_tag = tag;
CVS commit: src/sys/modules/pf
Module Name:src Committed By: maya Date: Mon Feb 19 16:21:37 UTC 2018 Modified Files: src/sys/modules/pf: Makefile Log Message: Code is fixed, so hiding the warning is not necessary any more. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/modules/pf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/pf/Makefile diff -u src/sys/modules/pf/Makefile:1.8 src/sys/modules/pf/Makefile:1.9 --- src/sys/modules/pf/Makefile:1.8 Mon Feb 12 22:18:36 2018 +++ src/sys/modules/pf/Makefile Mon Feb 19 16:21:36 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2018/02/12 22:18:36 joerg Exp $ +# $NetBSD: Makefile,v 1.9 2018/02/19 16:21:36 maya Exp $ .include "../Makefile.inc" @@ -20,8 +20,4 @@ SRCS+= tcp_rndiss.c CPPFLAGS+= -I${S}/dist/pf -I${S} -DINET6 -DINET -.if ${HAVE_GCC:U0} == "6" -COPTS.pf_table.c+= -Wno-error=shift-negative-value -.endif - .include
CVS commit: src/sys/modules/pf
Module Name:src Committed By: maya Date: Mon Feb 19 16:21:37 UTC 2018 Modified Files: src/sys/modules/pf: Makefile Log Message: Code is fixed, so hiding the warning is not necessary any more. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/modules/pf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm
Module Name:src Committed By: jmcneill Date: Mon Feb 19 16:10:42 UTC 2018 Modified Files: src/sys/arch/arm/fdt: files.fdt src/sys/arch/arm/vexpress: files.vexpress Log Message: move plfb glue to the correct location To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/vexpress/files.vexpress Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm
Module Name:src Committed By: jmcneill Date: Mon Feb 19 16:10:42 UTC 2018 Modified Files: src/sys/arch/arm/fdt: files.fdt src/sys/arch/arm/vexpress: files.vexpress Log Message: move plfb glue to the correct location To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/vexpress/files.vexpress 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/arm/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.14 src/sys/arch/arm/fdt/files.fdt:1.15 --- src/sys/arch/arm/fdt/files.fdt:1.14 Mon Oct 2 22:49:38 2017 +++ src/sys/arch/arm/fdt/files.fdt Mon Feb 19 16:10:42 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.14 2017/10/02 22:49:38 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.15 2018/02/19 16:10:42 jmcneill Exp $ include "dev/pckbport/files.pckbport" @@ -42,5 +42,8 @@ file arch/arm/fdt/plrtc_fdt.c plrtc_fdt attach psci at fdt with psci_fdt file arch/arm/fdt/psci_fdt.c psci_fdt +attach genfb at fdt with plfb_fdt: fdt_display_timing +file arch/arm/fdt/plfb_fdt.c plfb_fdt + # Console parameters defparam opt_fdt_arm.hCONSADDR Index: src/sys/arch/arm/vexpress/files.vexpress diff -u src/sys/arch/arm/vexpress/files.vexpress:1.3 src/sys/arch/arm/vexpress/files.vexpress:1.4 --- src/sys/arch/arm/vexpress/files.vexpress:1.3 Sat Aug 26 15:05:48 2017 +++ src/sys/arch/arm/vexpress/files.vexpress Mon Feb 19 16:10:42 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.vexpress,v 1.3 2017/08/26 15:05:48 jmcneill Exp $ +# $NetBSD: files.vexpress,v 1.4 2018/02/19 16:10:42 jmcneill Exp $ # # Configuration info for ARM Ltd. Versatile Express peripherals # @@ -20,6 +20,3 @@ file arch/arm/vexpress/vexpress_platform device vxsysreg attach vxsysreg at fdt with vexpress_sysreg file arch/arm/vexpress/vexpress_sysreg.c vexpress_sysreg - -attach genfb at fdt with plfb_fdt: fdt_display_timing -file arch/arm/fdt/plfb_fdt.c plfb_fdt
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Mon Feb 19 15:39:59 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: ROCKCHIP is gone To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/README.evbarm 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/evbarm/conf/README.evbarm diff -u src/sys/arch/evbarm/conf/README.evbarm:1.16 src/sys/arch/evbarm/conf/README.evbarm:1.17 --- src/sys/arch/evbarm/conf/README.evbarm:1.16 Sun Oct 8 18:07:09 2017 +++ src/sys/arch/evbarm/conf/README.evbarm Mon Feb 19 15:39:59 2018 @@ -1,4 +1,4 @@ -$NetBSD: README.evbarm,v 1.16 2017/10/08 18:07:09 jmcneill Exp $ +$NetBSD: README.evbarm,v 1.17 2018/02/19 15:39:59 jmcneill Exp $ config date boards --- @@ -52,7 +52,6 @@ OVERO 2010/07/10 Gumstix Inc. Overo COM PANDABOARD 2012/08/20 TI OMAP4430 PandaBoard PARALLELLA 2015/01/23 Xilinx Zynq and Epiphany multi-core chips PEPPER 2016/10/15 Gumstix Inc. Pepper SBC(Single Board Computer) -ROCKCHIP 2014/12/26 Radxa Rock/Lite/Pro, MINIX NEO X7, Rayeager PX2 SHEEVAPLUG 2010/10/02 Marvell SheevaPlug SMDK2410 2003/07/31 Samsung SMDK2410 S3C2410 eval board SMDK2800 2002/11/20 Samsung SMDK2800 S3C2800 eval board
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Mon Feb 19 15:39:59 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: ROCKCHIP is gone To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/README.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: maya Date: Mon Feb 19 14:34:17 UTC 2018 Modified Files: src/sys/dev/pckbport: wskbdmap_mfii.c src/sys/dev/wscons: wsksymdef.h Log Message: Add Turkish keyboard layout. from berte in PR kern/53011. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pckbport/wskbdmap_mfii.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/wscons/wsksymdef.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/dev/pckbport/wskbdmap_mfii.c diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.25 src/sys/dev/pckbport/wskbdmap_mfii.c:1.26 --- src/sys/dev/pckbport/wskbdmap_mfii.c:1.25 Mon Jul 14 10:05:24 2014 +++ src/sys/dev/pckbport/wskbdmap_mfii.c Mon Feb 19 14:34:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbdmap_mfii.c,v 1.25 2014/07/14 10:05:24 mbalmer Exp $ */ +/* $NetBSD: wskbdmap_mfii.c,v 1.26 2018/02/19 14:34:17 maya Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.25 2014/07/14 10:05:24 mbalmer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.26 2018/02/19 14:34:17 maya Exp $"); #include "opt_wskbdmap.h" #include @@ -771,6 +771,41 @@ static const keysym_t pckbd_keydesc_us_c KC(184), KS_Mode_switch, KS_Multi_key, }; +static const keysym_t pckbd_keydesc_tr[] = { +/* pos normal shifted altgr shift-altgr */ +KC(3), KS_2, KS_apostrophe, KS_sterling, +KC(4), KS_3, KS_asciicircum, KS_numbersign, +KC(5), KS_4, KS_plus, KS_dollar, +KC(6), KS_5, KS_percent, KS_onehalf, +KC(7), KS_6, KS_ampersand, +KC(8), KS_7, KS_slash, KS_braceleft, +KC(9), KS_8, KS_parenleft, KS_bracketleft, +KC(10), KS_9, KS_parenright, KS_bracketright, +KC(11), KS_0, KS_equal, KS_braceright, +KC(12), KS_asterisk, KS_question, KS_backslash, +KC(13), KS_minus, KS_underscore, +KC(16), KS_q, KS_Q, KS_at, +KC(23), KS_L5_idotless, KS_I, +KC(26), KS_L5_gbreve, KS_L5_Gbreve, KS_dead_diaeresis, +KC(27), KS_udiaeresis, KS_Udiaeresis, KS_asciitilde, +KC(39), KS_L5_scedilla, KS_L5_Scedilla, KS_dead_acute, +KC(40), KS_i, KS_L5_Idotabove, +KC(41), KS_quotedbl, KS_eacute, +KC(43), KS_comma, KS_semicolon, KS_dead_grave, +KC(51), KS_odiaeresis, KS_Odiaeresis, +KC(52), KS_ccedilla, KS_Ccedilla, +KC(53), KS_period, KS_colon, +KC(86), KS_less, KS_greater, KS_bar, +KC(184), KS_Mode_switch, KS_Multi_key, +}; + +static const keysym_t pckbd_keydesc_tr_nodead[] = { +/* pos normal shifted altgr shift-altgr */ +KC(26), KS_L5_gbreve, KS_L5_Gbreve, +KC(39), KS_L5_scedilla, KS_L5_Scedilla, KS_apostrophe, +KC(43), KS_comma, KS_semicolon, KS_grave, +}; + static const keysym_t pckbd_keydesc_swapctrlcaps[] = { /* pos command normal shifted */ KC(29), KS_Caps_Lock, @@ -838,6 +873,8 @@ const struct wscons_keydesc pckbd_keydes KBD_MAP(KB_HU, KB_US, pckbd_keydesc_hu), KBD_MAP(KB_NL, KB_US, pckbd_keydesc_nl), KBD_MAP(KB_NL | KB_NODEAD, KB_NL, pckbd_keydesc_nl_nodead), + KBD_MAP(KB_TR, KB_US, pckbd_keydesc_tr), + KBD_MAP(KB_TR | KB_NODEAD, KB_TR, pckbd_keydesc_tr_nodead), #endif /* WSKBD_USONLY */ /* placeholders */ Index: src/sys/dev/wscons/wsksymdef.h diff -u src/sys/dev/wscons/wsksymdef.h:1.66 src/sys/dev/wscons/wsksymdef.h:1.67 --- src/sys/dev/wscons/wsksymdef.h:1.66 Sun Apr 22 14:32:08 2012 +++ src/sys/dev/wscons/wsksymdef.h Mon Feb 19 14:34:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wsksymdef.h,v 1.66 2012/04/22 14:32:08 khorben Exp $ */ +/* $NetBSD: wsksymdef.h,v 1.67 2018/02/19 14:34:17 maya Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -590,6 +590,18 @@ #define KS_voidSymbol 0xf500 + +/* + * Group Latin-5 (iso8859-9) + */ + +#define KS_L5_Gbreve 0xd0 +#define KS_L5_Idotabove 0xdd +#define KS_L5_Scedilla 0xde +#define KS_L5_gbreve 0xf0 +#define KS_L5_idotless 0xfd +#define KS_L5_scedilla 0xfe + /*ENDKEYSYMDECL*/ /* @@ -661,12 +673,13 @@ action(KB_ES, 0, 0x0b00, "es", , "Spanis action(KB_SV, 0, 0x0900, "sv", , "Swedish") \ action(KB_SF, 0, 0x1000, "sf", , "Swiss French") \ action(KB_SG, 0, 0x0f00, "sg", , "Swiss German") \ +action(KB_TR, 0, 0x1700, "tr", , "Turkish") \ action(KB_UA, 0, 0x1200, "ua", , "Ukrainian") #define KB_NONE 0x /* Define all the KB_xx numeric values using above table */ #define KBF_ENUM(tag, tagf, value, cc, ccf, country) tag=value, -enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1700 }; +enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1800 }; /* Define list of KB_xxx and country codes for array initialisation */ #define KBF_ENCTAB(tag, tagf, value, cc, ccf, country) { tag, cc },
CVS commit: src/sys/dev
Module Name:src Committed By: maya Date: Mon Feb 19 14:34:17 UTC 2018 Modified Files: src/sys/dev/pckbport: wskbdmap_mfii.c src/sys/dev/wscons: wsksymdef.h Log Message: Add Turkish keyboard layout. from berte in PR kern/53011. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pckbport/wskbdmap_mfii.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/wscons/wsksymdef.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Feb 19 13:02:47 UTC 2018 Modified Files: src/sys/arch/amd64/include: param.h src/sys/arch/i386/include: param.h Log Message: Double size of MSGBUFSIZE as existing value is not big enough to hold boot dmesg on modern server-class hardware with lots of CPUs, etc. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/param.h cvs rdiff -u -r1.82 -r1.83 src/sys/arch/i386/include/param.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/amd64/include/param.h diff -u src/sys/arch/amd64/include/param.h:1.23 src/sys/arch/amd64/include/param.h:1.24 --- src/sys/arch/amd64/include/param.h:1.23 Thu Jan 11 10:30:26 2018 +++ src/sys/arch/amd64/include/param.h Mon Feb 19 13:02:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.23 2018/01/11 10:30:26 maxv Exp $ */ +/* $NetBSD: param.h,v 1.24 2018/02/19 13:02:47 sborrill Exp $ */ #ifdef __x86_64__ @@ -65,7 +65,7 @@ #define USPACE (UPAGES * NBPG) /* total size of u-area */ #ifndef MSGBUFSIZE -#define MSGBUFSIZE (8*NBPG) /* default message buffer size */ +#define MSGBUFSIZE (16*NBPG) /* default message buffer size */ #endif /* Index: src/sys/arch/i386/include/param.h diff -u src/sys/arch/i386/include/param.h:1.82 src/sys/arch/i386/include/param.h:1.83 --- src/sys/arch/i386/include/param.h:1.82 Sat Jul 29 13:05:15 2017 +++ src/sys/arch/i386/include/param.h Mon Feb 19 13:02:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.82 2017/07/29 13:05:15 maxv Exp $ */ +/* $NetBSD: param.h,v 1.83 2018/02/19 13:02:47 sborrill Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -108,7 +108,7 @@ #define INTRSTACKSIZE 8192 #ifndef MSGBUFSIZE -#define MSGBUFSIZE (8*NBPG) /* default message buffer size */ +#define MSGBUFSIZE (16*NBPG) /* default message buffer size */ #endif /*
CVS commit: src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Feb 19 13:02:47 UTC 2018 Modified Files: src/sys/arch/amd64/include: param.h src/sys/arch/i386/include: param.h Log Message: Double size of MSGBUFSIZE as existing value is not big enough to hold boot dmesg on modern server-class hardware with lots of CPUs, etc. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/param.h cvs rdiff -u -r1.82 -r1.83 src/sys/arch/i386/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Mon Feb 19 10:31:53 UTC 2018 Modified Files: src/share/man/man4: ddb.4 Log Message: Quote minus. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/share/man/man4/ddb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.