linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: David Howells <dhowells@redhat.com>
Cc: viro@zeniv.linux.org.uk, torvalds@linux-foundation.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11]
Date: Tue, 11 Sep 2018 10:46:41 -0700	[thread overview]
Message-ID: <20180911174641.GA15149@roeck-us.net> (raw)
In-Reply-To: <153313714181.13253.304098108512966976.stgit@warthog.procyon.org.uk>

On Wed, Aug 01, 2018 at 04:25:41PM +0100, David Howells wrote:
> Implement a filesystem context concept to be used during superblock
> creation for mount and superblock reconfiguration for remount.
> 
> The mounting procedure then becomes:
> 
>  (1) Allocate new fs_context context.
> 
>  (2) Configure the context.
> 
>  (3) Create superblock.
> 
>  (4) Query the superblock.
> 
>  (5) Create a mount for the superblock.
> 
>  (6) Destroy the context.
> 
> Rather than calling fs_type->mount(), an fs_context struct is created and
> fs_type->init_fs_context() is called to set it up.  Pointers exist for the
> filesystem and LSM to hang their private data off.
> 
> A set of operations has to be set by ->init_fs_context() to provide
> freeing, duplication, option parsing, binary data parsing, validation,
> mounting and superblock filling.
> 
> Legacy filesystems are supported by the provision of a set of legacy
> fs_context operations that build up a list of mount options and then invoke
> fs_type->mount() from within the fs_context ->get_tree() operation.  This
> allows all filesystems to be accessed using fs_context.
> 
> It should be noted that, whilst this patch adds a lot of lines of code,
> there is quite a bit of duplication with existing code that can be
> eliminated should all filesystems be converted over.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>

I don't find a more recent version of this patch in patchwork on kernel.org,
so I am replying to this one. My apologies if there are more recent versions.

This patch is causing widespread crashes in next-20180910 and next-20180911.
Example and bisect log (for x86_64) attached.

Guenter

---
Rebooting.
[    4.894299] random: dd: uninitialized urandom read (512 bytes read)
[    5.055206] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
[    5.055518] PGD 800000000c025067 P4D 800000000c025067 PUD c7a3067 PMD 0 
[    5.055941] Oops: 0000 [#1] SMP PTI
[    5.056191] CPU: 0 PID: 1208 Comm: umount Not tainted 4.19.0-rc3-next-20180911 #1
[    5.056367] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014
[    5.057003] RIP: 0010:reconfigure_super+0x47/0x210
[    5.057214] Code: d4 01 00 00 44 8b a3 30 02 00 00 45 85 e4 0f 85 9d 01 00 00 a8 01 48 89 fd 75 4f 48 89 df 45 31 ed e8 ad 4f 01 00 48 8b 45 00 <48> 8b 40 30 48 85 c0 0f 84 d3 00 00 00 48 89 ef ff d0 85 c0 0f 84
[    5.057573] RSP: 0018:ffffa8560011bdd0 EFLAGS: 00000246
[    5.057709] RAX: 0000000000000000 RBX: ffffa2cd4c72c000 RCX: ffffa2cd4c72c0b8
[    5.057850] RDX: ffffa2cd4c72c048 RSI: 0000000000000000 RDI: ffffffff98b49e28
[    5.057991] RBP: ffffa8560011be00 R08: 000000000000019b R09: 0000000000000000
[    5.058132] R10: ffffa856000bfd08 R11: 0000000000000001 R12: 0000000000000000
[    5.058274] R13: 0000000000000001 R14: ffffa2cd4f38f920 R15: 0000000000000000
[    5.058451] FS:  00007fa2f1a15500(0000) GS:ffffa2cd4f600000(0000) knlGS:0000000000000000
[    5.059178] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.059302] CR2: 0000000000000030 CR3: 000000000c7b4000 CR4: 00000000003406f0
[    5.059496] Call Trace:
[    5.060118]  do_umount_root+0x7b/0xb0
[    5.060244]  ksys_umount+0x250/0x3e0
[    5.060345]  ? vfs_write+0x13f/0x190
[    5.060439]  __x64_sys_umount+0xd/0x10
[    5.060537]  do_syscall_64+0x39/0xe0
[    5.060635]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    5.060874] RIP: 0033:0x7fa2f1534b47
[    5.060970] Code: 73 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 11 73 2b 00 f7 d8 64 89 01 48
[    5.061311] RSP: 002b:00007ffeb7926e68 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
[    5.061478] RAX: ffffffffffffffda RBX: 0000000000d078e0 RCX: 00007fa2f1534b47
[    5.061612] RDX: 00007ffeb7927050 RSI: 0000000000000000 RDI: 0000000000d078e0
[    5.061744] RBP: 0000000000d07b40 R08: 0000000000d07920 R09: 00007fa2f15726c0
[    5.061875] R10: 000000000000089e R11: 0000000000000206 R12: 0000000000d078a0
[    5.062006] R13: 0000000000d07ba0 R14: 0000000000000000 R15: 00007ffeb7927050
[    5.062188] Modules linked in:
[    5.062375] CR2: 0000000000000030
[    5.062675] ---[ end trace c42a74534e5e2f3f ]---
[    5.062816] RIP: 0010:reconfigure_super+0x47/0x210
[    5.062924] Code: d4 01 00 00 44 8b a3 30 02 00 00 45 85 e4 0f 85 9d 01 00 00 a8 01 48 89 fd 75 4f 48 89 df 45 31 ed e8 ad 4f 01 00 48 8b 45 00 <48> 8b 40 30 48 85 c0 0f 84 d3 00 00 00 48 89 ef ff d0 85 c0 0f 84
[    5.063263] RSP: 0018:ffffa8560011bdd0 EFLAGS: 00000246
[    5.063372] RAX: 0000000000000000 RBX: ffffa2cd4c72c000 RCX: ffffa2cd4c72c0b8
[    5.063526] RDX: ffffa2cd4c72c048 RSI: 0000000000000000 RDI: ffffffff98b49e28
[    5.063665] RBP: ffffa8560011be00 R08: 000000000000019b R09: 0000000000000000
[    5.063797] R10: ffffa856000bfd08 R11: 0000000000000001 R12: 0000000000000000
[    5.063928] R13: 0000000000000001 R14: ffffa2cd4f38f920 R15: 0000000000000000
[    5.064060] FS:  00007fa2f1a15500(0000) GS:ffffa2cd4f600000(0000) knlGS:0000000000000000
[    5.064224] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.064337] CR2: 0000000000000030 CR3: 000000000c7b4000 CR4: 00000000003406f0

