Re: [PATCH v4 2/4] fs: debugfs: Add write functionality to debugfs blobs

Greg KH
2023-06-23T08:09:33Z

On Wed, Jun 21, 2023 at 03:51:00AM +0000, Avadhut Naik wrote:
> From: Avadhut Naik <Avadhut.Naik@amd.com>
>
> Currently, debugfs_create_blob() creates read-only debugfs binary blob
> files.
>
> In some cases, however, userspace tools need to write variable length
> data structures into predetermined memory addresses. An example is when
> injecting Vendor-defined error types through the einj module. In such
> cases, the functionality to write to these blob files in debugfs would
> be desired since the mapping aspect can be handled within the modules
> with userspace tools only needing to write into the blob files.
>
> Implement a write callback to enable writing to these blob files in
> debugfs.
>
> Signed-off-by: Avadhut Naik <Avadhut.Naik@amd.com>
> Reviewed-by: Alexey Kardashevskiy <aik@amd.com>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>