From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgFV1-0000sv-9x for qemu-devel@nongnu.org; Thu, 18 Sep 2008 05:08:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgFUy-0000rW-P9 for qemu-devel@nongnu.org; Thu, 18 Sep 2008 05:08:30 -0400 Received: from [199.232.76.173] (port=48744 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgFUy-0000rJ-ER for qemu-devel@nongnu.org; Thu, 18 Sep 2008 05:08:28 -0400 Received: from mx20.gnu.org ([199.232.41.8]:41752) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgFUy-00037O-Do for qemu-devel@nongnu.org; Thu, 18 Sep 2008 05:08:28 -0400 Received: from [84.20.150.76] (helo=narury.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgFUw-0002iM-F4 for qemu-devel@nongnu.org; Thu, 18 Sep 2008 05:08:26 -0400 Date: Thu, 18 Sep 2008 12:08:21 +0300 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] add futimesat syscall Message-ID: <20080918090821.GA17893@kos.to> References: <20080917194533.GB21187@kos.to> <20080918063007.GA26841@kos.to> <761ea48b0809180023t37d300ceq790fe33c5ab7602a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <761ea48b0809180023t37d300ceq790fe33c5ab7602a@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kirill@shutemov.name On Thu, Sep 18, 2008 at 09:23:20AM +0200, Laurent Desnogues wrote: > On Thu, Sep 18, 2008 at 8:30 AM, Riku Voipio wrote: > > On Thu, Sep 18, 2008 at 01:54:21AM +0200, andrzej zaborowski wrote: > >> http://lists.gnu.org/archive/html/qemu-devel/2008-09/msg00439.html , > >> it looks cleaner to me. > > Kirill's patch looks good to me. > There's a functional difference between Kirill's patch and yours: > Kirill + ret = get_errno(futimesat(arg1, p, tvp)); > you + ret = get_errno(sys_futimesat(arg1, path(p), tv)); The sbox patch defines sys_futimesat earlier in the file, presumably to deal with supporting a stone-age version of libc/kernel headers. path() is related to interp_prefix. The old utimes handlers don't use path() either, and it's unlikely that any library-loading routine uses futimes(). Thus, I believe Kirill's version is more correct. That said, path() should probably renamed to something more obvious (interp_path() ?), or path mangling could be made more generic (allowing things like chroot() emulation). -- "rm -rf" only sounds scary if you don't have backups