Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356288

Re: ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Daniel Axtens <dja@axtens.net>
Newsgroups linux.kernel
Subject Re: ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker
Date Sat, 12 Mar 2016 00:40:02 +0100
Message-ID <rbEP0-5kn-7@gated-at.bofh.it> (permalink)
References <rbjrc-6to-11@gated-at.bofh.it> <rbkQi-7DU-9@gated-at.bofh.it> <rbxku-8dl-19@gated-at.bofh.it>
X-Original-To Miklos Szeredi <miklos@szeredi.hu>, Theodore Ts'o <tytso@mit.edu>, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, viro@zeniv.linux.org.uk, linux-unionfs@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=xMvju34xNgn2h7D6pU2qgF7MYr50FDHR8DPvP+GvufI=; b=ldsUA4zZJCjE0qom1CAYPAy+Ap2RQJrqcYqcNvDk3o+iy1U49wiMNpiIISj0kNjDPl a47Xn7AYadgvd7q/UWSz9Sms7rh+CIGKxxkQvTcwy7J/gzL61GEncxOva75d9FZwzOgU xGfQK8JnJwYgr+oAAUmsQyTGc6wmACqlbsdNw=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=xMvju34xNgn2h7D6pU2qgF7MYr50FDHR8DPvP+GvufI=; b=knt0U7DiolvE7OMtAxIzVBPRIK2VVPgg9iplsHKY6VLDlvvmSyr/Ur0n412mSyoXG2 HvzeZKp06k62gnKlw3flUpakNoJU8+MVEjQW7ugbGUa6OceKPlYcUhApq19VE64iTrZV JwJp7PQsR/ijOAatSi+J6d1S18oryD/x4Xv5bAlvoqfCzIsCfpp43FGEPBCH03xtVSV2 qz1jnK/HBdXHmXOIEiYnNHx7sCmGqO4j/kAPNqyQgbnse6KN9ovyV7MnO7Th9E6sSBnP kb2sDW4izx7aPdmNBOI10J6sm8KF8XGkY1uHPpyBanC8fDH5nD+e61mu7nq0MWadOlBc o0UQ==
X-Gm-Message-State AD7BkJIl90awrlHdIRQIyNVqsEa/IBNakLFc8yGMrIw8ZZfH8za6igHiorAViYPYDaII0Q==
X-Received by 10.66.154.233 with SMTP id vr9mr19841123pab.66.1457739136252; Fri, 11 Mar 2016 15:32:16 -0800 (PST)
User-Agent Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 75
Organization linux.* mail to news gateway
X-Original-Date Sat, 12 Mar 2016 10:32:05 +1100
X-Original-Message-ID <8760ws3822.fsf@gamma.ozlabs.ibm.com>
X-Original-References <87io0t3ks9.fsf@gamma.ozlabs.ibm.com> <20160311021506.GA32214@thunk.org> <20160311153403.GJ8655@tucsk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1356288

Show key headers only | View raw


Hi Miklos,

> Could you please try the following patch?
>
> It adds more sanity checks to unlink/rmdir/rename to prevent passing an
> inappropriate dentry to the underlying filesystem, which could have caused the
> corruption.

I've tested with your patch.

I'm still seeing similar errors but anecdotally I seem to be seeing them
at a significantly reduced rate. (I can check properly if the rate
changes if that helps.)

Errors are still like this: (I applied Ted's debug info stuff on top of
your patch)

