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-prev] [day] [month] [year] [list]
Message-ID: <20140829182647.GB8631@kroah.com>
Date:	Fri, 29 Aug 2014 11:26:47 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Chen LinX <linx.z.chen@...el.com>
Cc:	linux-kernel@...r.kernel.org, yanmin_zhang@...ux.intel.com,
	"He, Bo" <bo.he@...el.com>
Subject: Re: [PATCH V2] debugfs: keep the old mode value at remount when no
 explicit change

On Fri, Aug 29, 2014 at 10:33:23AM +0800, Chen LinX wrote:
> From: "Chen, LinX" <linx.z.chen@...el.com>
> 
> Android framework has a good method to detect userspace hang and reports
> UIWDT issues. It uses client/server model. Clients communicate with
> servers by binder. binder has debugfs interfaces. Some files show what
> threads are communicating with what other threads. If one thread is
> blocked for a long time, we can find the blocking chain from the binder
> info. Since the error dumping process has no root access, booting
> process changes debugfs mount dir mode to 0755. When UIWDT happens,
> the error dumping process can read the info.
> 
> Unfortunately, some other scripts at booting try to mount debugfs for
> many times. No matter if the double mounting fails or succeeds,
> debugfs_parse_options changes the root inode's mode back to default
> 0700. It means the effect of previous mode changing to 0755 is lost.
> At UIWDT, the dumping process can't save binder info to disk log files.
> 
> The patch checks if debugfs_mount_opts->mode is initiated. If it is
> already, it bypasses the reinitiation, and the old mode value is kept.

No, the default mount value for debugfs is DEBUGFS_DEFAULT_MODE, if you
wish to override that, then provide the proper mount flags when mounting
it.  Don't rely on a previous mount of the filesystem to have set it to
something else, as you never know what that might have been.

Please fix your userspace programs if you really rely on these binder
debugging files (which you really shouldn't be doing anyway, but that's
a totally different issue...)

sorry,

greg k-h
--
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