CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Wed Jan 14 05:33:35 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Add two PRs into ticket 397. To generate a diff of this commit: cvs rdiff -u -r1.1.2.162 -r1.1.2.163 src/doc/CHANGES-7.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-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.162 src/doc/CHANGES-7.0:1.1.2.163 --- src/doc/CHANGES-7.0:1.1.2.162 Mon Jan 12 21:18:45 2015 +++ src/doc/CHANGES-7.0 Wed Jan 14 05:33:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.162 2015/01/12 21:18:45 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.163 2015/01/14 05:33:35 msaitoh Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -13202,7 +13202,8 @@ sys/arch/x86/x86/cpu_ucode_intel.c 1.6 sys/kern/kern_rndq.c1.29 - Don't use cpu_counter32() unconditionally. + Don't use cpu_counter32() unconditionally. PR#49104 reported by + Jarle Greipsland and PR#49124 reported by John D. Baker. [christos, ticket #397] sys/kern/vfs_mount.c1.32
CVS commit: src/lib/libperfuse
Module Name:src Committed By: manu Date: Tue Jan 13 16:51:30 UTC 2015 Modified Files: src/lib/libperfuse: ops.c Log Message: Fix atime update FUSE filesystems assume that SETATTR with atime is the result of utiimes() being called. As a result, atime and mtime will be updated. This happens with MooseFS and glusterFS. atime is supposed to be updated by the filesystem itself when it gets read operations. We fix the problem in SETATTR operations by 1) do not create a mtime update when we have an atime update (and vice versa), just fill the fields to avoid the filesystem restting the missing field to Epoch, but do not pretend we want to update it. 2) If the change is limited to atime, iscard it, as updates should be done by READ operations 3) Kernel part of PUFFS has been fixed to make sure reads on empty file are sent to the filesystem: http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html Thanks to Tom Ivar Helbekkmo for reporting this issue. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/lib/libperfuse/ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.81 src/lib/libperfuse/ops.c:1.82 --- src/lib/libperfuse/ops.c:1.81 Wed Nov 12 05:08:43 2014 +++ src/lib/libperfuse/ops.c Tue Jan 13 16:51:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.81 2014/11/12 05:08:43 manu Exp $ */ +/* $NetBSD: ops.c,v 1.82 2015/01/13 16:51:30 manu Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -1785,30 +1785,27 @@ perfuse_node_setattr_ttl(struct puffs_us } /* - * Setting mtime without atime or vice versa leads to - * dates being reset to Epoch on glusterfs. If one - * is missing, use the old value. + * When not sending a time field, still fill with + * current value, as the filesystem may just reset + * the field to Epoch even if fsi->valid bit is + * not set (GlusterFS does that). */ - if ((vap->va_mtime.tv_sec != (time_t)PUFFS_VNOVAL) || - (vap->va_atime.tv_sec != (time_t)PUFFS_VNOVAL)) { - - if (vap->va_atime.tv_sec != (time_t)PUFFS_VNOVAL) { - fsi->atime = vap->va_atime.tv_sec; - fsi->atimensec = (uint32_t)vap->va_atime.tv_nsec; - } else { - fsi->atime = old_va->va_atime.tv_sec; - fsi->atimensec = (uint32_t)old_va->va_atime.tv_nsec; - } - - if (vap->va_mtime.tv_sec != (time_t)PUFFS_VNOVAL) { - fsi->mtime = vap->va_mtime.tv_sec; - fsi->mtimensec = (uint32_t)vap->va_mtime.tv_nsec; - } else { - fsi->mtime = old_va->va_mtime.tv_sec; - fsi->mtimensec = (uint32_t)old_va->va_mtime.tv_nsec; - } + if (vap->va_atime.tv_sec != (time_t)PUFFS_VNOVAL) { + fsi->atime = vap->va_atime.tv_sec; + fsi->atimensec = (uint32_t)vap->va_atime.tv_nsec; + fsi->valid |= FUSE_FATTR_ATIME; + } else { + fsi->atime = old_va->va_atime.tv_sec; + fsi->atimensec = (uint32_t)old_va->va_atime.tv_nsec; + } - fsi->valid |= (FUSE_FATTR_MTIME|FUSE_FATTR_ATIME); + if (vap->va_mtime.tv_sec != (time_t)PUFFS_VNOVAL) { + fsi->mtime = vap->va_mtime.tv_sec; + fsi->mtimensec = (uint32_t)vap->va_mtime.tv_nsec; + fsi->valid |= FUSE_FATTR_MTIME; + } else { + fsi->mtime = old_va->va_mtime.tv_sec; + fsi->mtimensec = (uint32_t)old_va->va_mtime.tv_nsec; } if (vap->va_mode != (mode_t)PUFFS_VNOVAL) { @@ -1851,6 +1848,14 @@ perfuse_node_setattr_ttl(struct puffs_us fsi->mtimensec = 0; fsi->valid &= ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME); } + + /* + * If only atime is changed, discard the operation: it + * happens after read, and in that case the filesystem + * already updaed atime. NB: utimes() also change mtime. + */ + if (fsi->valid == FUSE_FATTR_ATIME) + fsi->valid &= ~FUSE_FATTR_ATIME; /* * If nothing remain, discard the operation.
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: manu Date: Tue Jan 13 16:39:51 UTC 2015 Modified Files: src/sys/fs/puffs: puffs_vnops.c Log Message: Make sure reads on empty files reach PUFFS filesystems Sending a read through the page cache will get the operation short-circuited. This is a problem with some filesystems that expect to receive the read operation in order to update atime. We fix that by bypassing the page cache when reading a file wich a size known to be zero. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/fs/puffs/puffs_vnops.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/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.198 src/sys/fs/puffs/puffs_vnops.c:1.199 --- src/sys/fs/puffs/puffs_vnops.c:1.198 Tue Nov 4 09:14:42 2014 +++ src/sys/fs/puffs/puffs_vnops.c Tue Jan 13 16:39:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.198 2014/11/04 09:14:42 manu Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.199 2015/01/13 16:39:51 manu Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.198 2014/11/04 09:14:42 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.199 2015/01/13 16:39:51 manu Exp $"); #include #include @@ -2279,9 +2279,17 @@ puffs_vnop_read(void *v) if (uio->uio_offset < 0) return EFBIG; + /* + * On the case of reading empty files and (vp->v_size != 0) below: + * some filesystems (hint: FUSE and distributed filesystems) still + * expect to get the READ in order to update atime. Reading through + * the case filters empty files, therefore we prefer to bypass the + * cache here. + */ if (vp->v_type == VREG && PUFFS_USE_PAGECACHE(pmp) && - !(pn->pn_stat & PNODE_RDIRECT)) { + !(pn->pn_stat & PNODE_RDIRECT) && + (vp->v_size != 0)) { const int advice = IO_ADV_DECODE(ap->a_ioflag); while (uio->uio_resid > 0) {
CVS commit: src/lib/libm/arch/hppa
Module Name:src Committed By: martin Date: Tue Jan 13 11:16:06 UTC 2015 Modified Files: src/lib/libm/arch/hppa: fenv.c Log Message: Simplify, now that rounding mode defines match the hardware bits. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/hppa/fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/hppa/fenv.c diff -u src/lib/libm/arch/hppa/fenv.c:1.1 src/lib/libm/arch/hppa/fenv.c:1.2 --- src/lib/libm/arch/hppa/fenv.c:1.1 Sat Dec 27 16:54:02 2014 +++ src/lib/libm/arch/hppa/fenv.c Tue Jan 13 11:16:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.c,v 1.1 2014/12/27 16:54:02 martin Exp $ */ +/* $NetBSD: fenv.c,v 1.2 2015/01/13 11:16:06 martin Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz @@ -24,7 +24,7 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ #include -__RCSID("$NetBSD: fenv.c,v 1.1 2014/12/27 16:54:02 martin Exp $"); +__RCSID("$NetBSD: fenv.c,v 1.2 2015/01/13 11:16:06 martin Exp $"); #include #include @@ -41,11 +41,6 @@ __RCSID("$NetBSD: fenv.c,v 1.1 2014/12/2 #define FE_ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ FE_UPWARD | FE_TOWARDZERO) -/* - * Our constants start at bit 0, while the fpsr bitfield starts at 9 - */ -#define FE_ROUND_SHIFT 9 - /* Load lower 32 bits from floating-point state register */ static inline uint32_t readfpsr(void) @@ -209,7 +204,7 @@ fegetround(void) r = readfpsr(); - return (r>>FE_ROUND_SHIFT) & FE_ROUND_MASK; + return r & FE_ROUND_MASK; } /* @@ -227,8 +222,8 @@ fesetround(int round) return -1; r = readfpsr(); - r &= ~(FE_ROUND_MASK << FE_ROUND_SHIFT); - r |= round << FE_ROUND_SHIFT; + r &= ~FE_ROUND_MASK; + r |= round; writefpsr(r); /* Success */
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: martin Date: Tue Jan 13 11:15:29 UTC 2015 Modified Files: src/sys/arch/hppa/include: fenv.h ieeefp.h Log Message: Properly separate fenv.h and ieeefp.h by moving all fenv defines over to the former. Now that they are decoupled, make rounding modes match the hardware bits. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/include/fenv.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/include/ieeefp.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/hppa/include/fenv.h diff -u src/sys/arch/hppa/include/fenv.h:1.1 src/sys/arch/hppa/include/fenv.h:1.2 --- src/sys/arch/hppa/include/fenv.h:1.1 Sat Dec 27 16:54:03 2014 +++ src/sys/arch/hppa/include/fenv.h Tue Jan 13 11:15:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.1 2014/12/27 16:54:03 martin Exp $ */ +/* $NetBSD: fenv.h,v 1.2 2015/01/13 11:15:29 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,23 @@ #define _HPPA_FENV_H_ #include -#include + +typedef unsigned fenv_t; +typedef unsigned fexcept_t; + +#define FE_INEXACT 0x01 /* imprecise (loss of precision) */ +#define FE_UNDERFLOW 0x02 /* underflow exception */ +#define FE_OVERFLOW 0x04 /* overflow exception */ +#define FE_DIVBYZERO 0x08 /* divide-by-zero exception */ +#define FE_INVALID 0x10 /* invalid operation exception */ + +#define FE_ALL_EXCEPT 0x1f + +#define FE_TONEAREST (0) /* round to nearest representable number */ +#define FE_TOWARDZERO (1<<9) /* round to zero (truncate) */ +#define FE_UPWARD (2<<9) /* round toward positive infinity */ +#define FE_DOWNWARD (3<<9) /* round toward negative infinity */ + __BEGIN_DECLS Index: src/sys/arch/hppa/include/ieeefp.h diff -u src/sys/arch/hppa/include/ieeefp.h:1.6 src/sys/arch/hppa/include/ieeefp.h:1.7 --- src/sys/arch/hppa/include/ieeefp.h:1.6 Mon Jan 12 09:14:45 2015 +++ src/sys/arch/hppa/include/ieeefp.h Tue Jan 13 11:15:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.6 2015/01/12 09:14:45 mrg Exp $ */ +/* $NetBSD: ieeefp.h,v 1.7 2015/01/13 11:15:29 martin Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 @@ -12,36 +12,20 @@ #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) -typedef unsigned fenv_t; -typedef unsigned fexcept_t; - -#define FE_INEXACT 0x01 /* imprecise (loss of precision) */ -#define FE_UNDERFLOW 0x02 /* underflow exception */ -#define FE_OVERFLOW 0x04 /* overflow exception */ -#define FE_DIVBYZERO 0x08 /* divide-by-zero exception */ -#define FE_INVALID 0x10 /* invalid operation exception */ - -#define FE_ALL_EXCEPT 0x1f - -#define FE_TONEAREST 0 /* round to nearest representable number */ -#define FE_TOWARDZERO 1 /* round to zero (truncate) */ -#define FE_UPWARD 2 /* round toward positive infinity */ -#define FE_DOWNWARD 3 /* round toward negative infinity */ - #if !defined(_ISOC99_SOURCE) typedef int fp_except; -#define FP_X_INV FE_INVALID /* invalid operation exception */ -#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ -#define FP_X_OFL FE_OVERFLOW /* overflow exception */ -#define FP_X_UFL FE_UNDERFLOW /* underflow exception */ -#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ +#define FP_X_INV 0x10 /* invalid operation exception */ +#define FP_X_DZ 0x08 /* divide-by-zero exception */ +#define FP_X_OFL 0x04 /* overflow exception */ +#define FP_X_UFL 0x02 /* underflow exception */ +#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ typedef enum { -FP_RN=FE_TONEAREST, /* round to nearest representable number */ -FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */ -FP_RP=FE_UPWARD, /* round toward positive infinity */ -FP_RM=FE_DOWNWARD /* round toward negative infinity */ +FP_RN=0, /* round to nearest representable number */ +FP_RZ=1, /* round to zero (truncate) */ +FP_RP=2, /* round toward positive infinity */ +FP_RM=3 /* round toward negative infinity */ } fp_rnd; #endif /* !_ISOC99_SOURCE */
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Tue Jan 13 10:37:38 UTC 2015 Modified Files: src/sys/arch/arm/rockchip: obio.c Log Message: >From FUKAUMI Naoki : sdmmc0 is unstable at 48MHz with default 4mA on some boards. 12mA is stable, it's used in Rockchip Linux 3.0 kernel too. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/rockchip/obio.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/rockchip/obio.c diff -u src/sys/arch/arm/rockchip/obio.c:1.15 src/sys/arch/arm/rockchip/obio.c:1.16 --- src/sys/arch/arm/rockchip/obio.c:1.15 Mon Jan 5 21:35:53 2015 +++ src/sys/arch/arm/rockchip/obio.c Tue Jan 13 10:37:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.15 2015/01/05 21:35:53 jmcneill Exp $ */ +/* $NetBSD: obio.c,v 1.16 2015/01/13 10:37:38 jmcneill Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -38,7 +38,7 @@ #include "opt_rockchip.h" #include -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.15 2015/01/05 21:35:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.16 2015/01/13 10:37:38 jmcneill Exp $"); #include #include @@ -201,6 +201,7 @@ obio_search(device_t parent, cfdata_t cf #define RK3188_GRF_SOC_CON2_OFFSET 0x00A8 #define RK3188_GRF_SOC_STATUS_OFFSET 0x00AC +#define RK3188_GRF_IO_CON2_OFFSET 0x00FC #define RK3188_GRF_IO_CON3_OFFSET 0x0100 #define GRF_GPIO0A_IOMUX_OFFSET 0x00a8 @@ -213,6 +214,7 @@ void obio_init_grf(void) /* Radxa Rock */ obio_iomux(RK3188_GRF_GPIO3A_IOMUX_OFFSET, 0x5554); /* MMC0 */ obio_iomux(RK3188_GRF_GPIO3B_IOMUX_OFFSET, 0x00050001); /* MMC0 */ + obio_iomux(RK3188_GRF_IO_CON2_OFFSET, 0x00c000c0); /* MMC0 */ obio_iomux(RK3188_GRF_GPIO3D_IOMUX_OFFSET, 0x3c00); /* VBUS */ obio_iomux(RK3188_GRF_GPIO1D_IOMUX_OFFSET, 0x); /* I2C[0124] */ obio_iomux(RK3188_GRF_GPIO3B_IOMUX_OFFSET, 0xa000a000); /* I2C3 */
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Tue Jan 13 10:36:15 UTC 2015 Modified Files: src/sys/arch/arm/rockchip: rockchip_emac.c Log Message: one more segment can be queued, from FUKAUMI Naoki To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/rockchip/rockchip_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/rockchip/rockchip_emac.c diff -u src/sys/arch/arm/rockchip/rockchip_emac.c:1.9 src/sys/arch/arm/rockchip/rockchip_emac.c:1.10 --- src/sys/arch/arm/rockchip/rockchip_emac.c:1.9 Thu Jan 8 14:17:42 2015 +++ src/sys/arch/arm/rockchip/rockchip_emac.c Tue Jan 13 10:36:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rockchip_emac.c,v 1.9 2015/01/08 14:17:42 jmcneill Exp $ */ +/* $NetBSD: rockchip_emac.c,v 1.10 2015/01/13 10:36:15 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_rkemac.h" #include -__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.9 2015/01/08 14:17:42 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.10 2015/01/13 10:36:15 jmcneill Exp $"); #include #include @@ -701,7 +701,7 @@ rkemac_queue(struct rkemac_softc *sc, st const u_int nbufs = map->dm_nsegs + ((m0->m_pkthdr.len < ETHER_MIN_LEN) ? 1 : 0); - if (sc->sc_txq.t_queued + nbufs >= RKEMAC_TX_RING_COUNT) { + if (sc->sc_txq.t_queued + nbufs > RKEMAC_TX_RING_COUNT) { bus_dmamap_unload(sc->sc_dmat, map); return ENOBUFS; }
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: msaitoh Date: Tue Jan 13 08:57:02 UTC 2015 Modified Files: src/sys/arch/x86/pci: ichlpcib.c Log Message: As I wrote in the last commit, The PMBASE and GPIOBASE registers are not compltible with the PCI spec and the map sizes are fixed to 128bytes. The pci_mapreg_submap() function has a code to check the range of the BAR. The PCI_MAPREG_IO_SIZE() macro returns lower than 128bytes on some machines. It makes impossible to use pci_mapreg_submap(). Use pci_conf_read() and bus_space_map() directly. Observed and tested with my Thinkpad X61. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/pci/ichlpcib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.45 src/sys/arch/x86/pci/ichlpcib.c:1.46 --- src/sys/arch/x86/pci/ichlpcib.c:1.45 Fri Dec 26 05:09:03 2014 +++ src/sys/arch/x86/pci/ichlpcib.c Tue Jan 13 08:57:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.45 2014/12/26 05:09:03 msaitoh Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.46 2015/01/13 08:57:02 msaitoh Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.45 2014/12/26 05:09:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.46 2015/01/13 08:57:02 msaitoh Exp $"); #include #include @@ -303,6 +303,7 @@ lpcibattach(device_t parent, device_t se struct pci_attach_args *pa = aux; struct lpcib_softc *sc = device_private(self); struct lpcib_device *lpcib_dev; + pcireg_t pmbase; sc->sc_pa = *pa; @@ -324,12 +325,16 @@ lpcibattach(device_t parent, device_t se * * The PMBASE register is alike PCI BAR but not completely compatible * with it. The PMBASE define the base address and the type but - * not describe the size. + * not describe the size. The value of the register may be lower + * than LPCIB_PCI_PM_SIZE. It makes impossible to use + * pci_mapreg_submap() because the function does range check. */ - if (pci_mapreg_submap(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0, - LPCIB_PCI_PM_SIZE, 0, &sc->sc_iot, &sc->sc_ioh, NULL, - &sc->sc_iosize)) { - aprint_error_dev(self, "can't map power management i/o space\n"); + sc->sc_iot = pa->pa_iot; + pmbase = pci_conf_read(pa->pa_pc, pa->pa_tag, LPCIB_PCI_PMBASE); + if (bus_space_map(sc->sc_iot, PCI_MAPREG_IO_ADDR(pmbase), + LPCIB_PCI_PM_SIZE, 0, &sc->sc_ioh) != 0) { + aprint_error_dev(self, + "can't map power management i/o space\n"); return; } @@ -1082,11 +1087,14 @@ lpcib_gpio_configure(device_t self) /* * The GPIO_BASE register is alike PCI BAR but not completely * compatible with it. The PMBASE define the base address and the type - * but not describe the size. + * but not describe the size. The value of the register may be lower + * than LPCIB_PCI_GPIO_SIZE. It makes impossible to use + * pci_mapreg_submap() because the function does range check. */ - rv = pci_mapreg_submap(&sc->sc_pa, base_reg, PCI_MAPREG_TYPE_IO, 0, - LPCIB_PCI_GPIO_SIZE, 0, &sc->sc_gpio_iot, &sc->sc_gpio_ioh, - NULL, &sc->sc_gpio_ios); + sc->sc_gpio_iot = sc->sc_pa.pa_iot; + reg = pci_conf_read(sc->sc_pa.pa_pc, sc->sc_pa.pa_tag, base_reg); + rv = bus_space_map(sc->sc_gpio_iot, PCI_MAPREG_IO_ADDR(reg), + LPCIB_PCI_GPIO_SIZE, 0, &sc->sc_gpio_ioh); if (rv != 0) { aprint_error_dev(self, "can't map general purpose i/o space(rv = %d)\n", rv); return;
CVS import: src/crypto/external/bsd/openssl/dist
Module Name:src Committed By: spz Date: Tue Jan 13 08:02:20 UTC 2015 Update of /cvsroot/src/crypto/external/bsd/openssl/dist In directory ivanova.netbsd.org:/tmp/cvs-serv14297 Log Message: Import of OpenSSL 1.0.1k. Upstream log: Changes between 1.0.1j and 1.0.1k [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS message can cause a segmentation fault in OpenSSL due to a NULL pointer dereference. This could lead to a Denial Of Service attack. Thanks to Markus Stenberg of Cisco Systems, Inc. for reporting this issue. (CVE-2014-3571) [Steve Henson] *) Fix DTLS memory leak in dtls1_buffer_record. A memory leak can occur in the dtls1_buffer_record function under certain conditions. In particular this could occur if an attacker sent repeated DTLS records with the same sequence number but for the next epoch. The memory leak could be exploited by an attacker in a Denial of Service attack through memory exhaustion. Thanks to Chris Mueller for reporting this issue. (CVE-2015-0206) [Matt Caswell] *) Fix issue where no-ssl3 configuration sets method to NULL. When openssl is built with the no-ssl3 option and a SSL v3 ClientHello is received the ssl method would be set to NULL which could later result in a NULL pointer dereference. Thanks to Frank Schmirler for reporting this issue. (CVE-2014-3569) [Kurt Roeckx] *) Abort handshake if server key exchange message is omitted for ephemeral ECDH ciphersuites. Thanks to Karthikeyan Bhargavan of the PROSECCO team at INRIA for reporting this issue. (CVE-2014-3572) [Steve Henson] *) Remove non-export ephemeral RSA code on client and server. This code violated the TLS standard by allowing the use of temporary RSA keys in non-export ciphersuites and could be used by a server to effectively downgrade the RSA key length used to a value smaller than the server certificate. Thanks for Karthikeyan Bhargavan of the PROSECCO team at INRIA or reporting this issue. (CVE-2015-0204) [Steve Henson] *) Fixed issue where DH client certificates are accepted without verification. An OpenSSL server will accept a DH certificate for client authentication without the certificate verify message. This effectively allows a client to authenticate without the use of a private key. This only affects servers which trust a client certificate authority which issues certificates containing DH keys: these are extremely rare and hardly ever encountered. Thanks for Karthikeyan Bhargavan of the PROSECCO team at INRIA or reporting this issue. (CVE-2015-0205) [Steve Henson] *) Ensure that the session ID context of an SSL is updated when its SSL_CTX is updated via SSL_set_SSL_CTX. The session ID context is typically set from the parent SSL_CTX, and can vary with the CTX. [Adam Langley] *) Fix various certificate fingerprint issues. By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. those using the certificate fingerprint for blacklists. 1. Reject signatures with non zero unused bits. If the BIT STRING containing the signature has non zero unused bits reject the signature. All current signature algorithms require zero unused bits. 2. Check certificate algorithm consistency. Check the AlgorithmIdentifier inside TBS matches the one in the certificate signature. NB: this will result in signature failure errors for some broken certificates. Thanks to Konrad Kraszewski from Google for reporting this issue. 3. Check DSA/ECDSA signatures use DER. Reencode DSA/ECDSA signatures and compare with the original received signature. Return an error if there is a mismatch. This will reject various cases including garbage after signature (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS program for discovering this case) and use of BER or invalid ASN.1 INTEGERs (negative or with leading zeroes). Further analysis was conducted and fixes were developed by Stephen Henson of the OpenSSL core team. (CVE-2014-8275) [Steve Henson] *) Correct Bignum squaring. Bignum squaring (BN_sqr) may produce incorrect results on some platforms, including x86_64. This bug occurs at random with a very low probability, and is not known to be exploitable in any way, though its exact impact is difficult to determine. Thanks to Pieter Wuille (Blockstream) who reported this issue and also suggested an initial fix. Further analysis was conducted by the OpenSSL developme