lkml.org 
[lkml]   [2023]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] soc: qcom: aoss: Add debugfs interface for sending messages
> +static ssize_t qmp_debugfs_write(struct file *file, const char __user *userstr,
> + size_t len, loff_t *pos)
> +{
> + struct qmp *qmp = file->private_data;
> + char buf[QMP_MSG_LEN];
> + int ret;
> +
> + if (!len || len >= QMP_MSG_LEN)
> + return -EINVAL;
> +
> + if (copy_from_user(buf, userstr, len))
> + return -EFAULT;
> + buf[len] = '\0';
> +
> + ret = qmp_send(qmp, buf);
> + if (ret < 0)
> + return ret;

Sorry, but you still appear to be sending binary blobs from userspace
to the firmware. This is not liked.

The documentation you pointed to has three commands. Please implement
three debugfs files, one per command.

Andrew

---
pw-bot: cr

\
 
 \ /
  Last update: 2023-08-11 23:02    [W:0.088 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site