From patchwork Fri Dec 22 14:32:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongsu Park X-Patchwork-Id: 10130563 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9249B60318 for ; Fri, 22 Dec 2017 14:32:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89CE329FA9 for ; Fri, 22 Dec 2017 14:32:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EA9D29FE9; Fri, 22 Dec 2017 14:32:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3441E29FA9 for ; Fri, 22 Dec 2017 14:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756209AbdLVOc3 (ORCPT ); Fri, 22 Dec 2017 09:32:29 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45736 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756204AbdLVOba (ORCPT ); Fri, 22 Dec 2017 09:31:30 -0500 Received: by mail-wm0-f68.google.com with SMTP id 9so22141496wme.4 for ; Fri, 22 Dec 2017 06:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kinvolk.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i0l0xyrVJ0JrClEI0HGu1nX9gBNxtyWuWvhti+DvFaA=; b=bw+rJ82M6yHe50KuwDcRtuJkqjZitVTESXq6BsIC4J0JoB2eNFDynLS4gqGMEi+xOG s+DYXcMxeDGClP6Ysk3VI/nt6+U03N1uDyQ6hnvhc6TVG3eWoijUISem288EeJuKva8d xMHuiiFL+1UpVhzqiD7elAeeSVCrbOcHK6hEI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i0l0xyrVJ0JrClEI0HGu1nX9gBNxtyWuWvhti+DvFaA=; b=TXO2uftZk35Bg/0DHrDW7aSJYOxXPYimY8uDq6EOauksVJ9qZfvM/yDiHnSDbTkAb1 xeP+UL1d5Nx6+9KB+clBq/FfWplPacqmFyteFLig53hllQd9biOoJhNdb4Z7YkgksfmM WxLhEYRbXHqR8o0htY+9OLGDN/gW6Wmezup2QQFkcXr7W/wkBM2g8P3CGdFlCOu0ND8d 8DKEvXIPXIWITK0Fz1nd6Ux7hHFXdEBoieJGF2G+9bdi0q2ALCnjt88EEnZ+Yb87MEuz UHrDRTh0d+Vfo7hdKfz0xIvoPqBCeXIESs+mM+m4O/Lxz2lpErtxJ4gh2Hby1mYEg1xk 3MKg== X-Gm-Message-State: AKGB3mIfkHqmnSjXBWGSqEAaeerRBISeXOZB9WaC197PyRp6gfKfm65N KlHbHIL0Ucc1S7PoeZO2GA5e5g== X-Google-Smtp-Source: ACJfBou/P1Sms0De6Pd+Z7jJxgUN+OEyTiuUnqumo7JSsmpqbv3SqCqvTZv6uAMcHachISl9E4vWMQ== X-Received: by 10.80.172.226 with SMTP id x89mr15810961edc.43.1513953089634; Fri, 22 Dec 2017 06:31:29 -0800 (PST) Received: from dberlin.localdomain ([178.19.216.175]) by smtp.gmail.com with ESMTPSA id j39sm19698065ede.38.2017.12.22.06.31.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Dec 2017 06:31:29 -0800 (PST) From: Dongsu Park To: linux-kernel@vger.kernel.org Cc: containers@lists.linux-foundation.org, Alban Crequy , "Eric W . Biederman" , Miklos Szeredi , Seth Forshee , Sargun Dhillon , Dongsu Park , linux-fsdevel@vger.kernel.org Subject: [PATCH 10/11] fuse: Allow user namespace mounts Date: Fri, 22 Dec 2017 15:32:34 +0100 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Seth Forshee To be able to mount fuse from non-init user namespaces, it's necessary to set FS_USERNS_MOUNT flag to fs_flags. Patch v4 is available: https://patchwork.kernel.org/patch/8944681/ Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Miklos Szeredi Signed-off-by: Seth Forshee [dongsu: add a simple commit messasge] Signed-off-by: Dongsu Park Reviewed-by: Serge Hallyn --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 7f6b2e55..8c98edee 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1212,7 +1212,7 @@ static void fuse_kill_sb_anon(struct super_block *sb) static struct file_system_type fuse_fs_type = { .owner = THIS_MODULE, .name = "fuse", - .fs_flags = FS_HAS_SUBTYPE, + .fs_flags = FS_HAS_SUBTYPE | FS_USERNS_MOUNT, .mount = fuse_mount, .kill_sb = fuse_kill_sb_anon, }; @@ -1244,7 +1244,7 @@ static struct file_system_type fuseblk_fs_type = { .name = "fuseblk", .mount = fuse_mount_blk, .kill_sb = fuse_kill_sb_blk, - .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE, + .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE | FS_USERNS_MOUNT, }; MODULE_ALIAS_FS("fuseblk");