From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>, Chen LinX <linx.z.chen@intel.com>
Cc: linux-kernel@vger.kernel.org, "He, Bo" <bo.he@intel.com>
Subject: Re: [PATCH] debugfs: keep the old valid mode value when no explicity specify it
Date: Fri, 29 Aug 2014 09:30:54 +0800 [thread overview]
Message-ID: <53FFD7CE.5050000@linux.intel.com> (raw)
In-Reply-To: <20140828151020.GA17945@kroah.com>
On 2014/8/28 23:10, Greg KH wrote:
> On Thu, Aug 28, 2014 at 06:09:09PM +0800, Chen LinX wrote:
>> From: "Chen, LinX" <linx.z.chen@intel.com>
>>
>> When mount debugfs with no mode specifed after it's mounted, the mount
>> point mode will change to default mode(0700) even the mount operation was fail,
>> this will cause some issues like can't get binder info in android.
> I don't understand, what did you do to get into this state?
Greg,
Thanks for your kind quick comments. The patch description can be improved.
We hit the issue when debugging a UIWDT issue. Android framework has a good
method to detect userspace hang and reports UIWDT issues. Android uses
client/server model. Clients communicates 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 the 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.
>
> And why does binder care about debugfs?
>
>> Here we can keep the old valid mode if no explicity specify the mode
>> value and also change the mode value even the mount fails if the mode
>> value is specified.
> I can't parse this sentence :(
Lin's patch checks if debugfs_mount_opts->mode is initiated.
If it is already, the patch would bypass the reinitiation, so the old mode
value is kept.
Yanmin
next prev parent reply other threads:[~2014-08-29 1:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 10:09 [PATCH] debugfs: keep the old valid mode value when no explicity specify it Chen LinX
2014-08-28 15:10 ` Greg KH
2014-08-29 1:30 ` Zhang, Yanmin [this message]
2014-08-29 18:24 ` Greg KH
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=53FFD7CE.5050000@linux.intel.com \
--to=yanmin_zhang@linux.intel.com \
--cc=bo.he@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linx.z.chen@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