From patchwork Thu Jan 11 19:51:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongsu Park X-Patchwork-Id: 10158421 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 D6BDE602D8 for ; Thu, 11 Jan 2018 19:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8F21285C6 for ; Thu, 11 Jan 2018 19:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD6AE28773; Thu, 11 Jan 2018 19:50:44 +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=unavailable 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 6F376285C6 for ; Thu, 11 Jan 2018 19:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935696AbeAKTul (ORCPT ); Thu, 11 Jan 2018 14:50:41 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:39746 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935676AbeAKTuj (ORCPT ); Thu, 11 Jan 2018 14:50:39 -0500 Received: by mail-wm0-f68.google.com with SMTP id i11so7577238wmf.4 for ; Thu, 11 Jan 2018 11:50:39 -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 :in-reply-to:references; bh=0nwqiCqmoSeSu5pWU0XPCWfvvpjgusTjG//bBk2YwNs=; b=J7d8bbaKhkjtlmRgcrYrJKYutLrrrSsvhwaxe2X4hINp2uDVbYbCEgXBiHn+O3+CmN ScurxYnx1g+0U7rjB3w8uR9PDDlnYm+DA43IHIgMTjPz21MKNubs/Dj/AU6QbKsiXxXy OhV6Kbo0qc8RrpzyzC6/Kn4eBjxeBgzHEvFsw= 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:in-reply-to:references; bh=0nwqiCqmoSeSu5pWU0XPCWfvvpjgusTjG//bBk2YwNs=; b=mDE1R7ahz2ODgwbwkwHtdu5yfB38fWIia3mY1onWDyy7qkof5//vdRj/zItN7wKrj7 ZRZNFxLgnVRpFMiM/eHKOAwZulGfcdy3BOGejIT5N/XQHx/PQ+frXRe1uaf9xfRn76MW IZFjOrA2vJ3iL4c86vappMOa/gZcgFsgDW9mIRrO9IOhk9J1b5av3Jm0yYAgtCivt/6V dCn/TcSatfW0x1AH11o4FA13yxjDmyCvqsqTjD0NfMqKEtTQ6Rf/9QXQe79rOnzflNDi KwGlz8EHSW4/ub7G5StBI3FRX/tB5XIlCyyeUX2rUVUwJA96gaE0kiaRvwCXtag8ulz3 YClA== X-Gm-Message-State: AKGB3mIFYpF++0isgozCbEtXZc+sxRV39zlf21XLT9LgOAQIYiaaP9ij 8cgENCAVBd/av61A4vfpd6gIKw== X-Google-Smtp-Source: ACJfBotGw7Cl0t5WQCrtnuRlJNdOlDnvNRn5w7CXFzh3aHko5Uyr4Egr8gF9F7Gh5WLXsl3r0jUafQ== X-Received: by 10.80.142.133 with SMTP id w5mr32425806edw.275.1515700238364; Thu, 11 Jan 2018 11:50:38 -0800 (PST) Received: from dberlin.localdomain ([5.28.125.168]) by smtp.gmail.com with ESMTPSA id o60sm11802823edb.79.2018.01.11.11.50.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2018 11:50:37 -0800 (PST) From: Dongsu Park To: linux-kernel@vger.kernel.org Cc: Alban Crequy , Miklos Szeredi , Mimi Zohar , Seth Forshee , Dongsu Park , linux-fsdevel@vger.kernel.org, linux-integrity@vger.kernel.org Subject: [PATCH 1/2] fs/fuse: move SUPER_MAGIC definitions to linux/magic.h Date: Thu, 11 Jan 2018 20:51:49 +0100 Message-Id: <5aa0e3c3a8d67939940b3469fdae81b9f1a0f920.1515682581.git.dongsu@kinvolk.io> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: 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 To be able to use FUSE_*SUPER_MAGIC macros in other subsystems like security/integrity/ima, we need to move the definitions from fs/fuse to include/uapi/linux/. The FUSE_*SUPER_MAGIC macros are made available to userspace in the same way as other filesystems. Cc: linux-fsdevel@vger.kernel.org Cc: linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alban Crequy Cc: Miklos Szeredi Cc: Mimi Zohar Cc: Seth Forshee Signed-off-by: Dongsu Park --- fs/fuse/control.c | 3 +-- fs/fuse/inode.c | 3 +-- include/uapi/linux/magic.h | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/fuse/control.c b/fs/fuse/control.c index b9ea99c5..9015c15c 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -10,8 +10,7 @@ #include #include - -#define FUSE_CTL_SUPER_MAGIC 0x65735543 +#include /* * This is non-NULL when the single instance of the control filesystem diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 8c98edee..57371b77 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -22,6 +22,7 @@ #include #include #include +#include MODULE_AUTHOR("Miklos Szeredi "); MODULE_DESCRIPTION("Filesystem in Userspace"); @@ -49,8 +50,6 @@ MODULE_PARM_DESC(max_user_congthresh, "Global limit for the maximum congestion threshold an " "unprivileged user can set"); -#define FUSE_SUPER_MAGIC 0x65735546 - #define FUSE_DEFAULT_BLKSIZE 512 /** Maximum number of outstanding background requests */ diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 1a6fee97..1534e99c 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h @@ -90,4 +90,7 @@ #define BALLOON_KVM_MAGIC 0x13661366 #define ZSMALLOC_MAGIC 0x58295829 +#define FUSE_CTL_SUPER_MAGIC 0x65735543 +#define FUSE_SUPER_MAGIC 0x65735546 + #endif /* __LINUX_MAGIC_H__ */