---

# bad: [09c0888767529cdb382f34452819e42d1a66a114] Add linux-next specific files for 20180911
# good: [11da3a7f84f19c26da6f86af878298694ede0804] Linux 4.19-rc3
git bisect start 'HEAD' 'v4.19-rc3'
# bad: [a2ebc71cf97bed9b453318418e4a281434565e8b] Merge remote-tracking branch 'nfc-next/master'
git bisect bad a2ebc71cf97bed9b453318418e4a281434565e8b
# good: [6fde463b32bf4105c28c0a297a5b66aca5d6ecd4] Merge remote-tracking branch 's390/features'
git bisect good 6fde463b32bf4105c28c0a297a5b66aca5d6ecd4
# bad: [136fd6d530a3ae0dd003984f683345cfe88c01f3] Merge remote-tracking branch 'v4l-dvb/master'
git bisect bad 136fd6d530a3ae0dd003984f683345cfe88c01f3
# good: [c7ae95368af43c08f5f615b00f2f7bf2e9c45788] Merge remote-tracking branch 'v9fs/9p-next'
git bisect good c7ae95368af43c08f5f615b00f2f7bf2e9c45788
# good: [4c640c41381e47b328c6507bcf534812761256cd] Merge branch 'for-4.19/fixes' into for-next
git bisect good 4c640c41381e47b328c6507bcf534812761256cd
# bad: [5bc91f70c5ecc2bc5967b98ce7fa4e55ad230d99] Merge remote-tracking branch 'hid/for-next'
git bisect bad 5bc91f70c5ecc2bc5967b98ce7fa4e55ad230d99
# bad: [88abb54c46648cf25930133fbdeb145bf8537673] vfs: syscall: Add fsconfig() for configuring and managing a context
git bisect bad 88abb54c46648cf25930133fbdeb145bf8537673
# good: [b2bbd433151748c5268769f560c926343dece319] vfs: Separate changing mount flags full remount
git bisect good b2bbd433151748c5268769f560c926343dece319
# bad: [b348b6230aac28ffe555000831966d45529ab3b0] kernfs, sysfs, cgroup, intel_rdt: Support fs_context
git bisect bad b348b6230aac28ffe555000831966d45529ab3b0
# bad: [bf090f3c0282903ad55bca27a482180c70627bd5] procfs: Move proc_fill_super() to fs/proc/root.c
git bisect bad bf090f3c0282903ad55bca27a482180c70627bd5
# bad: [d3f3eaba540acf5b521865dec5634e3a1e138f1d] vfs: Remove unused code after filesystem context changes
git bisect bad d3f3eaba540acf5b521865dec5634e3a1e138f1d
# bad: [5d5eb529715b5a7a4caf10825e2a330608dcd1ef] vfs: Implement a filesystem superblock creation/configuration context
git bisect bad 5d5eb529715b5a7a4caf10825e2a330608dcd1ef
# first bad commit: [5d5eb529715b5a7a4caf10825e2a330608dcd1ef] vfs: Implement a filesystem superblock creation/configuration context

  reply	other threads:[~2018-09-11 17:46 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 15:23 [PATCH 00/33] VFS: Introduce filesystem context [ver #11] David Howells
2018-08-01 15:24 ` [PATCH 01/33] vfs: syscall: Add open_tree(2) to reference or clone a mount " David Howells
2018-08-02 17:31   ` Alan Jenkins
2018-08-02 21:29     ` Al Viro
2018-08-02 21:51   ` David Howells
2018-08-02 23:46     ` Alan Jenkins
2018-08-01 15:24 ` [PATCH 02/33] vfs: syscall: Add move_mount(2) to move mounts around " David Howells
2018-08-01 15:24 ` [PATCH 03/33] teach move_mount(2) to work with OPEN_TREE_CLONE " David Howells
2018-10-12 14:25   ` Alan Jenkins
2018-08-01 15:24 ` [PATCH 04/33] vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled " David Howells
2018-08-01 15:24 ` [PATCH 05/33] vfs: Introduce the basic header for the new mount API's filesystem context " David Howells
2018-08-01 15:24 ` [PATCH 06/33] vfs: Introduce logging functions " David Howells
2018-08-01 15:24 ` [PATCH 07/33] vfs: Add configuration parser helpers " David Howells
2018-08-01 15:24 ` [PATCH 08/33] vfs: Add LSM hooks for the new mount API " David Howells
2018-08-01 20:50   ` James Morris
2018-08-01 22:53   ` David Howells
2018-08-01 15:25 ` [PATCH 09/33] selinux: Implement the new mount API LSM hooks " David Howells
2018-08-01 15:25 ` [PATCH 10/33] smack: Implement filesystem context security " David Howells
2018-08-01 15:25 ` [PATCH 11/33] apparmor: Implement security hooks for the new mount API " David Howells
2018-08-01 15:25 ` [PATCH 12/33] tomoyo: " David Howells
2018-08-01 15:25 ` [PATCH 13/33] vfs: Separate changing mount flags full remount " David Howells
2018-08-01 15:25 ` [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context " David Howells
2018-09-11 17:46   ` Guenter Roeck [this message]
2018-09-11 21:52   ` David Howells
2018-09-11 22:07     ` Guenter Roeck
2018-09-11 23:17     ` David Howells
2018-09-11 23:54       ` Guenter Roeck
2018-09-18  9:07         ` Sergey Senozhatsky
2018-09-18  9:40           ` Sergey Senozhatsky
2018-09-18 14:06           ` Guenter Roeck
2018-09-19  1:12             ` Sergey Senozhatsky
2018-09-19  1:26               ` Sergey Senozhatsky
2018-09-18 15:34         ` David Howells
2018-09-18 16:39         ` David Howells
2018-09-19  1:15           ` Sergey Senozhatsky
2018-09-18 17:43         ` David Howells
2018-09-18  9:54   ` Sergey Senozhatsky
2018-09-18 15:28   ` David Howells
2018-08-01 15:25 ` [PATCH 15/33] vfs: Remove unused code after filesystem context changes " David Howells
2018-08-01 15:25 ` [PATCH 16/33] procfs: Move proc_fill_super() to fs/proc/root.c " David Howells
2018-08-01 15:26 ` [PATCH 17/33] proc: Add fs_context support to procfs " David Howells
2018-08-01 15:26 ` [PATCH 18/33] ipc: Convert mqueue fs to fs_context " David Howells
2018-08-01 15:26 ` [PATCH 19/33] cpuset: Use " David Howells
2018-08-01 15:26 ` [PATCH 20/33] kernfs, sysfs, cgroup, intel_rdt: Support " David Howells
2018-08-01 15:26 ` [PATCH 21/33] hugetlbfs: Convert to " David Howells
2018-08-01 15:26 ` [PATCH 22/33] vfs: Remove kern_mount_data() " David Howells
2018-08-01 15:26 ` [PATCH 23/33] vfs: Provide documentation for new mount API " David Howells
2018-08-01 15:26 ` [PATCH 24/33] Make anon_inodes unconditional " David Howells
2018-08-01 15:26 ` [PATCH 25/33] vfs: syscall: Add fsopen() to prepare for superblock creation " David Howells
2018-08-01 15:27 ` [PATCH 26/33] vfs: Implement logging through fs_context " David Howells
2018-08-01 15:27 ` [PATCH 27/33] vfs: Add some logging to the core users of the fs_context log " David Howells
2018-08-01 15:27 ` [PATCH 28/33] vfs: syscall: Add fsconfig() for configuring and managing a context " David Howells
2018-08-06 17:28   ` Eric W. Biederman
2018-08-09 14:14   ` David Howells
2018-08-09 14:24   ` David Howells
2018-08-09 14:35     ` Miklos Szeredi
2018-08-09 15:32     ` Eric W. Biederman
2018-08-09 16:33     ` David Howells
2018-08-11 20:20     ` David Howells
2018-08-11 23:26       ` Andy Lutomirski
2018-08-01 15:27 ` [PATCH 29/33] vfs: syscall: Add fsmount() to create a mount for a superblock " David Howells
2018-08-01 15:27 ` [PATCH 30/33] vfs: syscall: Add fspick() to select a superblock for reconfiguration " David Howells
2018-08-24 14:51   ` Miklos Szeredi
2018-08-24 14:54     ` Andy Lutomirski
2018-08-01 15:27 ` [PATCH 31/33] afs: Add fs_context support " David Howells
2018-08-01 15:27 ` [PATCH 32/33] afs: Use fs_context to pass parameters over automount " David Howells
2018-08-01 15:27 ` [PATCH 33/33] vfs: Add a sample program for the new mount API " David Howells
2018-08-10 14:05 ` BUG: Mount ignores mount options Eric W. Biederman
2018-08-10 14:36   ` Andy Lutomirski
2018-08-10 15:17     ` Eric W. Biederman
2018-08-10 15:24     ` Al Viro
2018-08-10 15:11   ` Tetsuo Handa
2018-08-10 15:13   ` David Howells
2018-08-10 15:16   ` Al Viro
2018-08-11  1:05     ` Eric W. Biederman
2018-08-11  1:46       ` Theodore Y. Ts'o
2018-08-11  4:48         ` Eric W. Biederman
2018-08-11 17:47           ` Casey Schaufler
2018-08-15  4:03             ` Eric W. Biederman
2018-08-11  1:58       ` Al Viro
2018-08-11  2:17         ` Al Viro
2018-08-11  4:43           ` Eric W. Biederman
2018-08-13 12:54         ` Miklos Szeredi
2018-08-10 15:11 ` David Howells
2018-08-10 15:39   ` Theodore Y. Ts'o
2018-08-10 15:55     ` Casey Schaufler
2018-08-10 16:11     ` David Howells
2018-08-10 18:00     ` Eric W. Biederman
2018-08-10 15:53   ` David Howells
2018-08-10 16:14     ` Theodore Y. Ts'o
2018-08-10 20:06       ` Andy Lutomirski
2018-08-10 20:46         ` Theodore Y. Ts'o
2018-08-10 22:12           ` Darrick J. Wong
2018-08-10 23:54             ` Theodore Y. Ts'o
2018-08-11  0:38               ` Darrick J. Wong
2018-08-11  1:32                 ` Eric W. Biederman
2018-08-13 16:35         ` Alan Cox
2018-08-13 16:48           ` Andy Lutomirski
2018-08-13 17:29             ` Al Viro
2018-08-13 19:00               ` James Morris
2018-08-13 19:20                 ` Casey Schaufler
2018-08-15 23:29                 ` Serge E. Hallyn
2018-08-11  0:28       ` Eric W. Biederman
2018-08-11  1:19   ` Eric W. Biederman
2018-08-11  7:29   ` David Howells
2018-08-11 16:31     ` Andy Lutomirski
2018-08-11 16:51       ` Al Viro
2018-08-15 16:31 ` Should we split the network filesystem setup into two phases? David Howells
2018-08-15 16:51   ` Andy Lutomirski
2018-08-16  3:51   ` Steve French
2018-08-16  5:06   ` Eric W. Biederman
2018-08-16 16:24     ` Steve French
2018-08-16 17:21       ` Eric W. Biederman
2018-08-16 17:23       ` Aurélien Aptel
2018-08-16 18:36         ` Steve French
2018-08-17 23:11     ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180911174641.GA15149@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).