Re: [PATCH] drm/msm: fix -Wformat-security warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/16/2024 12:33 AM, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@xxxxxxxx>

Passing a variable string as a printf style format is potentially
dangerous that -Wformat-security can warn about if enabled. A new
instance just got added:

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function 'dpu_kms_mdp_snapshot':
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1046:49: error: format not a string literal and no format arguments [-Werror=format-security]
  1046 |                                             vbif->name);
       |                                             ~~~~^~~~~~

Fix this one and the preexisting -Wformat-security warnings the in the
DRM code for snapdragon.

Fixes: 1a40bb31fcf1 ("drm/msm/dpu: Add VBIF to DPU snapshot") # and others
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
I have a larger series that I still plan to send eventually, sending this
one now as I just saw another one get added. The warning is enabled by
default because there are still over 100 other files with the same problem.
---
  drivers/gpu/drm/msm/adreno/a6xx_gmu.c   |  2 +-
  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 28 ++++++++++++++++---------
  2 files changed, 19 insertions(+), 11 deletions(-)


Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux