Re: [RFC] proc: don't show kernel-internal mnt_id in fdinfo (if possible)

From: Dmitry Safonov
Date: Mon Nov 07 2016 - 14:07:21 EST


On 11/07/2016 08:06 PM, Eric W. Biederman wrote:
Dmitry Safonov <dsafonov@xxxxxxxxxxxxx> writes:

Some kernel special fs could be mounted by userspace, let's show
userspace mnt_id in those cases.

You are asking the kernel to lie to userspace in the case when
the truth in inconvenient. That seems blantantly wrong.

In the case of an internal mount you may want to use the device id
of the device the filesystem is mounted on so you can tie all of
the mounts together. That would allow restore and other things
to do something useful.

That information is available with fstat on a file descriptor so I don't
think we need to export it. But if it is not available I can see
the point of a patch.

Outright ling to userpsace. No. That is just horrible.

Nacked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>

Ah, ok right, I see your point - then let's just drop the patch.

Thanks,
Dmitry