lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 Mar 2014 08:30:36 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Alexandre Demers <alexandre.f.demers@...il.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs

Long ago, sysfs used to depend on vfs data structures for internal
representation and thus needed to make a hidden mount to make them
available.  sysfs stopped depending on vfs for internal representation
long ago and 9e30cc959530 ("sysfs, kernfs: no need to kern_mount()
sysfs from sysfs_init()") removed the internal mount.

This doesn't seem to cause wide-spread failure but there is one
failure reported.  During boot, userland somehow falls into infinite
loop, fills up one of the filesystems used during boot (possibly a
tmpfs) and then hangs.  It isn't yet clear what's going on or why
userland would depend on internal kernel mount of sysfs.

This needs further digging but let's restore the internal mount in the
simplest way.

Signed-off-by: Tejun Heo <tj@...nel.org>
Reported-by: Alexandre Demers <alexandre.f.demers@...il.com>
---
 fs/sysfs/mount.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index a66ad61..dd6d455 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -75,5 +75,14 @@ int __init sysfs_init(void)
 		return err;
 	}
 
+	/*
+	 * XXX: Create an in-kernel mount of sysfs.  It isn't clear yet why
+	 * this makes any difference; however, there is one report of
+	 * userland falling into an infinite loop during boot without it.
+	 *
+	 * http://lkml.kernel.org/g/CAPEhTTFP3N-ReasmgL5n82mve8p8M3crqmaMvzV+F2p5JCSRbQ@mail.gmail.com
+	 */
+	WARN_ON(IS_ERR(kern_mount(&sysfs_fs_type)));
+
 	return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