{"id":811272,"url":"http://patchwork.ozlabs.org/api/1.2/patches/811272/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-mtd/patch/20170908001204.18174-3-mhalcrow@google.com/","project":{"id":3,"url":"http://patchwork.ozlabs.org/api/1.2/projects/3/?format=json","name":"Linux MTD development","link_name":"linux-mtd","list_id":"linux-mtd.lists.infradead.org","list_email":"linux-mtd@lists.infradead.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170908001204.18174-3-mhalcrow@google.com>","list_archive_url":null,"date":"2017-09-08T00:12:03","name":"[2/3] F2FS crypto: Return -EXDEV for link, rename, and cross-rename between incompat contexts","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"43c1b7a174d57364e2f64d1e79fdf9ce4c864456","submitter":{"id":64496,"url":"http://patchwork.ozlabs.org/api/1.2/people/64496/?format=json","name":"Michael Halcrow","email":"mhalcrow@google.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-mtd/patch/20170908001204.18174-3-mhalcrow@google.com/mbox/","series":[{"id":2078,"url":"http://patchwork.ozlabs.org/api/1.2/series/2078/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-mtd/list/?series=2078","date":"2017-09-08T00:12:01","name":"fscrypto: Return -EXDEV for link, rename, and cross-rename between incompat contexts","version":1,"mbox":"http://patchwork.ozlabs.org/series/2078/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811272/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811272/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"F4hHvHWg\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"Ice0QMtg\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpHrX23Nsz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 10:14:52 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dq6wX-0008RD-D4; Fri, 08 Sep 2017 00:14:45 +0000","from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dq6un-0006o5-DR\n\tfor linux-mtd@lists.infradead.org; Fri, 08 Sep 2017 00:13:00 +0000","by mail-pg0-x234.google.com with SMTP id 188so2116140pgb.2\n\tfor <linux-mtd@lists.infradead.org>;\n\tThu, 07 Sep 2017 17:12:35 -0700 (PDT)","from mhalcrow-linux.kir.corp.google.com ([100.66.175.61])\n\tby smtp.gmail.com with ESMTPSA id\n\td25sm1007805pfb.1.2017.09.07.17.12.34\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 07 Sep 2017 17:12:34 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=37dqEE+7VrnzOaJDb43WczJq9s+sb4KVHaJk1y0djEw=;\n\tb=F4hHvHWgCSJ5vhYXzMJpXR4P7Q\n\tpc6e+IlbdGJi2qNuiI206o2TSmAqvHZ4zzz7FxncBgkYICFnS62DI5ar9welflBv0bjWQoJes729l\n\t2dSTmrPcNinjD7aW4e1uDhOLMCFUefR8LuuKgubNfI46aezDeqbuZCtNYKEjHG0vo5Hi3Hgdb7klE\n\twhOrQg0k/IdJsGZDHkwi/bQlbdGWvGfQlxECTf4PpUpBp59YTbW/8HfAb+Iavia9vf/OnUyEi/Wzt\n\tEKBOrOu2PGfw8Ziw9r2/enfRCasE31vCFIGyuPy5usmlju9iFrBIMZ+HJVhClPW5uwD5SSUM04lmE\n\tcgvq+ekw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=VzkLSlJeRYCLVLtHBOnDTxgB9u1PqKbInpwTOtVP8ew=;\n\tb=Ice0QMtgOPM3VaTp8Vrr2EfumHDDeKVnQCPZKM+z5v1EPtyaytZX/2fg1wehZzUuz8\n\tBPO6+BseSzrqBbJuc/4/GAc2Bi/YNF1G6jaAU0ycfCOho/7TjQvKfIMtLHcDpYjXQ4cj\n\t9+7dTFrtUmFoa1S9H6BkPUXMpcieioONW+UaT0P4bFgYAW5n8kWItpTfS3Tjm60njQRt\n\tRV3WV9Kn0o+tjlHFo16o9XhyQ7XrBrXcpLetzGEfzbCBhXNyH8WNY70ST6EmFAi5OqnF\n\tAlzumS3TqwfrOIdnJ9lfDUWhAOnKgJrL1YcvWORyRdzn7aIUprEortQK9uKqvyciiNeI\n\tDALA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=VzkLSlJeRYCLVLtHBOnDTxgB9u1PqKbInpwTOtVP8ew=;\n\tb=aH5Xv/vWLvCotbMV3z5aFNQRXRPDeTO450T5XC+2bRaQKsF/t5a+xlyvNWZTXSBc0g\n\t5le4mG0wdrkVC/v9GxvFtJ3hnwYDMuyUwl9+P9Dm6y8pEPVMe0VToMMw3Cc3j7x5R0z+\n\tO9wDKjb5BTsTcVKd/yHESlzXM/bD9Ynn/yXj9voDNV4Nuvk0x2uUCcpSomDCZeU8whY6\n\thEuVDiuSDUrciJahSYp25/mj/vsi0IpUzB562onIpq6IrMnMLpzqQkaFWk0yJHwNgFzP\n\tH/suttoihdvRZU/3WSwfDbyc/OhELY++sMwam32Kwq/CS47TQ+NvUDaPDCE+hRBcf01f\n\tpfNQ==","X-Gm-Message-State":"AHPjjUi0U8GGQpmecJoVyItVRAJTlHnfERXhuu9OjrMFT6xFMeZNkefu\n\tyjLpIVh2KjtQbuab","X-Google-Smtp-Source":"ADKCNb77OBNGz8iqrYgB9/+r49OFHEniG2dVLtNf2S2/yzWYKxQ7LZeRnjSt29F8cd6gPZLVWnb7kA==","X-Received":"by 10.98.15.208 with SMTP id 77mr1189693pfp.318.1504829555043;\n\tThu, 07 Sep 2017 17:12:35 -0700 (PDT)","From":"Michael Halcrow <mhalcrow@google.com>","To":"linux-fscrypt@vger.kernel.org","Subject":"[PATCH 2/3] F2FS crypto: Return -EXDEV for link, rename,\n\tand cross-rename between incompat contexts","Date":"Thu,  7 Sep 2017 17:12:03 -0700","Message-Id":"<20170908001204.18174-3-mhalcrow@google.com>","X-Mailer":"git-send-email 2.14.1.581.gf28d330327-goog","In-Reply-To":"<20170908001204.18174-1-mhalcrow@google.com>","References":"<20170908001204.18174-1-mhalcrow@google.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170907_171257_628365_6A4198AA ","X-CRM114-Status":"UNSURE (   8.71  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"0.5 (/)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (0.5 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c05:0:0:0:234 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t2.5 SUSPICIOUS_RECIPS      Similar addresses in recipient list\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org,\n\tlinux-ext4@vger.kernel.org, tytso@mit.edu,\n\tlinux-f2fs-devel@lists.sourceforge.net","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"Gives user space the opportunity to fall back to copy-and-delete.\n\nSigned-off-by: Michael Halcrow <mhalcrow@google.com>\n---\n fs/f2fs/namei.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)","diff":"diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c\nindex 760d85223c81..689c671cf8b8 100644\n--- a/fs/f2fs/namei.c\n+++ b/fs/f2fs/namei.c\n@@ -202,7 +202,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,\n \n \tif (f2fs_encrypted_inode(dir) &&\n \t\t\t!fscrypt_has_permitted_context(dir, inode))\n-\t\treturn -EPERM;\n+\t\treturn -EXDEV;\n \n \terr = dquot_initialize(dir);\n \tif (err)\n@@ -720,7 +720,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,\n \n \tif ((old_dir != new_dir) && f2fs_encrypted_inode(new_dir) &&\n \t\t\t!fscrypt_has_permitted_context(new_dir, old_inode)) {\n-\t\terr = -EPERM;\n+\t\terr = -EXDEV;\n \t\tgoto out;\n \t}\n \n@@ -910,7 +910,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,\n \t\t\t(old_dir != new_dir) &&\n \t\t\t(!fscrypt_has_permitted_context(new_dir, old_inode) ||\n \t\t\t !fscrypt_has_permitted_context(old_dir, new_inode)))\n-\t\treturn -EPERM;\n+\t\treturn -EXDEV;\n \n \terr = dquot_initialize(old_dir);\n \tif (err)\n","prefixes":["2/3"]}