arla problems under Solaris 2.6

John Hawkinson jhawk at bbnplanet.com
Fri Jun 19 05:19:25 CEST 1998


I really need to insert some more hysteresis into this process :-)

> We can't copyin() MAXPATHLEN worth of data.
> Brute-forcing it shows that we can copy in 584 bytes
> from dir and 594 bytes from spec. Not surpringly,
> spec-dir=10.
>
> I'm not sure how we're supposed to work this. It's clear there's some
> sort of fuzzy constraint, and I don't know when we might hit it.

Consultation with someone who cheated reveals that the undocumented
function copyinstr() should be used instead.

/usr/include/sys/copyops.h:     ((*curthread->t_copyops->cp_copyinstr)(uaddr, ka
ddr, max, lencopied))


at least tells us what the args can be; NULL lencopied means don't
tell us how much was copied.

This time I also fix quoting of the two strings to be consistent.

Here's my last word on the subject :-)

--jhawk

*** /tmp/T0F0bI2_	Thu Jun 18 23:17:10 1998
--- xfs_vfsops.c	Thu Jun 18 23:10:43 1998
***************
*** 68,76 ****
    struct vnode *devvp;
    dev_t dev;
    int error;
  
!   XFSDEB(XDEBVFOPS, ("xfs_mount vfsp = 0x%x path = %s args = '%s'\n",
! 		   (u_int) vfsp, uap->dir, uap->spec));
  
    /*
     * This is something that should be done before calling this
--- 68,84 ----
    struct vnode *devvp;
    dev_t dev;
    int error;
+ #ifdef DEBUG
+   char dir[MAXPATHLEN], spec[MAXPATHLEN];
+ #endif
  
! #ifdef DEBUG
!   if (copyinstr(uap->dir, dir, sizeof(dir), NULL) ||
!       copyinstr(uap->spec, spec, sizeof(spec), NULL))
!         return EFAULT;
!   XFSDEB(XDEBVFOPS, ("xfs_mount vfsp = 0x%x path = '%s' args = '%s'\n",
! 		   (u_int) vfsp, dir, spec));
! #endif
  
    /*
     * This is something that should be done before calling this





More information about the Arla-drinkers mailing list