From: Greg KH <gregkh@linuxfoundation.org>
To: Chen LinX <linx.z.chen@intel.com>
Cc: linux-kernel@vger.kernel.org, yanmin_zhang@linux.intel.com, "He,
Bo" <bo.he@intel.com>
Subject: Re: [PATCH V2] debugfs: keep the old mode value at remount when no explicit change
Date: Fri, 29 Aug 2014 11:26:47 -0700 [thread overview]
Message-ID: <20140829182647.GB8631@kroah.com> (raw)
In-Reply-To: <1409279603-19468-1-git-send-email-linx.z.chen@intel.com>
On Fri, Aug 29, 2014 at 10:33:23AM +0800, Chen LinX wrote:
> From: "Chen, LinX" <linx.z.chen@intel.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
prev parent reply other threads:[~2014-08-29 18:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 2:33 Chen LinX
2014-08-29 18:26 ` Greg KH [this message]
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=20140829182647.GB8631@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bo.he@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linx.z.chen@intel.com \
--cc=yanmin_zhang@linux.intel.com \
/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
all inboxes | Powered by JetHome®