✗ CI.checkpatch: warning for drm/xe: Use fault injection infrastructure to find issues at probe time

Patchwork patchwork at emeril.freedesktop.org
Fri Sep 13 18:15:16 UTC 2024


== Series Details ==

Series: drm/xe: Use fault injection infrastructure to find issues at probe time
URL   : https://patchwork.freedesktop.org/series/138654/
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
c62d7e164862503a3662a095da1c6c9014248cb2
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 8b96a301d4dd3321de7c422834dd165737733088
Author: Francois Dugast <francois.dugast at intel.com>
Date:   Fri Sep 13 16:33:05 2024 +0200

    drm/xe: Use fault injection infrastructure to find issues at probe time
    
    This RFC is a rework of https://patchwork.freedesktop.org/series/137314/
    but instead of importing custom macros from i915, it makes use of the
    standard kernel fault injection infrastructure, see fault-injection.rst.
    
    In particular, it leverages error injectable functions with the macro
    ALLOW_ERROR_INJECTION(). This macro requires minimal code changes to the
    faulting function, if it meets the injectable functions requirements:
    fault-injection.html#requirements-for-the-error-injectable-functions
    
    Unfortunately this is not the case in most of the injection points of the
    original series, so a wrapper is added if needed. Only a few examples are
    shown in this RFC to discuss the proper pattern to apply.
    
    The return code of the functions using ALLOW_ERROR_INJECTION() can be
    conditionnally modified at runtime by tuning some debugfs entries. This
    requires CONFIG_FUNCTION_ERROR_INJECTION (among others).
    
    One way to use fault injection at probe time by making each of those
    functions fail one at a time is:
    
        FAILTYPE=fail_function
        DEVICE="0000:00:08.0" # depends on the system
        ERRNO=-12 # -ENOMEM, other value might be needed depending on error handling
    
        echo N > /sys/kernel/debug/$FAILTYPE/task-filter
        echo 100 > /sys/kernel/debug/$FAILTYPE/probability
        echo 0 > /sys/kernel/debug/$FAILTYPE/interval
        echo -1 > /sys/kernel/debug/$FAILTYPE/times
        echo 0 > /sys/kernel/debug/$FAILTYPE/space
        echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
    
        modprobe xe
        echo $DEVICE > /sys/bus/pci/drivers/xe/unbind
    
        grep -oP "^.* \[xe\]" /sys/kernel/debug/$FAILTYPE/injectable | cut -d ' ' -f 1 | while read -r FUNCTION ; do
            echo "Injecting fault in $FUNCTION"
            echo "" > /sys/kernel/debug/$FAILTYPE/inject
            echo $FUNCTION > /sys/kernel/debug/$FAILTYPE/inject
            printf %#x $ERRNO > /sys/kernel/debug/$FAILTYPE/$FUNCTION/retval
            echo $DEVICE > /sys/bus/pci/drivers/xe/bind
        done
    
        rmmod xe
    
    Signed-off-by: Francois Dugast <francois.dugast at intel.com>
    Cc: Lucas De Marchi <lucas.demarchi at intel.com>
    Cc: Matthew Brost <matthew.brost at intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
+ /mt/dim checkpatch df3eecb1fa97d6d35569c2fa39f0da78b9f13328 drm-intel
8b96a301d4dd drm/xe: Use fault injection infrastructure to find issues at probe time
-:29: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#29: 
    ERRNO=-12 # -ENOMEM, other value might be needed depending on error handling

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




More information about the Intel-xe mailing list