10.0 BETA 3 with redports kernel panic

Sean Bruno sean_bruno at yahoo.com
Thu Jan 9 01:20:04 UTC 2014


On Sat, 2013-12-28 at 16:08 +0200, Konstantin Belousov wrote:
> diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
> index abbbb21..fd9c5df 100644
> --- a/sys/amd64/amd64/mem.c
> +++ b/sys/amd64/amd64/mem.c
> @@ -98,7 +98,13 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
>  kmemphys:
>                         o = v & PAGE_MASK;
>                         c = min(uio->uio_resid, (u_int)(PAGE_SIZE -
> o));
> -                       error = uiomove((void *)PHYS_TO_DMAP(v),
> (int)c, uio);
> +                       v = PHYS_TO_DMAP(v);
> +                       if (v < DMAP_MIN_ADDRESS ||
> +                           (v > DMAP_MIN_ADDRESS + dmaplimit &&
> +                           v <= DMAP_MAX_ADDRESS) ||
> +                           pmap_kextract(v) == 0)
> +                               return (EFAULT);
> +                       error = uiomove((void *)v, (int)c, uio);
>                         continue;
>                 }
>                 else if (dev2unit(dev) == CDEV_MINOR_KMEM) {
> diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
> index 014020b..85be1f2 100644
> --- a/sys/amd64/amd64/pmap.c
> +++ b/sys/amd64/amd64/pmap.c
> @@ -321,7 +321,7 @@ SYSCTL_INT(_machdep, OID_AUTO, nkpt, CTLFLAG_RD,
> &nkpt, 0,
>      "Number of kernel page table pages allocated on bootup");
>  
>  static int ndmpdp;
> -static vm_paddr_t dmaplimit;
> +vm_paddr_t dmaplimit;
>  vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
>  pt_entry_t pg_nx;
>  
> diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
> index 3918282..e83e07e 100644
> --- a/sys/amd64/include/pmap.h
> +++ b/sys/amd64/include/pmap.h
> @@ -369,6 +369,7 @@ extern vm_paddr_t phys_avail[];
>  extern vm_paddr_t dump_avail[];
>  extern vm_offset_t virtual_avail;
>  extern vm_offset_t virtual_end;
> +extern vm_paddr_t dmaplimit;
>  
>  #define        pmap_page_get_memattr(m)        ((vm_memattr_t)(m)->md.pat_mode)
>  #define        pmap_page_is_write_mapped(m)    (((m)->aflags &
> PGA_WRITEABLE) != 0) 



I've updated 2/4 redbuild machines to stable/10 and applied this patch.
I will monitor them for the rest of the week for stability.

sean

p.s. redbuild 03/04



More information about the freebsd-stable mailing list