From patchwork Tue Apr 11 09:50:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 749388 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w2Mmp65lrz9s8M for ; Tue, 11 Apr 2017 19:52:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PxFS7BE0"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RU5OdZceJhWkWHGSoL3pPt2d6W4tDal3VH7mm92cOGM=; b=PxFS7BE0ZG5cfIYOEGTg9TsOPH hxQxtnnjPFkt6MUVqEnydhBBaoHlBNM/80ke1CGtkhlU+TCO/N6PFKa3lk6r/n6CznqAKH7qNIMzV NukKZrUxYJbLtB49TtSo8xJq9bH+dtAZbtMIiTgxrxWc0z1zF7ZpQSDadQ/6dhziaIJg5lsJvoO6M y06L1vssGFsEhwX6y/FLbSqV/t/YgnL3CJnxkJrSNjjDJQo4O+0T2KHwdVzKgyAXsUdKNnh2ybDWU Sh879BeyD0s1KDv9cq1ItwcOURu+4/MQf/jcJ51Xh8y2yCoK55AE2ZwBzsW6IjNrpEeBTMX9HsR0t RC7oVYQQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cxsTn-00079a-7g; Tue, 11 Apr 2017 09:52:55 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cxsSQ-0006Vj-QT for linux-mtd@lists.infradead.org; Tue, 11 Apr 2017 09:51:33 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cxsS2-0002iE-3q; Tue, 11 Apr 2017 11:51:06 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.88) (envelope-from ) id 1cxsS1-00006N-PX; Tue, 11 Apr 2017 11:51:05 +0200 From: Oleksij Rempel To: richard@nod.at, dedekind1@gmail.com, adrian.hunter@intel.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Date: Tue, 11 Apr 2017 11:50:55 +0200 Message-Id: <20170411095055.26328-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170411095055.26328-1-o.rempel@pengutronix.de> References: <20170411095055.26328-1-o.rempel@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170411_025131_084632_12FD59D4 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oleksij Rempel , Steffen Trumtrar MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Steffen Trumtrar This is need to provide uuid based integrity functionlity for: imy_policy (fsuuid option) and evmctl (--uuid option). Signed-off-by: Steffen Trumtrar Signed-off-by: Oleksij Rempel Reviewed-by: Amir Goldstein --- fs/ubifs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index bff1e8d6f7bd..a584b2f2b11d 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2077,6 +2077,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) err = -ENOMEM; goto out_umount; } + memcpy(&sb->s_uuid, &c->uuid, sizeof(c->uuid)); mutex_unlock(&c->umount_mutex); return 0;