[  246.364767] EXT4-fs warning (device sda2): ext4_file_open:388: Inconsistent encryption contexts: 49318/2952405
[  246.364767] 
[  246.365000] pathname: /home/dja/kernel/overlay/linux/include/dt-bindings/dma/nbpfaxi.h
[  246.365170] inode flags: 48000080000
[  246.365255] ------------[ cut here ]------------
[  246.365346] WARNING: at /scratch/dja/linux/fs/ext4/file.c:393
[  246.365460] Modules linked in: ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack x_tables nf_nat nf_conntrack br_netfilter bridge stp llc overlay
[  246.366086] CPU: 4 PID: 2780 Comm: tar Tainted: G        W       4.5.0-rc7-00219-gc253bd0 #10
[  246.366252] task: c0000003e5fd5500 ti: c0000003ec0bc000 task.ti: c0000003ec0bc000
[  246.366393] NIP: c0000000005f949c LR: c0000000005f9498 CTR: c0000000000d7410
[  246.366535] REGS: c0000003ec0bf360 TRAP: 0700   Tainted: G        W        (4.5.0-rc7-00219-gc253bd0)
[  246.366713] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28888828  XER: 00000000
[  246.367073] CFAR: c00000000116faac SOFTE: 1 
GPR00: c0000000005f9498 c0000003ec0bf5e0 c000000002c06500 0000000000000018 
GPR04: 0000000000000001 c0000000001f15a0 0000000000000000 0000000000000001 
GPR08: 0000000000000007 0000000000000000 0000000000000001 646e69622d74642f 
GPR12: 0000000000008800 c00000000fb82400 00000000000081a4 0000000088000000 
GPR16: c00000029829e220 0000000000000000 0000000000000000 c0000003f311b810 
GPR20: c0000003e5fd5500 0000000000000000 0000000000000000 c0000000025fce38 
GPR24: 0000000000000001 c0000002982fb270 c0000003f8e0f000 c0000003e98ff420 
GPR28: c0000003f8e0e000 c000000298300000 c0000003f311b800 c0000002982fb098 
[  246.368951] NIP [c0000000005f949c] ext4_file_open+0x34c/0x4a0
[  246.369068] LR [c0000000005f9498] ext4_file_open+0x348/0x4a0
[  246.369184] Call Trace:
[  246.369238] [c0000003ec0bf5e0] [c0000000005f9498] ext4_file_open+0x348/0x4a0 (unreliable)
[  246.369404] [c0000003ec0bfae0] [c0000000004c5c04] do_dentry_open+0x2e4/0x590
[  246.369547] [c0000003ec0bfb50] [c0000000004ea0bc] path_openat+0x9ac/0x1f10
[  246.369689] [c0000003ec0bfc80] [c0000000004ed9d8] do_filp_open+0xa8/0x1a0
[  246.369836] [c0000003ec0bfdc0] [c0000000004c87e0] do_sys_open+0x1b0/0x340
[  246.369982] [c0000003ec0bfe30] [c000000000009210] system_call+0x38/0xb4
[  246.370123] Instruction dump:
[  246.370195] 419d0014 3c62fe83 38630408 48b76575 60000000 2fbf01f0 41de0150 e89ffe60 
[  246.370445] 3c62fe83 38630418 48b76559 60000000 <0fe00000> 3860ffff 4bfffdd4 60000000 
[  246.370715] ---[ end trace befd0478e64e65a3 ]---


There doesn't seem to be any pattern to the broken directories - here's
a snippet of the tar output:
tar: linux/include/dt-bindings/dma/axi-dmac.h: Cannot open: Operation not permitted
tar: linux/include/dt-bindings/dma/sun4i-a10.h: Cannot open: Operation not permitted
tar: linux/include/dt-bindings/dma/at91.h: Cannot open: Operation not permitted
tar: linux/include/dt-bindings/dma/nbpfaxi.h: Cannot open: Operation not permitted
tar: linux/include/soc/at91/at91sam9_sdramc.h: Cannot open: Operation not permitted
tar: linux/include/soc/at91/at91sam9_ddrsdr.h: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/hysdn_pof.h: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/Makefile: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/hysdn_net.c: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/hysdn_defs.h: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/boardergo.c: Cannot open: Operation not permitted
tar: linux/drivers/isdn/hysdn/hysdn_init.c: Cannot open: Operation not permitted

The set of broken directories seems to be somewhat consistent if I rerun
the command within the same overlay mount (especially the first couple
of directories), but if I unmount the overlay, clean the upper and work
directories, and remount it, the set of broken directories is different.

Regards,
Daniel

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker Daniel Axtens <dja@axtens.net> - 2016-03-11 01:50 +0100
  Re: ext4_file_open: Inconsistent encryption contexts (commit  ff978b09f973) breaking Docker Theodore Ts'o <tytso@mit.edu> - 2016-03-11 03:20 +0100
    Re: ext4_file_open: Inconsistent encryption contexts (commit  ff978b09f973) breaking Docker Miklos Szeredi <miklos@szeredi.hu> - 2016-03-11 16:40 +0100
      Re: ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker Daniel Axtens <dja@axtens.net> - 2016-03-12 00:40 +0100
      Re: ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker Daniel Axtens <dja@axtens.net> - 2016-03-14 07:50 +0100
        Re: ext4_file_open: Inconsistent encryption contexts (commit  ff978b09f973) breaking Docker Miklos Szeredi <miklos@szeredi.hu> - 2016-03-14 11:30 +0100
          Re: ext4_file_open: Inconsistent encryption contexts (commit ff978b09f973) breaking Docker Daniel Axtens <dja@axtens.net> - 2016-03-14 23:50 +0100

csiph-web