Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp919183yba; Wed, 24 Apr 2019 11:46:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSdm7ftNwD9fguTcdUqXeFXcLPDqAFYiUc4KIUOGauWOv9NuHjTmYwsv63MQVy+toP+lLs X-Received: by 2002:a62:e215:: with SMTP id a21mr35476834pfi.30.1556131588673; Wed, 24 Apr 2019 11:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556131588; cv=none; d=google.com; s=arc-20160816; b=s3GSyUUUziphf09ZPGmi/uqaHJnlK5Oswf82ETlM9ayhA75QfZq3lZD/ZrlD0FZBP2 3+aIuM0jvcrJk8UefJnNCHrSIcIVnZNjVJZYMU9xdGaHm8Dtssrvc9QKP1Ix/EbRrdHX MSEQm+d0zwhQ+j8bhUH6us6HpQ/CQOpfMl2DmvLfohwqoieZsX9eWaG2Z/sS8daPGHe9 tPue3UaWy/o/knUe/QJliQLnWbfd8gQiwMbCgKv/Hzun3QW5+yG3fMGjw/sNF+3X8MEb G2gEQja4DFKHgw2I+VuDCEhBIoyNFU5r8ryeEfKvSXx+EEGMY3TrHj0uoLjU59nRuowj Q82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hOy7JEgPo4evGALE7vtbJbbdRzccQOcXF9u3/Lr+Ou8=; b=kT9KHjSQvctBfQeE0/35hOiS04T6QbIqVzd8vV6sVEPcFXMS5NmWXDMk+5GQtk7dyQ IcV1ZcBsPsg6f8OPpSZAqGtN+n+eGkO07O7o8mnIbnzO/fwfemMQ4KA656MQNtIQoZl0 VpQ6ivbjt0kEQQ2Z5J2t3kGkaSL9L3p8DHBlSj3jk3pF9TPNWf0Nf4lZhhaWdYBfAnp/ X5TTk6jyWiWwFueeFd8AYN4KCXTvRf7XgRh/uKRVpbVgLVa5hH4S3vxzcUwf5LRbSS7c afO2ZRNGxY9d9dhiyTCS+BO9EEsfanOdmP3RGND71U6c3s+LMm3H2AP+0bnrZodgw6PZ dlEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=TLGuPGYd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si16785655pgq.214.2019.04.24.11.46.10; Wed, 24 Apr 2019 11:46:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=TLGuPGYd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727659AbfDXKw7 (ORCPT + 99 others); Wed, 24 Apr 2019 06:52:59 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:33093 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726271AbfDXKw6 (ORCPT ); Wed, 24 Apr 2019 06:52:58 -0400 Received: by mail-it1-f193.google.com with SMTP id v8so5038866itf.0 for ; Wed, 24 Apr 2019 03:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hOy7JEgPo4evGALE7vtbJbbdRzccQOcXF9u3/Lr+Ou8=; b=TLGuPGYduviv1G7wE7tR0VQpHrP87uQ5NMWS2BAwv9zzjreMpdeejnOdbnFhh1af5x 5PZXskVBx1z7UXpBry+/u5EZlB2PPGxdeyTMJ3C9ZMu4DlAoqNgz1JB2LTltG6aymYel 8lrreUFAFzTNEQf5XI2cZNh1fp2S+p+EctxOI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hOy7JEgPo4evGALE7vtbJbbdRzccQOcXF9u3/Lr+Ou8=; b=X9KEKnudPnFRjrJ9rSt/YpbER4+C6C1aZcQzrpRCpSd7PSWkM45f4p4ybQPCWdRDle wc5O2ZoAWAXhZokPbiFfiiA/fV9oDfuaQwXjpfvm2A6g97RgTe26/257Ws/u/EpfI0Z2 Vd6R0GJ8XUriPX2TgQjtUWppurjG8N17FVQFQRI4F/t52PsPCl65uKKuYZr7TLhhZWxO 2M9LWCmDEHRIywLan1O5Uts+tIauXgez0PYsdMdHKf7e56fAYtEAFvrxWC9UewijQ1iW K8yfrtNu6OaeT8zAMrk7GXeAWm8+w6K+zNTGJ96xV3GUrj6n6gUFUtixWie16oQ19mhI jQ2g== X-Gm-Message-State: APjAAAViwXPx1TS0Bwr9K9ESX7Uji/J1FfyiTZSZCNkBkGBG7Hn1+MpP y3E/bd+dz/BYxlOkDv2WvIWbAgS2SzatBWDDDY92qQ== X-Received: by 2002:a24:1312:: with SMTP id 18mr5469221itz.121.1556103177810; Wed, 24 Apr 2019 03:52:57 -0700 (PDT) MIME-Version: 1.0 References: <20190301170831.23612-1-abbotti@mev.co.uk> In-Reply-To: From: Miklos Szeredi Date: Wed, 24 Apr 2019 12:52:46 +0200 Message-ID: Subject: Re: [PATCH] fuse: Add ioctl flag for compat ioctl with 64-bit time_t To: Ian Abbott Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 5:14 PM Ian Abbott wrote: > > On 23/04/2019 13:55, Miklos Szeredi wrote: > > On Fri, Mar 1, 2019 at 6:08 PM Ian Abbott wrote: > >> > >> Currently, a CUSE server running on a 64-bit kernel can tell when an > >> ioctl request comes from a process running a 32-bit ABI, but cannot tell > >> whether the requesting process is using legacy IA32 emulation or x32 > >> ABI, for example. In particular, the server does not know the size of > >> the client process's `time_t` type. > >> > >> For 64-bit kernels, the `FUSE_IOCTL_COMPAT` and `FUSE_IOCTL_32BIT` flags > >> are currently set in the ioctl input request (`struct fuse_ioctl_in` > >> member `flags`) for a 32-bit requesting process. This patch defines a > >> new flag `FUSE_IOCTL_COMPAT_64TIME` and sets it if the 32-bit requesting > >> process (running on a 64-bit kernel) uses a 64-bit `time_t` type. > > > > Hi, > > > > Thanks for the patch. > > > > I think it should rather use in_x32_syscall() helper and follow that > > naming because there's apparently at least one example in xfs of a > > non-time_t related ioctl that varies between the x32 vs ia32. > > Hi Miklos, > > It is conceivable that COMPAT_USE_64BIT_TIME could be true for some > other arch/ABI (although currently it is only ever set for x86/x32). > Should it have separate flags for "compat 64-bit time" and "compat x32" > (even though that is currently redundant)? No, it should just be a single flag, something like FUSE_IOCTL_COMPAT_X32 and the documentation should say that it implies 64bit time values. Thanks, Miklos