2021-05-21 08:19:33

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH v2] b43: don't save dentries for debugfs

On 2021-05-19 09:03, Greg Kroah-Hartman wrote:
> On Wed, May 19, 2021 at 08:57:00AM -0700, Jeff Johnson wrote:
>> Unless debugfs is disabled, like on Android, which is the real problem
>> I'm
>> trying to solve.
>
> Then use some other filesystem to place your relay file in. A relay
> file is not a file that userspace should rely on for normal operation,
> so why do you need it at all?
>
> What tools/operation requires access to this file that systems without
> debugfs support is causing problems on?

(trimmed some lists)

For the ath drivers (as well as the out-of-tree Android driver) it is
being used for RF spectral scan which produces a large amount of data
that is processed by a userspace analysis application.

I've been looking for an alternate filesystem to use, but am not finding
anything where it appears easy to get a parent dentry, so any clues for
the clueless (me) would be appreciated.

Jeff

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
a Linux Foundation Collaborative Project


2021-05-21 09:43:30

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] b43: don't save dentries for debugfs

On Thu, May 20, 2021 at 03:16:35PM -0700, Jeff Johnson wrote:
> On 2021-05-19 09:03, Greg Kroah-Hartman wrote:
> > On Wed, May 19, 2021 at 08:57:00AM -0700, Jeff Johnson wrote:
> > > Unless debugfs is disabled, like on Android, which is the real
> > > problem I'm
> > > trying to solve.
> >
> > Then use some other filesystem to place your relay file in. A relay
> > file is not a file that userspace should rely on for normal operation,
> > so why do you need it at all?
> >
> > What tools/operation requires access to this file that systems without
> > debugfs support is causing problems on?
>
> (trimmed some lists)
>
> For the ath drivers (as well as the out-of-tree Android driver) it is being
> used for RF spectral scan which produces a large amount of data that is
> processed by a userspace analysis application.

And that application requires root access in order to be able to read
from the debugfs file today? That feels risky. And doesn't work for
Android systems today, right?

So what's wrong with just leaving it as-is, debugfs isn't going away on
debug Android kernels, which is when you need to run this type of thing,
only on the "user builds".

And if it's really an issue, take that up with Google, it's their
security policy that is driving this, not the community's requirements :)

And note, moving files out of debugfs to elsewhere in the system
circumvents the reasons that Google is not allowing debugfs anymore,
which defeats the purpose entirely of that decision. Are you _sure_
that's a good idea for your users?

> I've been looking for an alternate filesystem to use, but am not finding
> anything where it appears easy to get a parent dentry, so any clues for the
> clueless (me) would be appreciated.

I'm not going to tell you how to abuse other filesystems in the kernel,
but it shouldn't be all that hard if you really want to do it...

good luck!

greg k-h