[12] in arla-drinkers

home help back first fref pref prev next nref lref last post

Re: arla problems under Solaris 2.6

daemon@ATHENA.MIT.EDU (John Hawkinson)
Thu Jun 18 23:24:18 1998

From arla-drinkers-request@sundance.stacken.kth.se Fri Jun 19 03:24:17 1998
Return-Path: <arla-drinkers-request@sundance.stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 12809 invoked from network); 19 Jun 1998 03:24:16 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
  by bloom-picayune.mit.edu with SMTP; 19 Jun 1998 03:24:16 -0000
Received: from all-purpose-gunk.near.net (all-purpose-gunk.near.net [199.94.208.184])
	by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id FAA11443
	for <arla-drinkers@stacken.kth.se>; Fri, 19 Jun 1998 05:19:25 +0200 (MET DST)
Received: (from jhawk@localhost)
	by all-purpose-gunk.near.net (8.8.8/8.8.8) id XAA18242;
	Thu, 18 Jun 1998 23:19:22 -0400 (EDT)
From: John Hawkinson <jhawk@bbnplanet.com>
Message-Id: <199806190319.XAA18242@all-purpose-gunk.near.net>
Subject: Re: arla problems under Solaris 2.6
To: arla-drinkers@stacken.kth.se
Date: Thu, 18 Jun 1998 23:19:22 -0400 (EDT)
In-Reply-To: <199806190233.WAA18102@all-purpose-gunk.near.net> from "John Hawkinson" at Jun 18, 98 10:33:02 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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

home help back first fref pref prev next nref lref last post