dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>, dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, Karol Wachowski <karol.wachowski@intel.com>
Subject: Re: [PATCH 09/29] accel/ivpu: Add FW version debugfs entry
Date: Mon, 30 Sep 2024 15:04:05 +0200	[thread overview]
Message-ID: <c28811c9-8243-4143-9a5f-cae86db3c46d@linux.intel.com> (raw)
In-Reply-To: <e276a13f-8add-26f9-9fc4-960a10664e98@quicinc.com>

On 9/27/2024 10:55 PM, Jeffrey Hugo wrote:
> On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote:
>> From: Karol Wachowski <karol.wachowski@intel.com>
>>
>> Add debugfs that prints current firmware version string on read.
>>
>> Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
>> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>> ---
>>   drivers/accel/ivpu/ivpu_debugfs.c | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/accel/ivpu/ivpu_debugfs.c b/drivers/accel/ivpu/ivpu_debugfs.c
>> index cd3ac08f0409a..65245f45cc701 100644
>> --- a/drivers/accel/ivpu/ivpu_debugfs.c
>> +++ b/drivers/accel/ivpu/ivpu_debugfs.c
>> @@ -4,6 +4,7 @@
>>    */
>>     #include <linux/debugfs.h>
>> +#include <linux/firmware.h>
>>     #include <drm/drm_debugfs.h>
>>   #include <drm/drm_file.h>
>> @@ -20,6 +21,8 @@
>>   #include "ivpu_jsm_msg.h"
>>   #include "ivpu_pm.h"
>>   +#include "vpu_boot_api.h"
>> +
>>   static inline struct ivpu_device *seq_to_ivpu(struct seq_file *s)
>>   {
>>       struct drm_debugfs_entry *entry = s->private;
>> @@ -45,6 +48,14 @@ static int fw_name_show(struct seq_file *s, void *v)
>>       return 0;
>>   }
>>   +static int fw_version_show(struct seq_file *s, void *v)
>> +{
>> +    struct ivpu_device *vdev = seq_to_ivpu(s);
>> +
>> +    seq_printf(s, "%s\n", (const char *)vdev->fw->file->data + VPU_FW_HEADER_SIZE);
> 
> This FW file comes from userspace. Is there a check somewhere else that this string is properly NULL terminated as expected?
> 

Sadly there is no check. I will add limited and properly terminated string with version info.


  reply	other threads:[~2024-09-30 13:05 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  8:17 [PATCH 00/29] accel/ivpu: Fixes for 6.12-rc1 Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 01/29] accel/ivpu: Update VPU FW API headers Jacek Lawrynowicz
2024-09-27 20:24   ` Jeffrey Hugo
2024-09-30 10:03     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 02/29] accel/ivpu: Rename ivpu_log_level to fw_log_level Jacek Lawrynowicz
2024-09-27 20:25   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 03/29] accel/ivpu: Reset fw log on cold boot Jacek Lawrynowicz
2024-09-27 20:27   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 04/29] accel/ivpu: Refactor FW log Jacek Lawrynowicz
2024-09-27 20:30   ` Jeffrey Hugo
2024-09-30 19:25     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 05/29] accel/ivpu: Add coredump support Jacek Lawrynowicz
2024-09-27 20:36   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 06/29] accel/ivpu: Fix JSM state dump message warnings Jacek Lawrynowicz
2024-09-27 20:44   ` Jeffrey Hugo
2024-09-30 17:22     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 07/29] accel/ivpu: Set 500 ns delay between power island TRICKLE and ENABLE Jacek Lawrynowicz
2024-09-27 20:47   ` Jeffrey Hugo
2024-09-30 17:19     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 08/29] accel/ivpu: Turn on autosuspend on Simics Jacek Lawrynowicz
2024-09-27 20:49   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 09/29] accel/ivpu: Add FW version debugfs entry Jacek Lawrynowicz
2024-09-27 20:55   ` Jeffrey Hugo
2024-09-30 13:04     ` Jacek Lawrynowicz [this message]
2024-09-24  8:17 ` [PATCH 10/29] accel/ivpu: Stop using hardcoded DRIVER_DATE Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 11/29] accel/ivpu: Remove 1-tile power up Simics workaround Jacek Lawrynowicz
2024-09-27 21:07   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 12/29] accel/ivpu: Allow reading dvfs_mode debugfs file Jacek Lawrynowicz
2024-09-27 21:09   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 13/29] accel/ivpu: Add one jiffy to bo_wait_ioctl timeout value Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 14/29] accel/ivpu: Add auto selection logic for job scheduler Jacek Lawrynowicz
2024-09-27 21:21   ` Jeffrey Hugo
2024-09-30 19:37     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 15/29] accel/ivpu: Print JSM message result in case of error Jacek Lawrynowicz
2024-09-27 21:21   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 16/29] accel/ivpu: Make DB_ID and JOB_ID allocations incremental Jacek Lawrynowicz
2024-09-27 21:23   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 17/29] accel/ivpu: Add test_mode bit to force turbo Jacek Lawrynowicz
2024-09-27 21:25   ` Jeffrey Hugo
2024-09-30 11:01     ` Jacek Lawrynowicz
2024-09-30 13:00       ` Jacek Lawrynowicz
2024-09-30 16:04       ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 18/29] accel/ivpu: Remove skip of clock own resource ack on Simics Jacek Lawrynowicz
2024-09-27 21:26   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 19/29] accel/ivpu: Fix reset_engine debugfs file logic Jacek Lawrynowicz
2024-09-27 21:27   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 20/29] accel/ivpu: Prevent recovery invocation during probe and resume Jacek Lawrynowicz
2024-09-27 21:28   ` Jeffrey Hugo
2024-09-30 19:45     ` Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 21/29] accel/ivpu: Refactor failure diagnostics during boot Jacek Lawrynowicz
2024-09-27 21:29   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 22/29] accel/ivpu: Remove invalid warnings Jacek Lawrynowicz
2024-09-27 21:30   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 23/29] accel/ivpu: Do not fail on cmdq if failed to allocate preemption buffers Jacek Lawrynowicz
2024-09-27 21:31   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 24/29] accel/ivpu: Use whole user and shave ranges for " Jacek Lawrynowicz
2024-09-27 21:32   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 25/29] accel/ivpu: Increase MS info buffer size Jacek Lawrynowicz
2024-09-27 21:32   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 26/29] accel/ivpu: Fix ivpu_jsm_dyndbg_control() Jacek Lawrynowicz
2024-09-27 21:33   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 27/29] accel/ivpu: Remove HWS_EXTRA_EVENTS from test modes Jacek Lawrynowicz
2024-09-27 21:34   ` Jeffrey Hugo
2024-09-24  8:17 ` [PATCH 28/29] accel/ivpu: Add tracing for IPC/PM/JOB Jacek Lawrynowicz
2024-09-24  8:17 ` [PATCH 29/29] accel/ivpu: Fix typos in ivpu_pm.c Jacek Lawrynowicz
2024-09-27 21:36   ` Jeffrey Hugo

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=c28811c9-8243-4143-9a5f-cae86db3c46d@linux.intel.com \
    --to=jacek.lawrynowicz@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karol.wachowski@intel.com \
    --cc=oded.gabbay@gmail.com \
    --cc=quic_jhugo@quicinc.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