[Intel-xe] ✗ CI.checkpatch: warning for drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN (rev4)

Patchwork patchwork at emeril.freedesktop.org
Thu Jun 29 21:47:12 UTC 2023


== Series Details ==

Series: drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN (rev4)
URL   : https://patchwork.freedesktop.org/series/118799/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
c7d32770e3cd31d9fc134ce41f329b10aa33ee15
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 262936692c5fee2394277b6881711de60248e40f
Author: Alan Previn <alan.previn.teres.alexis at intel.com>
Date:   Thu Jun 29 14:04:18 2023 -0700

    drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN
    
    In the ABI header, GUC_CTB_MSG_MIN_LEN is '1' because
    GUC_CTB_HDR_LEN is 1. This aligns with H2G/G2H CTB specification
    where all command formats are defined in units of dwords so that '1'
    is a dword. Accordingly, GUC_CTB_MSG_MAX_LEN is 256-1 (i.e. 255
    dwords). However, h2g_write was incorrectly assuming that
    GUC_CTB_MSG_MAX_LEN was in bytes. Fix this.
    
    v3: Fix nit on #define location.(Matt)
    v2: By correctly treating GUC_CTB_MSG_MAX_LEN as dwords, it causes
        a local array to consume 4x the stack size. Rework the function
        to avoid consuming stack even if the action size is large. (Matt)
    
    Signed-off-by: Alan Previn <alan.previn.teres.alexis at intel.com>
    Reviewed-by: Matthew Brost <matthew.brost at intel.com>
+ /mt/dim checkpatch 2ec46ad7578ebba3048d6031c1a75c21920f0e19 drm-intel
262936692 drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN
-:43: WARNING:AVOID_BUG: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#43: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:414:
+	XE_BUG_ON(full_len > (GUC_CTB_MSG_MAX_LEN - GUC_CTB_HDR_LEN));

total: 0 errors, 1 warnings, 0 checks, 67 lines checked




More information about the Intel-xe mailing list