Re: svn commit: r290130 - head/sys/dev/ntb/ntb_hw
On Thursday, October 29, 2015 09:53:43 AM Konstantin Belousov wrote: > On Thu, Oct 29, 2015 at 04:16:28AM +, Conrad E. Meyer wrote: > > Author: cem > > Date: Thu Oct 29 04:16:28 2015 > > New Revision: 290130 > > URL: https://svnweb.freebsd.org/changeset/base/290130 > > > > Log: > > ntb: Do not attempt to set write-combining on MWs > > > > AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily > > true for NTB memory windows (especially 64-bit BARs). > I am not sure what do you mean. pmap_change_attr() handles either DMAP > or kernel mapped memory. I think it assumes the DMAP is valid in the nested call here: if (tmpva >= VM_MIN_KERNEL_ADDRESS) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pdpe & PG_PS_FRAME; pa_end = pa_start + NBPDP; } else if (pa_end == (*pdpe & PG_PS_FRAME)) pa_end += NBPDP; else { /* Run ended, update direct map. */ error = pmap_change_attr_locked( PHYS_TO_DMAP(pa_start), pa_end - pa_start, mode); if (error != 0) break; /* Start physical address run. */ pa_start = *pdpe & PG_PS_FRAME; pa_end = pa_start + NBPDP; } } That needs to do some sort of range checking on the (pa_start, pa_end) range to only set values that are mapped in the DMAP. In particular, that pmap_change_attr_locked() will fail here: /* * Pages that aren't mapped aren't supported. Also break down 2MB pages * into 4KB pages if required. */ for (tmpva = base; tmpva < base + size; ) { pdpe = pmap_pdpe(kernel_pmap, tmpva); if (*pdpe == 0) return (EINVAL); Since there won't be a valid pdpe, pde, or pte in the DMAP. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290130 - head/sys/dev/ntb/ntb_hw
On Thursday, October 29, 2015 04:16:28 AM Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 29 04:16:28 2015 > New Revision: 290130 > URL: https://svnweb.freebsd.org/changeset/base/290130 > > Log: > ntb: Do not attempt to set write-combining on MWs > > AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily > true for NTB memory windows (especially 64-bit BARs). > > Suggested by: pmap_change_attr_locked -> kassert_panic > Sponsored by: EMC / Isilon Storage Division Hmm, pmap_mapdev_attr() does the right thing, but there isn't a good way to call that directly (and still get a valid bus handle/tag). I have on my todo to add a bus_map_resource() that would let you allocate a bus handle/tag that 1) is a subset of a resource, and 2) specifies a memory attribute. It would allow you to do this sanely. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290140 - head/sys/kern
Author: hselasky Date: Thu Oct 29 13:53:37 2015 New Revision: 290140 URL: https://svnweb.freebsd.org/changeset/base/290140 Log: Add missing NULL check in physio(). When destroying a character device the si_devsw field is set to NULL before all references are gone, to indicate the character device is going away. This can cause a NULL-dereference fault inside physio(). The callers of physio() should own a thread reference on the cdev and if si_devsw is seen as non-NULL, it is usable during the execution of the function. Else an ENXIO error code is returned. Reviewed by: kib MFC after:2 weeks Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c == --- head/sys/kern/kern_physio.c Thu Oct 29 10:31:44 2015(r290139) +++ head/sys/kern/kern_physio.c Thu Oct 29 13:53:37 2015(r290140) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); int physio(struct cdev *dev, struct uio *uio, int ioflag) { + struct cdevsw *csw; struct buf *pbuf; struct bio *bp; struct vm_page **pages; @@ -46,6 +47,11 @@ physio(struct cdev *dev, struct uio *uio int error, i, npages, maxpages; vm_prot_t prot; + csw = dev->si_devsw; + /* check if character device is being destroyed */ + if (csw == NULL) + return (ENXIO); + /* XXX: sanity check */ if(dev->si_iosize_max < PAGE_SIZE) { printf("WARNING: %s si_iosize_max=%d, using DFLTPHYS.\n", @@ -165,7 +171,7 @@ physio(struct cdev *dev, struct uio *uio } } - dev->si_devsw->d_strategy(bp); + csw->d_strategy(bp); if (uio->uio_rw == UIO_READ) biowait(bp, "physrd"); else ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290135 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux compat/linuxkpi/common/include/net compat/linuxkpi/common/src conf dev/usb modules/cxgb/i
On Thursday, October 29, 2015 08:28:39 AM Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Oct 29 08:28:39 2015 > New Revision: 290135 > URL: https://svnweb.freebsd.org/changeset/base/290135 > > Log: > Finish process of moving the LinuxKPI module into the default kernel build. > > - Move all files related to the LinuxKPI into sys/compat/linuxkpi and > its subfolders. > - Update sys/conf/files and some Makefiles to use new file locations. > - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn > adds the LinuxKPI to all LINT builds. > - The LinuxKPI can be added to the kernel by setting the > COMPAT_LINUXKPI option. The OFED kernel option no longer builds the > LinuxKPI into the kernel. This was done to keep the build rules for > the LinuxKPI in sys/conf/files simple. > - Extend the LinuxKPI module to include support for USB by moving the > Linux USB compat from usb.ko to linuxkpi.ko. > - Bump the FreeBSD_version. > - A universe kernel build has been done. > > Reviewed by:np @ (cxgb and cxgbe related changes only) > Sponsored by: Mellanox Technologies Humm. Did you coordinate with dumbbell@ at all? In his reviews on phabricator he had used subdirectories under linuxkpi for different versions Linux kernel versions. At the very least it seems like he should have been on the review for this since he is working in the same area doing a very similar thing? -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289834 - head/sys/x86/x86
El 26/10/15 a les 15.24, Oliver Pinter ha escrit: > On 10/26/15, Adrian Chaddwrote: >> Hi, >> >> I'll take a photo of it when it breaks next. >> >> Would you mind reverting it for now until we can figure it out? > > btw, this was the two kernel panic what I got: > > Fatal trap 12: page fault while in kernel mode > cpuid = 11; apic id = 03 > fault virtual address = 0x30 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0x808a2d22 > stack pointer = 0x28:0xfe07cc75a6f0 > frame pointer = 0x28:0xfe07cc75a770 > code segment= base 0x0, limit 0xf, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags= interrupt enabled, resume, IOPL = 0 > current process = 5 (doneq0) > trap number = 12 > panic: page fault > cpuid = 11 > KDB: stack backtrace: > #0 0x80641647 at kdb_backtrace+0x67 > #1 0x80606762 at vpanic+0x182 > #2 0x806067e3 at panic+0x43 > #3 0x8084eef1 at trap_fatal+0x351 > #4 0x8084f0e4 at trap_pfault+0x1e4 > #5 0x8084e82f at trap+0x4bf > #6 0x80830d57 at calltrap+0x8 > #7 0x8063beab at _bus_dmamap_load_ccb+0x1fb > #8 0x8063bc51 at bus_dmamap_load_ccb+0x91 > #9 0x8042dcad at ata_dmaload+0x11d > #10 0x8042df7e at ata_begin_transaction+0x7e > #11 0x8042c18e at ataaction+0x9ce > #12 0x802a220f at xpt_run_devq+0x5bf > #13 0x802a17ad at xpt_action_default+0x94d > #14 0x802c0024 at adastart+0x8b4 > #15 0x802a2e93 at xpt_run_allocq+0x193 > #16 0x802c0ea0 at adadone+0x280 > #17 0x802a5310 at xpt_done_process+0x3a0 > Uptime: 1m40s Hello, I've been able to reproduce this by tweaking blkfront dma tag, and the issue was due to an off-by-one error. I've got an updated patch that applies on top of current HEAD, would any of you two mind giving it a try? https://people.freebsd.org/~royger/bounce_load_ma.patch Thanks, Roger. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290143 - head/sys/amd64/linux32
Author: jhb Date: Thu Oct 29 15:16:47 2015 New Revision: 290143 URL: https://svnweb.freebsd.org/changeset/base/290143 Log: Fix build with DEBUG defined. Reported by: hselasky Modified: head/sys/amd64/linux32/linux.h head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/linux32/linux.h == --- head/sys/amd64/linux32/linux.h Thu Oct 29 14:53:56 2015 (r290142) +++ head/sys/amd64/linux32/linux.h Thu Oct 29 15:16:47 2015 (r290143) @@ -40,7 +40,7 @@ * debugging support */ extern u_char linux_debug_map[]; -#defineldebug(name)isclr(linux_debug_map, LINUX_SYS_linux_ ## name) +#defineldebug(name)isclr(linux_debug_map, LINUX32_SYS_linux_ ## name) #defineARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ (long)td->td_proc->p_pid, (long)td->td_tid #defineLMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 29 14:53:56 2015 (r290142) +++ head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 29 15:16:47 2015 (r290143) @@ -105,8 +105,8 @@ MODULE_VERSION(linux, 1); * to syscall 0. This is slightly less bogus than using * ldebug(sigreturn). */ -#defineLINUX_SYS_linux_rt_sendsig 0 -#defineLINUX_SYS_linux_sendsig 0 +#defineLINUX32_SYS_linux_rt_sendsig0 +#defineLINUX32_SYS_linux_sendsig 0 const char *linux_kplatform; static int linux_szsigcode; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290003 - head/sys/ofed/include/linux
On 10/29/15 15:36, Gleb Smirnoff wrote: The LinuxKPI is not a binary compatibility module, and will at some H> point have API's diverging from Linux, to fit BSD API's better. This statement makes the name of LinuxKPI quite pointless, as well as the whole idea of the KPI unclear. Hi, To be more clear. Adding bind_irq_to_cpu() is more an exception than the default. A the moment I think Linux doesn't have an equivalent of this function, because of Linux's interrupt model. --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290144 - head/sys/amd64/linux32
Author: jhb Date: Thu Oct 29 15:20:47 2015 New Revision: 290144 URL: https://svnweb.freebsd.org/changeset/base/290144 Log: Update for LINUX32 rename. The assembler didn't complain about undefined symbols but just used 0 after the rename. Modified: head/sys/amd64/linux32/linux32_locore.s Modified: head/sys/amd64/linux32/linux32_locore.s == --- head/sys/amd64/linux32/linux32_locore.s Thu Oct 29 15:16:47 2015 (r290143) +++ head/sys/amd64/linux32/linux32_locore.s Thu Oct 29 15:20:47 2015 (r290144) @@ -28,7 +28,7 @@ NON_GPROF_ENTRY(linux32_sigcode) jmp *LINUX_SIGF_HANDLER(%ebx) .startsigcode: popl%eax - movl$LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ + movl$LINUX32_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ int $0x80 /* enter kernel with args */ .endsigcode: 0: jmp 0b @@ -44,7 +44,7 @@ NON_GPROF_ENTRY(linux32_rt_sigcode) push%eax jmp *LINUX_RT_SIGF_HANDLER(%edi) .startrtsigcode: - movl$LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ + movl$LINUX32_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ int $0x80 /* enter kernel with args */ .endrtsigcode: 0: jmp 0b ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290003 - head/sys/ofed/include/linux
On Thu, Oct 29, 2015 at 04:06:11PM +0100, Hans Petter Selasky wrote: H> On 10/29/15 15:36, Gleb Smirnoff wrote: H> > H> The parameters for bus_bind_intr() are not available outside the H> > H> LinuxKPI. To support such a functionality we should wrap it, for the H> > H> sake of maintainability. H> > H> H> > H> The LinuxKPI is not a binary compatibility module, and will at some H> > H> point have API's diverging from Linux, to fit BSD API's better. H> > H> > This statement makes the name of LinuxKPI quite pointless, as well H> > as the whole idea of the KPI unclear. H> > H> > Can you please explain what is the target of LinuxKPI, then? H> H> Hi, H> H> The target of the LinuxKPI is at the moment to support building device H> drivers and protocol layers which share code between *BSD and Linux. The H> target is not to kldload a kernel object file from Linux and have it H> work under FreeBSD. H> H> For example when you build a PCI network driver, the PCI enumeration can H> be shared between Linux and FreeBSD, building only OS specific network H> handling on top. In the case of r290003 support is added for binding an H> IRQ vector to a CPU, in a way that can easily be patched into an H> existing driver using the LinuxKPI. H> H> When you build a cross platform Linux/FreeBSD protocol stack, handling H> of LIST macros, bitmaps, timers, condition variables, mutexes, threads H> and so on can be shared. Like the basics of modern operating systems. H> H> This is the Linux Kernel Programming Interface, LinuxKPI, in FreeBSD. Yes, it is clear, that this isn't an ABI, but API. And the purpose is also quite clear. But above you said "will at some point have API's diverging from Linux", which doesn't make sense together with your explanation. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290135 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux compat/linuxkpi/common/include/net compat/linuxkpi/common/src conf dev/usb modules/cxgb/i
On 10/29/15 14:43, John Baldwin wrote: Humm. Did you coordinate with dumbbell@ at all? In his reviews on phabricator he had used subdirectories under linuxkpi for different versions Linux kernel versions. At the very least it seems like he should have been on the review for this since he is working in the same area doing a very similar thing? Yes, I've kept dumbbell in the loop. We agreed to move all the files to sys/linuxkpi/common for now, until we see more clearly what functions needs to be implemented differently, leaving room for future extensions like he suggested in his https://reviews.freebsd.org/D3182 . --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290003 - head/sys/ofed/include/linux
On Wed, Oct 28, 2015 at 09:08:41AM +0100, Hans Petter Selasky wrote: H> >> Log: H> >>Add support for binding IRQs to CPUs in the LinuxKPI. The new function H> >>added is for BSD only and does not exist in Linux. H> > H> > um, then who would use it and why? H> H> The parameters for bus_bind_intr() are not available outside the H> LinuxKPI. To support such a functionality we should wrap it, for the H> sake of maintainability. H> H> The LinuxKPI is not a binary compatibility module, and will at some H> point have API's diverging from Linux, to fit BSD API's better. This statement makes the name of LinuxKPI quite pointless, as well as the whole idea of the KPI unclear. Can you please explain what is the target of LinuxKPI, then? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290003 - head/sys/ofed/include/linux
On 10/29/15 15:36, Gleb Smirnoff wrote: H> The parameters for bus_bind_intr() are not available outside the H> LinuxKPI. To support such a functionality we should wrap it, for the H> sake of maintainability. H> H> The LinuxKPI is not a binary compatibility module, and will at some H> point have API's diverging from Linux, to fit BSD API's better. This statement makes the name of LinuxKPI quite pointless, as well as the whole idea of the KPI unclear. Can you please explain what is the target of LinuxKPI, then? Hi, The target of the LinuxKPI is at the moment to support building device drivers and protocol layers which share code between *BSD and Linux. The target is not to kldload a kernel object file from Linux and have it work under FreeBSD. For example when you build a PCI network driver, the PCI enumeration can be shared between Linux and FreeBSD, building only OS specific network handling on top. In the case of r290003 support is added for binding an IRQ vector to a CPU, in a way that can easily be patched into an existing driver using the LinuxKPI. When you build a cross platform Linux/FreeBSD protocol stack, handling of LIST macros, bitmaps, timers, condition variables, mutexes, threads and so on can be shared. Like the basics of modern operating systems. This is the Linux Kernel Programming Interface, LinuxKPI, in FreeBSD. If you have a better name then please speak up. --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290148 - head
Author: imp Date: Thu Oct 29 16:50:28 2015 New Revision: 290148 URL: https://svnweb.freebsd.org/changeset/base/290148 Log: PC Card and Cardbus are now in extended maintenance mode. No need to have them cluttering up MAINTAINERS. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Oct 29 16:48:12 2015(r290147) +++ head/MAINTAINERSThu Oct 29 16:50:28 2015(r290148) @@ -37,8 +37,6 @@ sys/security/auditrwatson Pre-commit re ath(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org ahc(4) gibbs Pre-commit review requested. ahd(4) gibbs Pre-commit review requested. -PC Cardimp Pre-commit review requested. -CardBusimp Pre-commit review requested. pci busimp,jhb Pre-commit review requested. cdboot jhb Pre-commit review requested. pxebootjhb Pre-commit review requested. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290155 - head/sys/kern
Author: bdrewery Date: Thu Oct 29 19:02:24 2015 New Revision: 290155 URL: https://svnweb.freebsd.org/changeset/base/290155 Log: getnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse(). This came in recently in r289279. Coverity CID: 1331561 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Thu Oct 29 18:58:18 2015(r290154) +++ head/sys/kern/vfs_bio.c Thu Oct 29 19:02:24 2015(r290155) @@ -2885,6 +2885,7 @@ getnewbuf(struct vnode *vp, int slpflag, struct buf *bp; bool metadata, reserved; + bp = NULL; KASSERT((gbflags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); if (!unmapped_buf_allowed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290157 - head/usr.bin/ar
Author: bdrewery Date: Thu Oct 29 19:28:21 2015 New Revision: 290157 URL: https://svnweb.freebsd.org/changeset/base/290157 Log: Check archive_entry_new() result. Coverity CID: 1331341 Modified: head/usr.bin/ar/write.c Modified: head/usr.bin/ar/write.c == --- head/usr.bin/ar/write.c Thu Oct 29 19:07:00 2015(r290156) +++ head/usr.bin/ar/write.c Thu Oct 29 19:28:21 2015(r290157) @@ -664,6 +664,9 @@ write_objs(struct bsdar *bsdar) if ((bsdar->s_cnt != 0 && !(bsdar->options & AR_SS)) || bsdar->options & AR_S) { entry = archive_entry_new(); + if (entry == NULL) + bsdar_errc(bsdar, EX_SOFTWARE, 0, + "archive_entry_new failed"); archive_entry_copy_pathname(entry, "/"); if ((bsdar->options & AR_D) == 0) archive_entry_set_mtime(entry, time(NULL), 0); @@ -681,6 +684,9 @@ write_objs(struct bsdar *bsdar) /* write the archive string table, if any. */ if (bsdar->as != NULL) { entry = archive_entry_new(); + if (entry == NULL) + bsdar_errc(bsdar, EX_SOFTWARE, 0, + "archive_entry_new failed"); archive_entry_copy_pathname(entry, "//"); archive_entry_set_size(entry, bsdar->as_sz); AC(archive_write_header(a, entry)); @@ -691,6 +697,9 @@ write_objs(struct bsdar *bsdar) /* write normal members. */ TAILQ_FOREACH(obj, >v_obj, objs) { entry = archive_entry_new(); + if (entry == NULL) + bsdar_errc(bsdar, EX_SOFTWARE, 0, + "archive_entry_new failed"); archive_entry_copy_pathname(entry, obj->name); archive_entry_set_uid(entry, obj->uid); archive_entry_set_gid(entry, obj->gid); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290158 - head/sys/dev/ntb/ntb_hw
Author: cem Date: Thu Oct 29 19:35:01 2015 New Revision: 290158 URL: https://svnweb.freebsd.org/changeset/base/290158 Log: ntb: Revert r290130 now that r290156 has landed Nagged by:vangyzen Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c == --- head/sys/dev/ntb/ntb_hw/ntb_hw.cThu Oct 29 19:28:21 2015 (r290157) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.cThu Oct 29 19:35:01 2015 (r290158) @@ -755,13 +755,9 @@ map_memory_window_bar(struct ntb_softc * save_bar_parameters(bar); } -#if 0 /* XXX: amd64 pmap_change_attr() assumes region lies in DMAP. */ /* Mark bar region as write combining to improve performance. */ rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, VM_MEMATTR_WRITE_COMBINING); -#else - rc = EINVAL; -#endif print_map_success(ntb, bar, "mw"); if (rc == 0) device_printf(ntb->device, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290156 - head/sys/amd64/amd64
Author: cem Date: Thu Oct 29 19:07:00 2015 New Revision: 290156 URL: https://svnweb.freebsd.org/changeset/base/290156 Log: pmap_change_attr: Only fixup DMAP for DMAPed ranges pmap_change_attr must change the memory type of both the requested KVA and the corresponding DMAP mappings (if such mappings exist), to satisfy an Intel requirement that two or more mappings to the same physical pages must have the same memory type. However, not all kernel mapped pages have corresponding DMAP mappings -- for example, 64-bit BARs. Skip fixing up the DMAP for out-of-bounds addresses. Submitted by: Steve WahlReviewed by: alc, jhb Sponsored by: Dell Compellent Differential Revision:https://reviews.freebsd.org/D4030 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Thu Oct 29 19:02:24 2015(r290155) +++ head/sys/amd64/amd64/pmap.c Thu Oct 29 19:07:00 2015(r290156) @@ -6411,7 +6411,7 @@ pmap_change_attr_locked(vm_offset_t va, */ for (tmpva = base; tmpva < base + size; ) { pdpe = pmap_pdpe(kernel_pmap, tmpva); - if (*pdpe == 0) + if (pdpe == NULL || *pdpe == 0) return (EINVAL); if (*pdpe & PG_PS) { /* @@ -6484,7 +6484,8 @@ pmap_change_attr_locked(vm_offset_t va, X86_PG_PDE_CACHE); changed = TRUE; } - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { + if (tmpva >= VM_MIN_KERNEL_ADDRESS && + (*pdpe & PG_PS_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pdpe & PG_PS_FRAME; @@ -6513,7 +6514,8 @@ pmap_change_attr_locked(vm_offset_t va, X86_PG_PDE_CACHE); changed = TRUE; } - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { + if (tmpva >= VM_MIN_KERNEL_ADDRESS && + (*pde & PG_PS_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pde & PG_PS_FRAME; @@ -6540,7 +6542,8 @@ pmap_change_attr_locked(vm_offset_t va, X86_PG_PTE_CACHE); changed = TRUE; } - if (tmpva >= VM_MIN_KERNEL_ADDRESS) { + if (tmpva >= VM_MIN_KERNEL_ADDRESS && + (*pte & PG_PS_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pte & PG_FRAME; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290154 - head/sys/net
Author: bdrewery Date: Thu Oct 29 18:58:18 2015 New Revision: 290154 URL: https://svnweb.freebsd.org/changeset/base/290154 Log: Avoid passing an uninitialized 'i'. Currently nothing was depending on it anyhow. Coverity CID: 1331562 Modified: head/sys/net/route.c Modified: head/sys/net/route.c == --- head/sys/net/route.cThu Oct 29 18:29:28 2015(r290153) +++ head/sys/net/route.cThu Oct 29 18:58:18 2015(r290154) @@ -845,7 +845,7 @@ rt_foreach_fib_walk(int af, rt_setwarg_t if (rnh == NULL) continue; if (setwa_f != NULL) - setwa_f(rnh, fibnum, i, arg); + setwa_f(rnh, fibnum, AF_UNSPEC, arg); RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, (walktree_f_t *)wa_f, arg); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290153 - head/usr.sbin/pw
Author: bdrewery Date: Thu Oct 29 18:29:28 2015 New Revision: 290153 URL: https://svnweb.freebsd.org/changeset/base/290153 Log: Fix unlikely memory leak. It is unlikely since the first check in the function is that dir[0] is '/', but later code changes may make it real. Coverity CID: 1332104 Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c == --- head/usr.sbin/pw/pw_user.c Thu Oct 29 17:51:48 2015(r290152) +++ head/usr.sbin/pw/pw_user.c Thu Oct 29 18:29:28 2015(r290153) @@ -107,8 +107,10 @@ mkdir_home_parents(int dfd, const char * errx(EX_UNAVAILABLE, "out of memory"); tmp = strrchr(dirs, '/'); - if (tmp == NULL) + if (tmp == NULL) { + free(dirs); return; + } tmp[0] = '\0'; /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290160 - head/sys/dev/isp
Author: mav Date: Thu Oct 29 20:43:13 2015 New Revision: 290160 URL: https://svnweb.freebsd.org/changeset/base/290160 Log: Remove some unneeded code. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Oct 29 20:34:01 2015(r290159) +++ head/sys/dev/isp/isp.c Thu Oct 29 20:43:13 2015(r290160) @@ -2279,10 +2279,6 @@ isp_mark_portdb(ispsoftc_t *isp, int cha fcportdb_t *lp; int i; - if (chan < 0 || chan >= isp->isp_nchan) { - isp_prt(isp, ISP_LOGWARN, "isp_mark_portdb: bad channel %d", chan); - return; - } for (i = 0; i < MAX_FC_TARG; i++) { lp = >portdb[i]; switch (lp->state) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290161 - head/sys/netpfil/pf
Author: kp Date: Thu Oct 29 20:45:53 2015 New Revision: 290161 URL: https://svnweb.freebsd.org/changeset/base/290161 Log: pf: Fix IPv6 checksums with route-to. When using route-to (or reply-to) pf sends the packet directly to the output interface. If that interface doesn't support checksum offloading the checksum has to be calculated in software. That was already done in the IPv4 case, but not for the IPv6 case. As a result we'd emit packets with pseudo-header checksums (i.e. incorrect checksums). This issue was exposed by the changes in r289316 when pf stopped performing full checksum calculations for all packets. Submitted by: Luoqi Chen MFC after:1 week Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c == --- head/sys/netpfil/pf/pf.cThu Oct 29 20:43:13 2015(r290160) +++ head/sys/netpfil/pf/pf.cThu Oct 29 20:45:53 2015(r290161) @@ -5574,6 +5574,13 @@ pf_route6(struct mbuf **m, struct pf_rul if (ifp->if_flags & IFF_LOOPBACK) m0->m_flags |= M_SKIP_FIREWALL; + if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6 & + ~ifp->if_hwassist) { + uint32_t plen = m0->m_pkthdr.len - sizeof(*ip6); + in6_delayed_cksum(m0, plen, sizeof(struct ip6_hdr)); + m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } + /* * If the packet is too large for the outgoing interface, * send back an icmp6 error. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289279 - in head/sys: kern vm
On Wed, 14 Oct 2015 02:10:07 + (UTC) Jeff Robersonwrote: > Author: jeff > Date: Wed Oct 14 02:10:07 2015 > New Revision: 289279 > URL: https://svnweb.freebsd.org/changeset/base/289279 > > Log: > Parallelize the buffer cache and rewrite getnewbuf(). This results in a > 8x performance improvement in a micro benchmark on a 4 socket machine. > >- Get buffer headers from a per-cpu uma cache that sits in from of the > free queue. >- Use a per-cpu quantum cache in vmem to eliminate contention for kva. >- Use multiple clean queues according to buffer cache size to eliminate > clean queue lock contention. >- Introduce a bufspace daemon that attempts to prevent getnewbuf() callers > from blocking or doing direct recycling. >- Close some bufspace allocation races that could lead to endless > recycling. >- Further the transition to a more modern style of small functions grouped > by prefix in order to improve growing complexity. I have an i386 system that locks up easily after this commit. Booting into single user and running make installkernel triggers it consistently. I haven't been able to reproduce it on amd64. Examining threads with DDB shows that they are all at sched_switch (a few at fork_trampoline). The only lock being held is Giant (by the interrupt handler for ctrl+alt+esc I think). So it doesn't look like a dead lock. It's more a sleeping beauty situation. All threads in the castle are sleeping and there's no prince to wake them up. (kgdb) info thread Id Target Id Frame These are from make installkernel: 72 Thread 100071 (PID=107: install) sched_switch (td=0xc667d000, newtd=0xc6407000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 71 Thread 100070 (PID=81: make) sched_switch (td=0xc667d340, newtd=0xc667d000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 70 Thread 100067 (PID=30: make) sched_switch (td=0xc667e000, newtd=0xc667d340, flags=) at /usr/src/sys/kern/sched_ule.c:1969 69 Thread 100066 (PID=25: make) sched_switch (td=0xc667e340, newtd=0xc667e000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 Single user shell: 68 Thread 100065 (PID=17: sh) sched_switch (td=0xc6406000, newtd=0xc667e340, flags=) at /usr/src/sys/kern/sched_ule.c:1969 Kernel threads: 67 Thread 100063 (PID=16: vnlru) sched_switch (td=0xc6406680, newtd=0xc6407340, flags=) at /usr/src/sys/kern/sched_ule.c:1969 66 Thread 100062 (PID=9: syncer) sched_switch (td=0xc64069c0, newtd=0xc667d000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 65 Thread 100061 (PID=8: bufspacedaemon) sched_switch (td=0xc6407000, newtd=0xc62dc000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 64 Thread 100060 (PID=7: bufdaemon) sched_switch (td=0xc6407340, newtd=0xc6408000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 63 Thread 100068 (PID=7: bufdaemon//var worker) sched_switch ( td=0xc667d9c0, newtd=0xc6407000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 62 Thread 100069 (PID=7: bufdaemon//usr worker) sched_switch ( td=0xc667d680, newtd=0xc667d000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 61 Thread 100059 (PID=6: pagezero) sched_switch (td=0xc6407680, newtd=0xc55ba680, flags=) at /usr/src/sys/kern/sched_ule.c:1969 60 Thread 100058 (PID=5: vmdaemon) sched_switch (td=0xc64079c0, newtd=0xc6407340, flags=) at /usr/src/sys/kern/sched_ule.c:1969 59 Thread 100057 (PID=4: pagedaemon) sched_switch (td=0xc6408000, newtd=0xc6407000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 58 Thread 100064 (PID=4: pagedaemon/uma) sched_switch (td=0xc6406340, newtd=0xc55b9340, flags=) at /usr/src/sys/kern/sched_ule.c:1969 57 Thread 100050 (PID=15: acpi_cooling0) sched_switch (td=0xc62dc340, newtd=0xc6407000, flags=) at /usr/src/sys/kern/sched_ule.c:1969 Anything else you need to debug this? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289279 - in head/sys: kern vm
On Thu, Oct 29, 2015 at 09:25:54PM +0100, Tijl Coosemans wrote: > On Wed, 14 Oct 2015 02:10:07 + (UTC) Jeff Roberson> wrote: > > Author: jeff > > Date: Wed Oct 14 02:10:07 2015 > > New Revision: 289279 > > URL: https://svnweb.freebsd.org/changeset/base/289279 > > > > Log: > > Parallelize the buffer cache and rewrite getnewbuf(). This results in a > > 8x performance improvement in a micro benchmark on a 4 socket machine. > > > >- Get buffer headers from a per-cpu uma cache that sits in from of the > > free queue. > >- Use a per-cpu quantum cache in vmem to eliminate contention for kva. > >- Use multiple clean queues according to buffer cache size to eliminate > > clean queue lock contention. > >- Introduce a bufspace daemon that attempts to prevent getnewbuf() > > callers > > from blocking or doing direct recycling. > >- Close some bufspace allocation races that could lead to endless > > recycling. > >- Further the transition to a more modern style of small functions > > grouped > > by prefix in order to improve growing complexity. > > I have an i386 system that locks up easily after this commit. Booting > into single user and running make installkernel triggers it consistently. > I haven't been able to reproduce it on amd64. Examining threads with > DDB shows that they are all at sched_switch (a few at fork_trampoline). > The only lock being held is Giant (by the interrupt handler for > ctrl+alt+esc I think). So it doesn't look like a dead lock. It's more > a sleeping beauty situation. All threads in the castle are sleeping and > there's no prince to wake them up. > > (kgdb) info thread > Id Target Id Frame > > These are from make installkernel: > > 72 Thread 100071 (PID=107: install) sched_switch (td=0xc667d000, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 71 Thread 100070 (PID=81: make) sched_switch (td=0xc667d340, > newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 70 Thread 100067 (PID=30: make) sched_switch (td=0xc667e000, > newtd=0xc667d340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 69 Thread 100066 (PID=25: make) sched_switch (td=0xc667e340, > newtd=0xc667e000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > > Single user shell: > > 68 Thread 100065 (PID=17: sh) sched_switch (td=0xc6406000, > newtd=0xc667e340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > > Kernel threads: > > 67 Thread 100063 (PID=16: vnlru) sched_switch (td=0xc6406680, > newtd=0xc6407340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 66 Thread 100062 (PID=9: syncer) sched_switch (td=0xc64069c0, > newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 65 Thread 100061 (PID=8: bufspacedaemon) sched_switch (td=0xc6407000, > newtd=0xc62dc000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 64 Thread 100060 (PID=7: bufdaemon) sched_switch (td=0xc6407340, > newtd=0xc6408000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 63 Thread 100068 (PID=7: bufdaemon//var worker) sched_switch ( > td=0xc667d9c0, newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 62 Thread 100069 (PID=7: bufdaemon//usr worker) sched_switch ( > td=0xc667d680, newtd=0xc667d000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 61 Thread 100059 (PID=6: pagezero) sched_switch (td=0xc6407680, > newtd=0xc55ba680, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 60 Thread 100058 (PID=5: vmdaemon) sched_switch (td=0xc64079c0, > newtd=0xc6407340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 59 Thread 100057 (PID=4: pagedaemon) sched_switch (td=0xc6408000, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 58 Thread 100064 (PID=4: pagedaemon/uma) sched_switch (td=0xc6406340, > newtd=0xc55b9340, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > 57 Thread 100050 (PID=15: acpi_cooling0) sched_switch (td=0xc62dc340, > newtd=0xc6407000, flags=) > at /usr/src/sys/kern/sched_ule.c:1969 > > > Anything else you need to debug this? Start with gathering the information listed in https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-deadlocks.html ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290135 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux compat/linuxkpi/common/include/net compat/linuxkpi/common/src conf dev/usb modules/cxgb/i
On 29.10.2015 14:43, John Baldwin wrote: > On Thursday, October 29, 2015 08:28:39 AM Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Oct 29 08:28:39 2015 >> New Revision: 290135 >> URL: https://svnweb.freebsd.org/changeset/base/290135 >> >> Log: >> Finish process of moving the LinuxKPI module into the default kernel build. >> >> - Move all files related to the LinuxKPI into sys/compat/linuxkpi and >> its subfolders. >> - Update sys/conf/files and some Makefiles to use new file locations. >> - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn >> adds the LinuxKPI to all LINT builds. >> - The LinuxKPI can be added to the kernel by setting the >> COMPAT_LINUXKPI option. The OFED kernel option no longer builds the >> LinuxKPI into the kernel. This was done to keep the build rules for >> the LinuxKPI in sys/conf/files simple. >> - Extend the LinuxKPI module to include support for USB by moving the >> Linux USB compat from usb.ko to linuxkpi.ko. >> - Bump the FreeBSD_version. >> - A universe kernel build has been done. >> >> Reviewed by: np @ (cxgb and cxgbe related changes only) >> Sponsored by: Mellanox Technologies > > Humm. Did you coordinate with dumbbell@ at all? In his reviews on > phabricator > he had used subdirectories under linuxkpi for different versions Linux kernel > versions. At the very least it seems like he should have been on the review > for this since he is working in the same area doing a very similar thing? Hi! Hans kept me in the loop. He did the work because Mellanox was interested in this change and I have no time currently to work on this topic. My patch which allows to have multiple versions in parallel can be recreated in the future. We decided to put everything in "common" for now because we have no idea what version of Linux was used to create this layer. And it probably does not track a specific version at all. The layout is made so we can add version-specific implementations on top of the common directory. -- Jean-Sébastien Pédron signature.asc Description: OpenPGP digital signature
svn commit: r290163 - head/etc/rc.d
Author: dteske Date: Thu Oct 29 21:12:57 2015 New Revision: 290163 URL: https://svnweb.freebsd.org/changeset/base/290163 Log: Ignore per-mdN settings in mdconfig[2] startup PR: base/189696 Submitted by: ganael.laplan...@martymac.org MFC after:3 days X-MFC-to: stable/10 stable/9 Modified: head/etc/rc.d/mdconfig head/etc/rc.d/mdconfig2 Modified: head/etc/rc.d/mdconfig == --- head/etc/rc.d/mdconfig Thu Oct 29 21:00:11 2015(r290162) +++ head/etc/rc.d/mdconfig Thu Oct 29 21:12:57 2015(r290163) @@ -186,6 +186,8 @@ if [ -z "${_mdconfig_list}" ]; then sort_lite -nk1.12` do _mdconfig_unit=${_mdconfig_config#mdconfig_md} + [ "${_mdconfig_unit#*[!0-9]}" = "$_mdconfig_unit" ] || + continue _mdconfig_list="$_mdconfig_list md$_mdconfig_unit" done _mdconfig_list="${_mdconfig_list# }" Modified: head/etc/rc.d/mdconfig2 == --- head/etc/rc.d/mdconfig2 Thu Oct 29 21:00:11 2015(r290162) +++ head/etc/rc.d/mdconfig2 Thu Oct 29 21:12:57 2015(r290163) @@ -216,6 +216,8 @@ if [ -z "${_mdconfig2_list}" ]; then sort_lite -nk1.12` do _mdconfig2_unit=${_mdconfig2_config#mdconfig_md} + [ "${_mdconfig2_unit#*[!0-9]}" = "$_mdconfig2_unit" ] || + continue _mdconfig2_list="$_mdconfig2_list md$_mdconfig2_unit" done _mdconfig2_list="${_mdconfig2_list# }" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289279 - in head/sys: kern vm
On 10/29/2015 1:31 PM, Eric van Gyzen wrote: > On 10/29/2015 15:25, Tijl Coosemans wrote: >> On Wed, 14 Oct 2015 02:10:07 + (UTC) Jeff Roberson>> wrote: >>> Author: jeff >>> Date: Wed Oct 14 02:10:07 2015 >>> New Revision: 289279 >>> URL: https://svnweb.freebsd.org/changeset/base/289279 >>> >>> Log: >>> Parallelize the buffer cache and rewrite getnewbuf(). This results in a >>> 8x performance improvement in a micro benchmark on a 4 socket machine. >>> >>>- Get buffer headers from a per-cpu uma cache that sits in from of the >>> free queue. >>>- Use a per-cpu quantum cache in vmem to eliminate contention for kva. >>>- Use multiple clean queues according to buffer cache size to eliminate >>> clean queue lock contention. >>>- Introduce a bufspace daemon that attempts to prevent getnewbuf() >>> callers >>> from blocking or doing direct recycling. >>>- Close some bufspace allocation races that could lead to endless >>> recycling. >>>- Further the transition to a more modern style of small functions >>> grouped >>> by prefix in order to improve growing complexity. >> >> I have an i386 system that locks up easily after this commit. Booting >> into single user and running make installkernel triggers it consistently. > > I can't help you debug this, but I noticed a follow-up commit that fixed > an uninitialized pointer introduced by this commit: > > https://svnweb.freebsd.org/changeset/base/290155 > > Pending comments from more enlightened folk, you might try updating to > that rev (if you can do so without a lockup...). I didn't analyze it enough to know if my change was fixing an actual bug and in what case. I think if so it is more likely to have random panics then a consistent lock up though. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r289279 - in head/sys: kern vm
On 10/29/2015 15:25, Tijl Coosemans wrote: > On Wed, 14 Oct 2015 02:10:07 + (UTC) Jeff Roberson> wrote: >> Author: jeff >> Date: Wed Oct 14 02:10:07 2015 >> New Revision: 289279 >> URL: https://svnweb.freebsd.org/changeset/base/289279 >> >> Log: >> Parallelize the buffer cache and rewrite getnewbuf(). This results in a >> 8x performance improvement in a micro benchmark on a 4 socket machine. >> >>- Get buffer headers from a per-cpu uma cache that sits in from of the >> free queue. >>- Use a per-cpu quantum cache in vmem to eliminate contention for kva. >>- Use multiple clean queues according to buffer cache size to eliminate >> clean queue lock contention. >>- Introduce a bufspace daemon that attempts to prevent getnewbuf() callers >> from blocking or doing direct recycling. >>- Close some bufspace allocation races that could lead to endless >> recycling. >>- Further the transition to a more modern style of small functions grouped >> by prefix in order to improve growing complexity. > > I have an i386 system that locks up easily after this commit. Booting > into single user and running make installkernel triggers it consistently. I can't help you debug this, but I noticed a follow-up commit that fixed an uninitialized pointer introduced by this commit: https://svnweb.freebsd.org/changeset/base/290155 Pending comments from more enlightened folk, you might try updating to that rev (if you can do so without a lockup...). Eric ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290159 - head/sys/dev/isp
Author: mav Date: Thu Oct 29 20:34:01 2015 New Revision: 290159 URL: https://svnweb.freebsd.org/changeset/base/290159 Log: Remove reset delays for which I see neither explanation nor need. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Oct 29 19:35:01 2015(r290158) +++ head/sys/dev/isp/isp.c Thu Oct 29 20:34:01 2015(r290159) @@ -1011,33 +1011,15 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } - /* -* Give it a chance to finish starting up. -* Give the 24XX more time. -*/ - if (IS_24XX(isp)) { - ISP_DELAY(50); + if (IS_SCSI(isp)) { /* -* Check to see if the 24XX firmware really started. +* Set CLOCK RATE, but only if asked to. */ - if (mbs.param[1] == 0xdead) { - isp_prt(isp, ISP_LOGERR, "f/w didn't *really* start"); - ISP_RESET0(isp); - return; - } - } else { - ISP_DELAY(25); - if (IS_SCSI(isp)) { - /* -* Set CLOCK RATE, but only if asked to. -*/ - if (isp->isp_clock) { - mbs.param[0] = MBOX_SET_CLOCK_RATE; - mbs.param[1] = isp->isp_clock; - mbs.logval = MBLOGNONE; - isp_mboxcmd(isp, ); - /* we will try not to care if this fails */ - } + if (isp->isp_clock) { + MBSINIT(, MBOX_SET_CLOCK_RATE, MBLOGALL, 0); + mbs.param[1] = isp->isp_clock; + isp_mboxcmd(isp, ); + /* we will try not to care if this fails */ } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290164 - in head/sys/i386: i386 include
Author: jhb Date: Thu Oct 29 21:25:46 2015 New Revision: 290164 URL: https://svnweb.freebsd.org/changeset/base/290164 Log: Use movw instead of movl (or plain mov) when moving segment registers into memory. This is a nop on clang's assembler, but some assemblers complain if the size suffix is incorrect. Submitted by: bde Modified: head/sys/i386/i386/exception.s head/sys/i386/include/asmacros.h Modified: head/sys/i386/i386/exception.s == --- head/sys/i386/i386/exception.s Thu Oct 29 21:12:57 2015 (r290163) +++ head/sys/i386/i386/exception.s Thu Oct 29 21:25:46 2015 (r290164) @@ -158,11 +158,11 @@ IDTVEC(xmm) alltraps: pushal pushl $0 - movl%ds,(%esp) + movw%ds,(%esp) pushl $0 - movl%es,(%esp) + movw%es,(%esp) pushl $0 - movl%fs,(%esp) + movw%fs,(%esp) alltraps_with_regs_pushed: SET_KERNEL_SREGS cld @@ -237,11 +237,11 @@ IDTVEC(lcall_syscall) subl$4,%esp /* skip over tf_trapno */ pushal pushl $0 - movl%ds,(%esp) + movw%ds,(%esp) pushl $0 - movl%es,(%esp) + movw%es,(%esp) pushl $0 - movl%fs,(%esp) + movw%fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -266,11 +266,11 @@ IDTVEC(int0x80_syscall) subl$4,%esp /* skip over tf_trapno */ pushal pushl $0 - movl%ds,(%esp) + movw%ds,(%esp) pushl $0 - movl%es,(%esp) + movw%es,(%esp) pushl $0 - movl%fs,(%esp) + movw%fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -426,15 +426,15 @@ doreti_iret_fault: subl$8,%esp pushal pushl $0 - movl%ds,(%esp) + movw%ds,(%esp) .globl doreti_popl_ds_fault doreti_popl_ds_fault: pushl $0 - movl%es,(%esp) + movw%es,(%esp) .globl doreti_popl_es_fault doreti_popl_es_fault: pushl $0 - movl%fs,(%esp) + movw%fs,(%esp) .globl doreti_popl_fs_fault doreti_popl_fs_fault: sti Modified: head/sys/i386/include/asmacros.h == --- head/sys/i386/include/asmacros.hThu Oct 29 21:12:57 2015 (r290163) +++ head/sys/i386/include/asmacros.hThu Oct 29 21:25:46 2015 (r290164) @@ -147,11 +147,11 @@ pushl $0 ;/* dummy trap type */ \ pushal ;/* 8 ints */\ pushl $0 ;/* save data and extra segments ... */ \ - mov %ds,(%esp) ;\ + movw%ds,(%esp) ;\ pushl $0 ;\ - mov %es,(%esp) ;\ + movw%es,(%esp) ;\ pushl $0 ;\ - mov %fs,(%esp) + movw%fs,(%esp) #definePOP_FRAME \ popl%fs ; \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290165 - head/sys/netinet
Author: gnn Date: Thu Oct 29 21:26:32 2015 New Revision: 290165 URL: https://svnweb.freebsd.org/changeset/base/290165 Log: Set the proper direction to check for policies in this one case. Pointed out by: eri Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/netinet/ip_ipsec.c Modified: head/sys/netinet/ip_ipsec.c == --- head/sys/netinet/ip_ipsec.c Thu Oct 29 21:25:46 2015(r290164) +++ head/sys/netinet/ip_ipsec.c Thu Oct 29 21:26:32 2015(r290165) @@ -159,7 +159,7 @@ ip_ipsec_output(struct mbuf **m, struct { struct secpolicy *sp; - if (!key_havesp(IPSEC_DIR_INBOUND)) + if (!key_havesp(IPSEC_DIR_OUTBOUND)) return 0; /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290162 - head/share/misc
Author: jtl Date: Thu Oct 29 21:00:11 2015 New Revision: 290162 URL: https://svnweb.freebsd.org/changeset/base/290162 Log: Add myself (jtl) and my mentor to the committers-src.dot file. Approved by: gnn (mentor) Differential Revision:https://reviews.freebsd.org/D4029 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Thu Oct 29 20:45:53 2015 (r290161) +++ head/share/misc/committers-src.dot Thu Oct 29 21:00:11 2015 (r290162) @@ -206,6 +206,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS jon [label="Jonathan Chen\n...@freebsd.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonat...@freebsd.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaet...@freebsd.org\n2011/01/21"] +jtl [label="Jonathan T. Looney\n...@freebsd.org\n2015/10/26"] julian [label="Julian Elischer\njul...@freebsd.org\n1993/04/19"] jwd [label="John De Boskey\n...@freebsd.org\n2000/05/19"] kaiw [label="Kai Wang\nk...@freebsd.org\n2007/09/26"] @@ -460,6 +461,7 @@ gnn -> davide gnn -> arybchik gnn -> erj gnn -> kp +gnn -> jtl grehan -> bryanv ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290166 - head/share/misc
Author: skra Date: Thu Oct 29 21:40:32 2015 New Revision: 290166 URL: https://svnweb.freebsd.org/changeset/base/290166 Log: Install myself as src committer. Approved by: kib (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Thu Oct 29 21:26:32 2015 (r290165) +++ head/share/misc/committers-src.dot Thu Oct 29 21:40:32 2015 (r290166) @@ -286,6 +286,7 @@ sephe [label="Sepherosa Ziehau\nsephe@Fr sepotvin [label="Stephane E. Potvin\nsepot...@freebsd.org\n2007/02/15"] simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2006/03/07"] sjg [label="Simon J. Gerraty\n...@freebsd.org\n2012/10/23"] +skra [label="Svatopluk Kraus\n...@freebsd.org\n2015/10/28"] slm [label="Stephen McConnell\n...@freebsd.org\n2014/05/07"] smh [label="Steven Hartland\n...@freebsd.org\n2012/11/12"] sobomax [label="Maxim Sobolev\nsobo...@freebsd.org\n2001/07/25"] @@ -576,6 +577,7 @@ kib -> pluknet kib -> rdivacky kib -> rmacklem kib -> rmh +kib -> skra kib -> stas kib -> tijl kib -> trociny ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290169 - head/lib/libc/iconv
Author: bdrewery Date: Thu Oct 29 23:06:33 2015 New Revision: 290169 URL: https://svnweb.freebsd.org/changeset/base/290169 Log: Use memmove(3) to avoid overlapping copy. Reported by: valgrind MFC after:2 weeks X-MFC-With: r290168 Modified: head/lib/libc/iconv/citrus_esdb.c Modified: head/lib/libc/iconv/citrus_esdb.c == --- head/lib/libc/iconv/citrus_esdb.c Thu Oct 29 23:02:34 2015 (r290168) +++ head/lib/libc/iconv/citrus_esdb.c Thu Oct 29 23:06:33 2015 (r290169) @@ -328,7 +328,7 @@ _citrus_esdb_get_list(char ***rlist, siz (int)_region_size(), (const char *)_region_head()); if ((p = strchr(buf1, '/')) != NULL) - memcpy(buf1, p + 1, strlen(p) - 1); + memmove(buf1, p + 1, strlen(p) - 1); if ((p = strstr(buf1, ".esdb")) != NULL) *p = '\0'; snprintf(buf, sizeof(buf), "%s/%.*s", buf1, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r289834 - head/sys/x86/x86
Yes, at next week I have time for the test. Please ping me again at Monday. On Thursday, October 29, 2015, Roger Pau Monnéwrote: > El 26/10/15 a les 15.24, Oliver Pinter ha escrit: > > On 10/26/15, Adrian Chadd > wrote: > >> Hi, > >> > >> I'll take a photo of it when it breaks next. > >> > >> Would you mind reverting it for now until we can figure it out? > > > > btw, this was the two kernel panic what I got: > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 11; apic id = 03 > > fault virtual address = 0x30 > > fault code = supervisor read data, page not present > > instruction pointer = 0x20:0x808a2d22 > > stack pointer = 0x28:0xfe07cc75a6f0 > > frame pointer = 0x28:0xfe07cc75a770 > > code segment= base 0x0, limit 0xf, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags= interrupt enabled, resume, IOPL = 0 > > current process = 5 (doneq0) > > trap number = 12 > > panic: page fault > > cpuid = 11 > > KDB: stack backtrace: > > #0 0x80641647 at kdb_backtrace+0x67 > > #1 0x80606762 at vpanic+0x182 > > #2 0x806067e3 at panic+0x43 > > #3 0x8084eef1 at trap_fatal+0x351 > > #4 0x8084f0e4 at trap_pfault+0x1e4 > > #5 0x8084e82f at trap+0x4bf > > #6 0x80830d57 at calltrap+0x8 > > #7 0x8063beab at _bus_dmamap_load_ccb+0x1fb > > #8 0x8063bc51 at bus_dmamap_load_ccb+0x91 > > #9 0x8042dcad at ata_dmaload+0x11d > > #10 0x8042df7e at ata_begin_transaction+0x7e > > #11 0x8042c18e at ataaction+0x9ce > > #12 0x802a220f at xpt_run_devq+0x5bf > > #13 0x802a17ad at xpt_action_default+0x94d > > #14 0x802c0024 at adastart+0x8b4 > > #15 0x802a2e93 at xpt_run_allocq+0x193 > > #16 0x802c0ea0 at adadone+0x280 > > #17 0x802a5310 at xpt_done_process+0x3a0 > > Uptime: 1m40s > > Hello, > > I've been able to reproduce this by tweaking blkfront dma tag, and the > issue was due to an off-by-one error. I've got an updated patch that > applies on top of current HEAD, would any of you two mind giving it a try? > > https://people.freebsd.org/~royger/bounce_load_ma.patch > > Thanks, Roger. > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290168 - head/lib/libc/iconv
Author: bdrewery Date: Thu Oct 29 23:02:34 2015 New Revision: 290168 URL: https://svnweb.freebsd.org/changeset/base/290168 Log: Fix several memory leaks, and crashes, in iconvlist(3). - Both curitem and curitem (via the names list) was always leaked. - malloc(3) failures lead to some leaks. - __bsd___iconv_get_list() failure lead to a crash since its error was not handles and __bsd___iconv_free_list() is not NULL-safe. I have slightly refactored this to avoid extra malloc and free logic in cases of malloc(3) failing. There are still bad assumptions here that I did not deal with. One of which is that the data will always have a '/' so the strchr(3) will not return NULL. Coverity CID: 1130055 1130054 1130053 Modified: head/lib/libc/iconv/bsd_iconv.c Modified: head/lib/libc/iconv/bsd_iconv.c == --- head/lib/libc/iconv/bsd_iconv.c Thu Oct 29 22:12:03 2015 (r290167) +++ head/lib/libc/iconv/bsd_iconv.c Thu Oct 29 23:02:34 2015 (r290168) @@ -207,43 +207,51 @@ __bsd_iconvlist(int (*do_one) (unsigned const char * const *np; char *curitem, *curkey, *slashpos; size_t sz; - unsigned int i, j; + unsigned int i, j, n; i = 0; + names = NULL; - if (__bsd___iconv_get_list(, , true)) + if (__bsd___iconv_get_list(, , true)) { list = NULL; + goto out; + } qsort((void *)list, sz, sizeof(char *), qsort_helper); while (i < sz) { j = 0; slashpos = strchr(list[i], '/'); - curkey = (char *)malloc(slashpos - list[i] + 2); - names = (char **)malloc(sz * sizeof(char *)); - if ((curkey == NULL) || (names == NULL)) { - __bsd___iconv_free_list(list, sz); - return; - } - strlcpy(curkey, list[i], slashpos - list[i] + 1); + names = malloc(sz * sizeof(char *)); + if (names == NULL) + goto out; + curkey = strndup(list[i], slashpos - list[i]); + if (curkey == NULL) + goto out; names[j++] = curkey; for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { slashpos = strchr(list[i], '/'); - curitem = (char *)malloc(strlen(slashpos) + 1); - if (curitem == NULL) { - __bsd___iconv_free_list(list, sz); - return; - } - strlcpy(curitem, [1], strlen(slashpos) + 1); - if (strcmp(curkey, curitem) == 0) { + if (strcmp(curkey, [1]) == 0) continue; - } + curitem = strdup([1]); + if (curitem == NULL) + goto out; names[j++] = curitem; } np = (const char * const *)names; do_one(j, np, data); + for (n = 0; n < j; n++) + free(names[n]); free(names); + names = NULL; } - __bsd___iconv_free_list(list, sz); +out: + if (names != NULL) { + for (n = 0; n < j; n++) + free(names[n]); + free(names); + } + if (list != NULL) + __bsd___iconv_free_list(list, sz); } __inline const char * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290147 - head/sys/dev/isp
Author: mav Date: Thu Oct 29 16:48:12 2015 New Revision: 290147 URL: https://svnweb.freebsd.org/changeset/base/290147 Log: Fix and improve error masking and reporting. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispreg.h Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Oct 29 16:45:06 2015(r290146) +++ head/sys/dev/isp/isp.c Thu Oct 29 16:48:12 2015(r290147) @@ -2562,7 +2562,8 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui isp_pdb_24xx_t bill; } un; - MBSINIT(, MBOX_GET_PORT_DB, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 25); + MBSINIT(, MBOX_GET_PORT_DB, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 25); if (IS_24XX(isp)) { mbs.ibits = (1 << 9)|(1 << 10); mbs.param[1] = id; @@ -2632,7 +2633,7 @@ isp_gethandles(ispsoftc_t *isp, int chan uint32_t p; uint16_t h; - MBSINIT(, MBOX_GET_ID_LIST, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 25); + MBSINIT(, MBOX_GET_ID_LIST, MBLOGALL, 25); if (IS_24XX(isp)) { mbs.param[2] = DMA_WD1(fcp->isp_scdma); mbs.param[3] = DMA_WD0(fcp->isp_scdma); @@ -2726,7 +2727,8 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i fcp->isp_loopstate < LOOP_PDB_RCVD) { return (wwn); } - MBSINIT(, MBOX_GET_PORT_NAME, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 50); + MBSINIT(, MBOX_GET_PORT_NAME, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 50); if (ISP_CAP_2KLOGIN(isp)) { mbs.param[1] = loopid; if (nodename) { @@ -4920,7 +4922,8 @@ isp_control(ispsoftc_t *isp, ispctl_t ct } else { mbs.param[1] = (chan << 15) | (tgt << 8) | XS_LUN(xs); } - MBSINIT(, MBOX_ABORT, MBLOGALL & ~MBOX_COMMAND_ERROR, 0); + MBSINIT(, MBOX_ABORT, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_ERROR), 0); mbs.param[2] = handle; isp_mboxcmd(isp, ); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -7431,7 +7434,7 @@ isp_mboxcmd_qnw(ispsoftc_t *isp, mbreg_t static void isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mbp) { - const char *cname, *xname; + const char *cname, *xname, *sname; char tname[16], mname[16]; unsigned int ibits, obits, box, opcode; @@ -7541,57 +7544,58 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb isp->isp_mboxbsy = 0; MBOX_RELEASE(isp); - out: - if (mbp->logval == 0 || opcode == MBOX_EXEC_FIRMWARE) { +out: + if (mbp->logval == 0 || mbp->param[0] == MBOX_COMMAND_COMPLETE) + return; + + if ((mbp->param[0] & 0xbfe0) == 0 && + (mbp->logval & MBLOGMASK(mbp->param[0])) == 0) return; - } - /* -* Just to be chatty here... -*/ xname = NULL; + sname = ""; switch (mbp->param[0]) { - case MBOX_COMMAND_COMPLETE: - break; case MBOX_INVALID_COMMAND: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_COMPLETE)) { - xname = "INVALID COMMAND"; - } + xname = "INVALID COMMAND"; break; case MBOX_HOST_INTERFACE_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_HOST_INTERFACE_ERROR)) { - xname = "HOST INTERFACE ERROR"; - } + xname = "HOST INTERFACE ERROR"; break; case MBOX_TEST_FAILED: - if (mbp->logval & MBLOGMASK(MBOX_TEST_FAILED)) { - xname = "TEST FAILED"; - } + xname = "TEST FAILED"; break; case MBOX_COMMAND_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_ERROR)) { - xname = "COMMAND ERROR"; - } + xname = "COMMAND ERROR"; + ISP_SNPRINTF(mname, sizeof(mname), " subcode 0x%x", + mbp->param[1]); + sname = mname; break; case MBOX_COMMAND_PARAM_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_PARAM_ERROR)) { - xname = "COMMAND PARAMETER ERROR"; - } - break; - case MBOX_LOOP_ID_USED: - if (mbp->logval & MBLOGMASK(MBOX_LOOP_ID_USED)) { - xname = "LOOP ID ALREADY IN USE"; - } + xname = "COMMAND PARAMETER ERROR"; break; case MBOX_PORT_ID_USED: - if (mbp->logval & MBLOGMASK(MBOX_PORT_ID_USED)) { - xname = "PORT ID ALREADY IN USE"; - } + xname = "PORT ID ALREADY IN USE"; + break; +
svn commit: r290171 - head/sys/arm/broadcom/bcm2835
Author: gonzo Date: Fri Oct 30 00:24:37 2015 New Revision: 290171 URL: https://svnweb.freebsd.org/changeset/base/290171 Log: Fix framebuffer compatibility with new RPi firmware. Framebuffer driver receives video memory address from VideoCore through property mailbox channel. Older versions of firmware (and the one that is currently part of sysutils/u-boot-rpi and sysutils/u-boot-rpi2) returned real physical address, newer one returns VideoCore bus address, so we need to convert it to actual physical address. this version works with both older and newer interface. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.cThu Oct 29 23:56:34 2015(r290170) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.cFri Oct 30 00:24:37 2015(r290171) @@ -577,7 +577,7 @@ bcm2835_mbox_fb_init(device_t dev, struc fb->xoffset = msg->offset.body.resp.x; fb->yoffset = msg->offset.body.resp.y; fb->pitch = msg->pitch.body.resp.pitch; - fb->base = msg->buffer.body.resp.fb_address; + fb->base = VCBUS_TO_PHYS(msg->buffer.body.resp.fb_address); fb->size = msg->buffer.body.resp.fb_size; } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h == --- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Thu Oct 29 23:56:34 2015(r290170) +++ head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Fri Oct 30 00:24:37 2015(r290171) @@ -67,6 +67,6 @@ * when address is returned by VC over mailbox interface. e.g. * framebuffer base */ -#defineVCBUS_TO_PHYS(vca) ((vca) - BCM2835_VCBUS_SDRAM_BASE) +#defineVCBUS_TO_PHYS(vca) ((vca) & ~(BCM2835_VCBUS_SDRAM_BASE)) #endif /* _BCM2835_VCBUS_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290173 - head/usr.sbin/rtadvd
Author: delphij Date: Fri Oct 30 00:33:03 2015 New Revision: 290173 URL: https://svnweb.freebsd.org/changeset/base/290173 Log: Use strlcpy(). MFC after:2 weeks Modified: head/usr.sbin/rtadvd/if.c Modified: head/usr.sbin/rtadvd/if.c == --- head/usr.sbin/rtadvd/if.c Fri Oct 30 00:30:00 2015(r290172) +++ head/usr.sbin/rtadvd/if.c Fri Oct 30 00:33:03 2015(r290173) @@ -358,8 +358,7 @@ update_persist_ifinfo(struct ifilist_hea ELM_MALLOC(ifi, exit(1)); ifi->ifi_ifindex = 0; - strncpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)-1); - ifi->ifi_ifname[sizeof(ifi->ifi_ifname)-1] = '\0'; + strlcpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)); ifi->ifi_rainfo = NULL; ifi->ifi_state = IFI_STATE_UNCONFIGURED; TAILQ_INSERT_TAIL(ifi_head, ifi, ifi_next); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290174 - head/usr.sbin/pw
Author: delphij Date: Fri Oct 30 00:46:52 2015 New Revision: 290174 URL: https://svnweb.freebsd.org/changeset/base/290174 Log: In pw_userlock, set 'name' to NULL when we encounter an all number string because it is also used as an indicator of whether a name or an UID is being used and we may have undefined results as 'name' may contain uninitialized stack contents. MFC after:2 weeks Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c == --- head/usr.sbin/pw/pw_user.c Fri Oct 30 00:33:03 2015(r290173) +++ head/usr.sbin/pw/pw_user.c Fri Oct 30 00:46:52 2015(r290174) @@ -282,9 +282,10 @@ pw_userlock(char *arg1, int mode) if (arg1 == NULL) errx(EX_DATAERR, "username or id required"); - if (arg1[strspn(arg1, "0123456789")] == '\0') + if (arg1[strspn(arg1, "0123456789")] == '\0') { id = pw_checkid(arg1, UID_MAX); - else + name = NULL; + } else name = arg1; pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290130 - head/sys/dev/ntb/ntb_hw
On Thu, 29 Oct 2015 09:53:43 +0200 Konstantin Belousovwrote: > On Thu, Oct 29, 2015 at 04:16:28AM +, Conrad E. Meyer > wrote: > > Author: cem > > Date: Thu Oct 29 04:16:28 2015 > > New Revision: 290130 > > URL: https://svnweb.freebsd.org/changeset/base/290130 > > > > Log: > > ntb: Do not attempt to set write-combining on MWs > > > > AMD64 pmap assumes ranges will be in the DMAP, which > > isn't necessarily true for NTB memory windows (especially > > 64-bit BARs). > I am not sure what do you mean. pmap_change_attr() handles > either DMAP or kernel mapped memory. What JHB said -- the blind attempts to fixup DMAP memory types fixed in r290156. Best, Conrad ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290170 - head/sys/dev/filemon
Author: bdrewery Date: Thu Oct 29 23:56:34 2015 New Revision: 290170 URL: https://svnweb.freebsd.org/changeset/base/290170 Log: Remove unneeded NULL as this is initialized with M_ZERO. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c == --- head/sys/dev/filemon/filemon.c Thu Oct 29 23:06:33 2015 (r290169) +++ head/sys/dev/filemon/filemon.c Thu Oct 29 23:56:34 2015 (r290170) @@ -195,9 +195,6 @@ filemon_open(struct cdev *dev, int oflag if (filemon == NULL) { filemon = malloc(sizeof(struct filemon), M_FILEMON, M_WAITOK | M_ZERO); - - filemon->fp = NULL; - sx_init(>lock, "filemon"); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r290130 - head/sys/dev/ntb/ntb_hw
On Thu, Oct 29, 2015 at 04:16:28AM +, Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 29 04:16:28 2015 > New Revision: 290130 > URL: https://svnweb.freebsd.org/changeset/base/290130 > > Log: > ntb: Do not attempt to set write-combining on MWs > > AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily > true for NTB memory windows (especially 64-bit BARs). I am not sure what do you mean. pmap_change_attr() handles either DMAP or kernel mapped memory. > > Suggested by: pmap_change_attr_locked -> kassert_panic > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/dev/ntb/ntb_hw/ntb_hw.c > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c > == > --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 29 04:16:16 2015 > (r290129) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 29 04:16:28 2015 > (r290130) > @@ -755,9 +755,13 @@ map_memory_window_bar(struct ntb_softc * > save_bar_parameters(bar); > } > > +#if 0/* XXX: amd64 pmap_change_attr() assumes region lies in DMAP. */ > /* Mark bar region as write combining to improve performance. */ > rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, > VM_MEMATTR_WRITE_COMBINING); > +#else > + rc = EINVAL; > +#endif > print_map_success(ntb, bar, "mw"); > if (rc == 0) > device_printf(ntb->device, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290135 - in head/sys: compat/linuxkpi/common/include/asm compat/linuxkpi/common/include/linux compat/linuxkpi/common/include/net compat/linuxkpi/common/src conf dev/usb modules/cxgb/iw...
Author: hselasky Date: Thu Oct 29 08:28:39 2015 New Revision: 290135 URL: https://svnweb.freebsd.org/changeset/base/290135 Log: Finish process of moving the LinuxKPI module into the default kernel build. - Move all files related to the LinuxKPI into sys/compat/linuxkpi and its subfolders. - Update sys/conf/files and some Makefiles to use new file locations. - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn adds the LinuxKPI to all LINT builds. - The LinuxKPI can be added to the kernel by setting the COMPAT_LINUXKPI option. The OFED kernel option no longer builds the LinuxKPI into the kernel. This was done to keep the build rules for the LinuxKPI in sys/conf/files simple. - Extend the LinuxKPI module to include support for USB by moving the Linux USB compat from usb.ko to linuxkpi.ko. - Bump the FreeBSD_version. - A universe kernel build has been done. Reviewed by: np @ (cxgb and cxgbe related changes only) Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h - copied unchanged from r290045, head/sys/ofed/include/asm/atomic-long.h head/sys/compat/linuxkpi/common/include/asm/atomic.h - copied unchanged from r290042, head/sys/ofed/include/asm/atomic.h head/sys/compat/linuxkpi/common/include/asm/byteorder.h - copied unchanged from r290042, head/sys/ofed/include/asm/byteorder.h head/sys/compat/linuxkpi/common/include/asm/fcntl.h - copied unchanged from r290042, head/sys/ofed/include/asm/fcntl.h head/sys/compat/linuxkpi/common/include/asm/io.h - copied unchanged from r290042, head/sys/ofed/include/asm/io.h head/sys/compat/linuxkpi/common/include/asm/pgtable.h - copied unchanged from r290042, head/sys/ofed/include/asm/pgtable.h head/sys/compat/linuxkpi/common/include/asm/types.h - copied unchanged from r290042, head/sys/ofed/include/asm/types.h head/sys/compat/linuxkpi/common/include/asm/uaccess.h - copied unchanged from r290042, head/sys/ofed/include/asm/uaccess.h head/sys/compat/linuxkpi/common/include/linux/bitops.h - copied unchanged from r290042, head/sys/ofed/include/linux/bitops.h head/sys/compat/linuxkpi/common/include/linux/cache.h - copied unchanged from r290042, head/sys/ofed/include/linux/cache.h head/sys/compat/linuxkpi/common/include/linux/cdev.h - copied unchanged from r290042, head/sys/ofed/include/linux/cdev.h head/sys/compat/linuxkpi/common/include/linux/clocksource.h - copied unchanged from r290042, head/sys/ofed/include/linux/clocksource.h head/sys/compat/linuxkpi/common/include/linux/compat.h - copied unchanged from r290042, head/sys/ofed/include/linux/compat.h head/sys/compat/linuxkpi/common/include/linux/compiler.h - copied unchanged from r290042, head/sys/ofed/include/linux/compiler.h head/sys/compat/linuxkpi/common/include/linux/completion.h - copied unchanged from r290042, head/sys/ofed/include/linux/completion.h head/sys/compat/linuxkpi/common/include/linux/delay.h - copied unchanged from r290042, head/sys/ofed/include/linux/delay.h head/sys/compat/linuxkpi/common/include/linux/device.h - copied unchanged from r290042, head/sys/ofed/include/linux/device.h head/sys/compat/linuxkpi/common/include/linux/dma-attrs.h - copied unchanged from r290042, head/sys/ofed/include/linux/dma-attrs.h head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h - copied unchanged from r290042, head/sys/ofed/include/linux/dma-mapping.h head/sys/compat/linuxkpi/common/include/linux/dmapool.h - copied unchanged from r290042, head/sys/ofed/include/linux/dmapool.h head/sys/compat/linuxkpi/common/include/linux/err.h - copied unchanged from r290042, head/sys/ofed/include/linux/err.h head/sys/compat/linuxkpi/common/include/linux/errno.h - copied unchanged from r290042, head/sys/ofed/include/linux/errno.h head/sys/compat/linuxkpi/common/include/linux/etherdevice.h - copied unchanged from r290042, head/sys/ofed/include/linux/etherdevice.h head/sys/compat/linuxkpi/common/include/linux/file.h - copied unchanged from r290042, head/sys/ofed/include/linux/file.h head/sys/compat/linuxkpi/common/include/linux/fs.h - copied unchanged from r290042, head/sys/ofed/include/linux/fs.h head/sys/compat/linuxkpi/common/include/linux/gfp.h - copied unchanged from r290042, head/sys/ofed/include/linux/gfp.h head/sys/compat/linuxkpi/common/include/linux/hardirq.h - copied unchanged from r290042, head/sys/ofed/include/linux/hardirq.h head/sys/compat/linuxkpi/common/include/linux/idr.h - copied unchanged from r290042, head/sys/ofed/include/linux/idr.h head/sys/compat/linuxkpi/common/include/linux/if_arp.h - copied unchanged from r290042, head/sys/ofed/include/linux/if_arp.h head/sys/compat/linuxkpi/common/include/linux/if_ether.h - copied unchanged from r290042, head/sys/ofed/include/linux/if_ether.h
svn commit: r290136 - head
Author: hselasky Date: Thu Oct 29 08:45:56 2015 New Revision: 290136 URL: https://svnweb.freebsd.org/changeset/base/290136 Log: Add myself to MAINTAINERS. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Oct 29 08:28:39 2015(r290135) +++ head/MAINTAINERSThu Oct 29 08:45:56 2015(r290136) @@ -105,6 +105,9 @@ bs{diff,patch} cpercivaPre-commit revie portsnap cpercivaPre-commit review requested. freebsd-update cpercivaPre-commit review requested. opensslbenl,jkim Pre-commit review requested. +sys/dev/usbhselaskyIf in doubt, ask. +sys/dev/sound/usb hselaskyIf in doubt, ask. +sys/compat/linuxkpihselaskyIf in doubt, ask. sys/netgraph/bluetooth emaxPre-commit review preferred. lib/libbluetooth emaxPre-commit review preferred. lib/libsdp emaxPre-commit review preferred. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290138 - head/share/man/man4
Author: mav Date: Thu Oct 29 09:50:48 2015 New Revision: 290138 URL: https://svnweb.freebsd.org/changeset/base/290138 Log: Some updates to isp(4) manual page. Modified: head/share/man/man4/isp.4 Modified: head/share/man/man4/isp.4 == --- head/share/man/man4/isp.4 Thu Oct 29 09:08:04 2015(r290137) +++ head/share/man/man4/isp.4 Thu Oct 29 09:50:48 2015(r290138) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 1, 2014 +.Dd October 29, 2015 .Dt ISP 4 .Os .Sh NAME @@ -60,8 +60,7 @@ devices. SCSI features include support for Ultra SCSI and wide mode transactions for .Tn SCSI , -Ultra2 LVD (for the ISP1080 and ISP1280), and Ultra3 LVD (for the -ISP12160). +Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for .Tn FibreChannel , @@ -69,15 +68,13 @@ and utilizes Class 3 and Class 2 connect 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for point-to-point connections (Qlogic 2200 only). -The newer 2-Gigabit cards (2300, 2312, 2322) and 4-Gigabit (2422, 2432) -are also supported. -Command tagging is -supported for all (in fact, +The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) +and 8-Gigabit (2532) are also supported. +Command tagging is supported for all (in fact, .Tn FibreChannel requires tagging). Fabric support is enabled by default for other than 2100 cards. -Fabric -support for 2100 cards has been so problematic and these cards are so +Fabric support for 2100 cards has been so problematic and these cards are so old now that it is just not worth your time to try it. .Sh FIRMWARE Firmware is available if the @@ -103,15 +100,16 @@ Qlogic 1020 Fast Wide and Differential F .It ISP1040 Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards. Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). -.It Qlogic 1240 -Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI -cards. .It Qlogic 1020 Qlogic 1020 SCSI cards. .It Qlogic 1040 Qlogic 1040 Ultra SCSI cards. .It Qlogic 1080 -Qlogic 1280 LVD Ultra2 Wide PCI cards. +Qlogic 1080 LVD Ultra2 Wide SCSI cards. +.It Qlogic 10160 +Qlogic 10160 LVD Ultra3 Wide PCI cards. +.It Qlogic 1240 +Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards. .It Qlogic 1280 Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards. .It Qlogic 12160 @@ -123,21 +121,21 @@ Loop (single, dual). Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual, quad). .It Qlogic 2300 -Qlogic 2300 Optical Fibre Channel PCI cards. +Qlogic 2300 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 2312 -Qlogic 2312 Optical Fibre Channel PCI cards. +Qlogic 2312 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 234X -Qlogic 234X Optical Fibre Channel PCI cards (2312 chipset, single and dual attach). +Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). .It Qlogic 2322 -Qlogic 2322 Optical Fibre Channel PCIe cards. +Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards. .It Qlogic 200 -Dell Branded version of the QLogic 2312 Fibre Channel PCI cards. +Dell branded version of the QLogic 2312. .It Qlogic 2422 -Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit) -.It Qlogic 2432 -Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit) +Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. .It Qlogic 2432 -Qlogic 2532 Optical Fibre Channel PCIe cards (8 Gigabit) +Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards. +.It Qlogic 2532 +Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support may be enabled with the @@ -232,13 +230,11 @@ The .Nm driver was written by .An Matthew Jacob -originally for NetBSD at -NASA/Ames Research Center. +originally for NetBSD at NASA/Ames Research Center. +Some later improvement was done by +.An Alexander Motin Aq Mt m...@freebsd.org .Sh BUGS The driver currently ignores some NVRAM settings. .Pp -Target mode support is not completely reliable yet. -It works reasonably -well for Fibre Channel, somewhat well for Qlogic 1040 cards, but -does not yet work for the other cards (due to last minute unannounced -changes in firmware interfaces). +Target mode support works reasonably well for 23xx and above Fibre Channel +cars, but not really tested on older ones. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290139 - head/share/man/man4
Author: mav Date: Thu Oct 29 10:31:44 2015 New Revision: 290139 URL: https://svnweb.freebsd.org/changeset/base/290139 Log: Some minor additions to r290138, Modified: head/share/man/man4/isp.4 Modified: head/share/man/man4/isp.4 == --- head/share/man/man4/isp.4 Thu Oct 29 09:50:48 2015(r290138) +++ head/share/man/man4/isp.4 Thu Oct 29 10:31:44 2015(r290139) @@ -232,9 +232,9 @@ driver was written by .An Matthew Jacob originally for NetBSD at NASA/Ames Research Center. Some later improvement was done by -.An Alexander Motin Aq Mt m...@freebsd.org +.An Alexander Motin Aq Mt m...@freebsd.org . .Sh BUGS The driver currently ignores some NVRAM settings. .Pp Target mode support works reasonably well for 23xx and above Fibre Channel -cars, but not really tested on older ones. +cards, but not really tested on older ones. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290180 - head/usr.sbin/makefs
Author: ngie Date: Fri Oct 30 05:55:56 2015 New Revision: 290180 URL: https://svnweb.freebsd.org/changeset/base/290180 Log: Follow up to roundup feature addition in r289203 - Rename -r to -R to avoid the clash with makefs -r in NetBSD - Note that -R is an FFS-specific option because it's not implemented in cd9660 today - Rename the roundup variable to "roundup-size" in the manpage and help text for consistency with other variables. - Bump .Dd (missed in r289203) PR: 203707 MFC after: 1 week X-MFC with: r289203 Differential Revision: https://reviews.freebsd.org/D3959 Reviewed by: adrian (earlier patch), emaste Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/usr.sbin/makefs/makefs.8 == --- head/usr.sbin/makefs/makefs.8 Fri Oct 30 05:50:05 2015 (r290179) +++ head/usr.sbin/makefs/makefs.8 Fri Oct 30 05:55:56 2015 (r290180) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2013 +.Dd October 29, 2015 .Dt MAKEFS 8 .Os .Sh NAME @@ -53,7 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options -.Op Fl r Ar roundup +.Op Fl R Ar roundup-size .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -196,9 +196,14 @@ Deprecated. See the .Fl Z flag. -.It Fl r Ar roundup -Round the image up to specified block size that should be multiple -of block size. +.It Fl R Ar roundup-size +Round the image up to +.Ar roundup-size . +.Ar roundup-size +should be a multiple of the file system block size. +This option only applies to the +.Sy ffs +file system type. .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . Modified: head/usr.sbin/makefs/makefs.c == --- head/usr.sbin/makefs/makefs.c Fri Oct 30 05:50:05 2015 (r290179) +++ head/usr.sbin/makefs/makefs.c Fri Oct 30 05:55:56 2015 (r290180) @@ -209,10 +209,10 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; - case 'r': + case 'R': /* Round image size up to specified block size */ fsoptions.roundup = - strsuftoll("roundup", optarg, 0, LLONG_MAX); + strsuftoll("roundup-size", optarg, 0, LLONG_MAX); break; case 's': @@ -365,7 +365,7 @@ usage(void) prog = getprogname(); fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-r roundup ]\n" +"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" "\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" "\t[-xZ] [-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290177 - in head: etc/mtree lib/libc/tests
Author: ngie Date: Fri Oct 30 03:28:00 2015 New Revision: 290177 URL: https://svnweb.freebsd.org/changeset/base/290177 Log: Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite as lib/libc/rpc This testcase requires rpcbind be up in running; otherwise the testcases will time out and be skipped MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/etc/mtree/BSD.tests.dist head/lib/libc/tests/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Fri Oct 30 01:19:04 2015 (r290176) +++ head/etc/mtree/BSD.tests.dist Fri Oct 30 03:28:00 2015 (r290177) @@ -275,6 +275,8 @@ data .. .. +rpc +.. ssp .. stdio Modified: head/lib/libc/tests/Makefile == --- head/lib/libc/tests/MakefileFri Oct 30 01:19:04 2015 (r290176) +++ head/lib/libc/tests/MakefileFri Oct 30 03:28:00 2015 (r290177) @@ -11,6 +11,7 @@ TESTS_SUBDIRS+= hash TESTS_SUBDIRS+=inet TESTS_SUBDIRS+=net TESTS_SUBDIRS+=regex +TESTS_SUBDIRS+=rpc TESTS_SUBDIRS+=stdio TESTS_SUBDIRS+=stdlib TESTS_SUBDIRS+=string ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290178 - head/secure/lib/libcrypto/engines/libgost
Author: ngie Date: Fri Oct 30 05:33:38 2015 New Revision: 290178 URL: https://svnweb.freebsd.org/changeset/base/290178 Log: Fix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it picks up undefined symbols, like "ERR_load_GOST_strings" MFC after: 3 days PR: 184805 Submitted by: Ivan IvanZhdanovSponsored by: EMC / Isilon Storage Division Modified: head/secure/lib/libcrypto/engines/libgost/Makefile Modified: head/secure/lib/libcrypto/engines/libgost/Makefile == --- head/secure/lib/libcrypto/engines/libgost/Makefile Fri Oct 30 03:28:00 2015(r290177) +++ head/secure/lib/libcrypto/engines/libgost/Makefile Fri Oct 30 05:33:38 2015(r290178) @@ -3,6 +3,7 @@ SHLIB_NAME?= libgost.so SRCS= gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c gost_ameth.c \ gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c gost_keywrap.c \ - gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c + gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c \ + e_gost_err.c .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290179 - head/lib/libc/gen
Author: ngie Date: Fri Oct 30 05:50:05 2015 New Revision: 290179 URL: https://svnweb.freebsd.org/changeset/base/290179 Log: Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/gen/getgrent.c Modified: head/lib/libc/gen/getgrent.c == --- head/lib/libc/gen/getgrent.cFri Oct 30 05:33:38 2015 (r290178) +++ head/lib/libc/gen/getgrent.cFri Oct 30 05:50:05 2015 (r290179) @@ -660,14 +660,13 @@ __getgroupmembership(const char *uname, NS_FALLBACK_CB(getgroupmembership_fallback) { NULL, NULL, NULL } }; - int rv; assert(uname != NULL); /* groups may be NULL if just sizing when invoked with maxgrp = 0 */ assert(grpcnt != NULL); *grpcnt = 0; - rv = _nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership", + (void)_nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership", defaultsrc, uname, agroup, groups, maxgrp, grpcnt); /* too many groups found? */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290175 - head/sys/dev/cxgbe/tom
Author: np Date: Fri Oct 30 01:18:07 2015 New Revision: 290175 URL: https://svnweb.freebsd.org/changeset/base/290175 Log: cxgbe/tom: decide whether to shove segments or not only if there is payload to transmit. MFC after:1 week Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c == --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Oct 30 00:46:52 2015 (r290174) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Oct 30 01:18:07 2015 (r290175) @@ -675,7 +675,6 @@ t4_push_frames(struct adapter *sc, struc } } - shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); space = sbspace(sb); if (space <= sb->sb_hiwat * 3 / 8 && @@ -712,6 +711,7 @@ t4_push_frames(struct adapter *sc, struc if (__predict_false(toep->flags & TPF_FIN_SENT)) panic("%s: excess tx.", __func__); + shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); if (plen <= max_imm) { /* Immediate data tx */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r290176 - head/sys/contrib/vchiq/interface/vchiq_arm
Author: gonzo Date: Fri Oct 30 01:19:04 2015 New Revision: 290176 URL: https://svnweb.freebsd.org/changeset/base/290176 Log: Fix BULK read transfer if destination buffer is not cache line-aligned. We can't use copyout because destination memory is userland address in another process but we have reference to respective page so map the page into kernel address space and copy fragments there Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c == --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Fri Oct 30 01:18:07 2015(r290175) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Fri Oct 30 01:19:04 2015(r290176) @@ -109,6 +109,22 @@ vchiq_dmamap_cb(void *arg, bus_dma_segme *addr = PHYS_TO_VCBUS(segs[0].ds_addr); } +static int +copyout_page(vm_page_t p, size_t offset, void *kaddr, size_t size) +{ +uint8_t *dst; + +dst = pmap_mapdev(VM_PAGE_TO_PHYS(p), PAGE_SIZE); +if (!dst) +return ENOMEM; + +memcpy(dst + offset, kaddr, size); + +pmap_unmapdev((vm_offset_t)dst, PAGE_SIZE); + +return 0; +} + int __init vchiq_platform_init(VCHIQ_STATE_T *state) { @@ -560,15 +576,19 @@ free_pagelist(BULKINFO_T *bi, int actual if (head_bytes > actual) head_bytes = actual; - memcpy((char *)bi->buf, + copyout_page(pages[0], + pagelist->offset, fragments->headbuf, head_bytes); } if ((actual >= 0) && (head_bytes < actual) && (tail_bytes != 0)) { - memcpy((char *)bi->buf + actual - tail_bytes, -fragments->tailbuf, tail_bytes); + + copyout_page(pages[num_pages-1], + (((vm_offset_t)bi->buf + actual) % PAGE_SIZE) - tail_bytes, + fragments->tailbuf, + tail_bytes); } down(_free_fragments_mutex); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"