Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3729309imm; Mon, 11 Jun 2018 00:19:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIw4Pr5U8oiKJjeWubgTO9zyMp9dKzpnA91+Yu/ABO0hQ9zXWIy4dUy+cWgI6saTiDCUn8i X-Received: by 2002:a17:902:8e87:: with SMTP id bg7-v6mr17207701plb.129.1528701589931; Mon, 11 Jun 2018 00:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528701589; cv=none; d=google.com; s=arc-20160816; b=FNrRKBb7qTh33mFnzXYVyG/6KSUBUofjpM9J/l4pHMmEzc3oX84y6rYcJ8FUK4G7Hk UwrXt9EjOsB7W1g5OPxNTuTqE6OHBao5JByII7WsEXTvndXMVJ74bqumSFjjxZV8JvUI Hj+m0oSIIRIbXPZFXv0QXmQ8GXCygRVc2Sw1IV+yv+2mRYxt5f0oV2BfpDDZO6brc8/0 AHKr/pOoqAWs7P9dXfDuTRrjlmZ9H2nDwLLumwQdKO2TdQoxY5zmd/L1jxCPMXGHET3b PR4kjUWlHv1+JBK/7MVpM6qbsYzCovtAYKa3uJLzgOlIj/ZOfteAo07Dd+mDhPtxguIg 2t0w== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=TCCKFO7mXUmmC+SOJQGUK7mUfSSufay80Q8OdCPN4MI=; b=HVq6q6RMG1lKjBVEL2RJg39uSKXdLpNMUDi+J/ygsi5pNnZhZzlQPOlAGRv86ie+86 iBu+iavq99nG1IpmZTCzmWfDmnEULZJTqgbkO9n2sIBQmxB4ZV2gEvbsouVBTtwoW17x Zb7GnoQVbzgp+e8wyj8IuNW0g3d650YiioYqXy5aU22+ZJx22b5rC0WgNNpcQemH39zK 9CaZjBCn2vfuO0bB2TSJkvq+9cVJztyU69PjxW4VCUQfCRiFRCsPyJc8P5ZNdXhhRzmm UlQ71pn87XcxqB2JXMQVStSOg+G7+uhTDqT0SwHP45BtbJp5qRjkGso5sxSGdVH8rSKK VUkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=gVGuXa4W; 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 f4-v6si5920668plo.226.2018.06.11.00.19.35; Mon, 11 Jun 2018 00:19:49 -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=gVGuXa4W; 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 S1754130AbeFKHTG (ORCPT + 99 others); Mon, 11 Jun 2018 03:19:06 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:43109 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754100AbeFKHTC (ORCPT ); Mon, 11 Jun 2018 03:19:02 -0400 Received: by mail-ot0-f195.google.com with SMTP id i19-v6so22600559otk.10 for ; Mon, 11 Jun 2018 00:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TCCKFO7mXUmmC+SOJQGUK7mUfSSufay80Q8OdCPN4MI=; b=gVGuXa4WhD1W1jdC/TSDzes5IVo8kVv6EHuQVE8wJrWIok1dLnWO3kkEr3M1MY4enM ZwlVvqK3Vz/YeVamSMIswTzf9j8E6JayKlWgWwjVMQJJVcBKZiZLtM70XZZ0nRc3Q7En H/29qIboFQ7CayTRjdlOBwFfy+AsyZKVV2CNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TCCKFO7mXUmmC+SOJQGUK7mUfSSufay80Q8OdCPN4MI=; b=qTOUsWf+OnSd1MbFRtzR5McEpvT3kW1FEaPMCvbAfgrIj2OOIzZBjBHjuRoU8x2f3g 0tgemLkpB+7fTL1DJTDI577qqum7jfTikcNQOcawQ2bkpVBqPKFoiRJMeWUCNqJQOEzE WFAYwaZohG+Flut4/D64vRd5tKg34Za7A0X32XzMhgJgqkTAEwuTM+8Gju8Q8ikDZ25a q5wADIiiP0XDAkHi9QpkjsSagY07FUup6LSYXyyxby0cuOQaiBd7DGFk5QPR0AMg1FZR Jx7u3pmPnBddlaB8trrZlmrdHszoHPpBbxUleC0HfbaFR0WdG+uBtu62hMvapqSH477Y 7YMQ== X-Gm-Message-State: APt69E2Hqj0GCrNs2Xzp/Lrps+KRDVfW6fScuKnQQOTpqqOE5boAPYbm amQCIWhvleUNeHoO9fJoksCzsgNJMQHT7Vy4pH2rrQ== X-Received: by 2002:a9d:1531:: with SMTP id u46-v6mr10016444otf.197.1528701541933; Mon, 11 Jun 2018 00:19:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1123:0:0:0:0:0 with HTTP; Mon, 11 Jun 2018 00:19:01 -0700 (PDT) X-Originating-IP: [194.176.227.33] In-Reply-To: <20180610045657.GM30522@ZenIV.linux.org.uk> References: <20180529144339.16538-1-mszeredi@redhat.com> <20180529144339.16538-8-mszeredi@redhat.com> <20180604084904.GF11333@infradead.org> <20180610045657.GM30522@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Mon, 11 Jun 2018 09:19:01 +0200 Message-ID: Subject: Re: [PATCH 07/39] vfs: export vfs_ioctl() to modules To: Al Viro Cc: Christoph Hellwig , Miklos Szeredi , overlayfs , 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 Sun, Jun 10, 2018 at 6:57 AM, Al Viro wrote: > On Mon, Jun 04, 2018 at 01:49:04AM -0700, Christoph Hellwig wrote: >> On Tue, May 29, 2018 at 04:43:07PM +0200, Miklos Szeredi wrote: >> > This is needed by the stacked ioctl implementation in overlayfs. >> >> EXPORT_SYMBOL_GPL for exporting random internals, please. Same >> for any following patches. > > *blink* > > Christoph, get real and RTFS - vfs_ioctl() simply calls ->unlocked_ioctl(); > all there is to it. > > This isn't even a case of "using that function establishes that the > caller is a derived work" - *anyone* who can see definition of > file_operations can bloody well open-code it. There isn't anything > establishing derivation here. > > Hell, it could've been a static inline in include/linux/fs.h and it would > neither differ from many other inlines in there nor need an export at all. > > This is really getting close to lxo-worthy levels of bogosity... > > More interesting question is why do we want to pass those ioctls to layers > in the first place, especially if it's something with different availability > (or, worse yet, argument layouts) before and after copyup. We don't. Obviously need to make sure to only ever do ioctl's in overlayfs that have a common definition across filesystems. Not a lot of those, luckily... Thanks, Miklos