Scenario: booting from a read-only nfsroot share by using a tmpfs overlay
This is used e.g. by the fai package, which uses the live-boot package to create such an initramfs.
Test Case:
modprobe overlayfs
mkdir /tmp/live /tmp/root
mount -t nfs -o ro 192.168.42.40:/srv/fai/nfsroot.quantal64 /mnt
mount -t overlayfs -o noatime,lowerdir=/mnt,upperdir=/tmp/live overlayfs /tmp/root
# the mount command succeeds! - However using the mount point breaks:
# find /tmp/root
/tmp/root
Killed
Scenario: booting from a read-only nfsroot share by using a tmpfs overlay
This is used e.g. by the fai package, which uses the live-boot package to create such an initramfs.
Test Case:
modprobe overlayfs 42.40:/ srv/fai/ nfsroot. quantal64 /mnt lowerdir= /mnt,upperdir= /tmp/live overlayfs /tmp/root
mkdir /tmp/live /tmp/root
mount -t nfs -o ro 192.168.
mount -t overlayfs -o noatime,
# the mount command succeeds! - However using the mount point breaks:
# find /tmp/root
/tmp/root
Killed
Dmesg shows this kernel trace: a71>] nfs_lookup_ revalidate+ 0x21/0x3a0 [nfs] codec_realtek snd_hda_intel snd_hda_codec i915 snd_hwdep snd_pcm drm_kms_helper snd_seq_midi drm coretemp snd_rawmidi snd_seq_midi_event snd_seq snd_timer kvm_intel snd_seq_device i2c_algo_bit kvm snd hid_generic tpm_infineon soundcore snd_page_alloc mei lpc_ich video microcode tpm_tis mac_hid ppdev parport_pc parport serio_raw nfsd nfs lockd fscache auth_rpcgss nfs_acl binfmt_misc sunrpc psmouse usbhid hid usbkbd raid10 raid456 async_pq async_xor xor async_memcpy async_raid6_recov usb_storage e1000e floppy raid6_pq async_tx raid1 raid0 multipath linear ffffffffa01a2a7 1>] [<ffffffffa01a2 a71>] nfs_lookup_ revalidate+ 0x21/0x3a0 [nfs] 773b48 EFLAGS: 00010286 0(0000) GS:ffff88010dc8 0000(0000) knlGS:000000000 0000000 79c>] __lookup_ hash+0xac/ 0x120 606>] lookup_ one_len+ 0xd6/0x110 b17>] ovl_lookup+ 0x187/0x3d0 [overlayfs] 8ee>] ? _raw_spin_ lock+0xe/ 0x20 751>] __lookup_ hash+0x61/ 0x120 af9>] ? lookup_ fast+0x219/ 0x310 78e>] lookup_ slow+0x47/ 0xab d48>] path_lookupat+ 0x6f8/0x720 692>] ? nfs_readdir+ 0x322/0x510 [nfs] d81>] ? kmem_cache_ alloc+0x31/ 0x130 da1>] do_path_ lookup+ 0x31/0xc0 9a3>] ? getname_ flags+0x53/ 0xf0 90d>] user_path_ at_empty+ 0x5d/0xa0 35f>] ? mntput_ no_expire+ 0x10f/0x160 3d4>] ? mntput+0x24/0x40 04c>] ? kfree+0x2c/0x110 961>] user_path_ at+0x11/ 0x20 a75>] vfs_fstatat+ 0x35/0x70 3d4>] ? mntput+0x24/0x40 2f2>] ? fput+0x1a2/0x260 d9a>] sys_newfstatat+ 0x1a/0x40 856>] ? filp_close+ 0x66/0xa0 cfe>] ? sys_close+ 0x9e/0x100 b69>] system_ call_fastpath+ 0x16/0x1b a71>] nfs_lookup_ revalidate+ 0x21/0x3a0 [nfs]
Aug 17 14:58:04 faui49i kernel: [ 1071.305101] BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
Aug 17 14:58:04 faui49i kernel: [ 1071.306733] IP: [<ffffffffa01a2
Aug 17 14:58:04 faui49i kernel: [ 1071.308449] PGD c5697067 PUD c570c067 PMD 0
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Oops: 0000 [#1] SMP
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] CPU 1
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Modules linked in: overlayfs autofs4 bnep rfcomm bluetooth lp snd_hda_codec_hdmi snd_hda_
Aug 17 14:58:04 faui49i kernel: [ 1071.309061]
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Pid: 3543, comm: find Not tainted 3.5.0-10-generic #10-Ubuntu FUJITSU ESPRIMO P7935 /D2812-A2
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RIP: 0010:[<
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RSP: 0018:ffff8800c5
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RAX: ffffffffa01cf580 RBX: ffff8800c5dc4b40 RCX: 0000000000000020
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RDX: ffff8800c5dc4038 RSI: 0000000000000000 RDI: ffff8800c5dc4b40
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RBP: ffff8800c5773b88 R08: 656c6f006576696c R09: 0000000000000000
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] R10: ffff8800c5dc4b40 R11: ffffffffa01b5aa0 R12: ffff8800cb6cc600
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] R13: ffff8800c5773bd8 R14: 0000000000000000 R15: 0000000000000000
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] FS: 00007f42c1f2d70
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] CR2: 0000000000000038 CR3: 00000000cb26b000 CR4: 00000000000407e0
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Process find (pid: 3543, threadinfo ffff8800c5772000, task ffff8800cb340000)
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Stack:
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] 0000000000000000 0000000000000000 ffff8800c5773b88 ffff8800c5dc4b40
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] ffff8800cb6cc600 ffff8800c5773bd8 0000000000000000 0000000000000000
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] ffff8800c5773bc8 ffffffff8118c79c 0000000000000000 ffff8800c5dc403c
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Call Trace:
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8118c
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8118d
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffffa0498
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81680
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8118c
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8118e
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81676
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81190
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffffa01a2
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8116d
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81190
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8118c
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81191
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff811a0
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff811a0
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8116e
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81191
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81186
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff811a0
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81183
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81186
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8117f
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff8117f
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] [<ffffffff81688
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] Code: ff ff 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 40 48 89 5d d8 4c 89 65 e0 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 66 66 66 66 90 <f6> 46 38 40 b8 f6 ff ff ff 49 89 fd 49 89 f7 0f 85 c4 00 00 00
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RIP [<ffffffffa01a2
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] RSP <ffff8800c5773b48>
Aug 17 14:58:04 faui49i kernel: [ 1071.309061] CR2: 0000000000000038
Aug 17 14:58:04 faui49i kernel: [ 1071.524837] ---[ end trace ec832cdfc17d33d8 ]---