lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc50eeb7cf3e6a89e66920f498b24a3ef8fa7746.camel@linux.intel.com>
Date: Tue, 13 Aug 2024 14:32:47 +0200
From: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
To: Jani Nikula <jani.nikula@...el.com>, linux-kernel@...r.kernel.org
Cc: intel-xe@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org, 
 dri-devel@...ts.freedesktop.org, akinobu.mita@...il.com, 
 akpm@...ux-foundation.org, lucas.demarchi@...el.com,
 rodrigo.vivi@...el.com,  robdclark@...il.com, quic_abhinavk@...cinc.com,
 dmitry.baryshkov@...aro.org
Subject: Re: [PATCH 3/3] drm/xe: clean up fault injection usage

On Tue, 2024-08-13 at 15:12 +0300, Jani Nikula wrote:
> With the proper stubs in place in linux/fault-inject.h, we can remove
> a
> bunch of conditional compilation for CONFIG_FAULT_INJECTION=n.
> 
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Akinobu Mita <akinobu.mita@...il.com>
> Cc: Lucas De Marchi <lucas.demarchi@...el.com>
> Cc: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@...el.com>
> Signed-off-by: Jani Nikula <jani.nikula@...el.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom@...ux.intel.com>


> ---
>  drivers/gpu/drm/xe/xe_debugfs.c |  7 +------
>  drivers/gpu/drm/xe/xe_gt.h      | 10 ++--------
>  2 files changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c
> b/drivers/gpu/drm/xe/xe_debugfs.c
> index 1011e5d281fa..b381bfb634f7 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -6,6 +6,7 @@
>  #include "xe_debugfs.h"
>  
>  #include <linux/debugfs.h>
> +#include <linux/fault-inject.h>
>  #include <linux/string_helpers.h>
>  
>  #include <drm/drm_debugfs.h>
> @@ -26,10 +27,7 @@
>  #include "xe_vm.h"
>  #endif
>  
> -#ifdef CONFIG_FAULT_INJECTION
> -#include <linux/fault-inject.h> /* XXX: fault-inject.h is broken */
>  DECLARE_FAULT_ATTR(gt_reset_failure);
> -#endif
>  
>  static struct xe_device *node_to_xe(struct drm_info_node *node)
>  {
> @@ -214,8 +212,5 @@ void xe_debugfs_register(struct xe_device *xe)
>  	for_each_gt(gt, xe, id)
>  		xe_gt_debugfs_register(gt);
>  
> -#ifdef CONFIG_FAULT_INJECTION
>  	fault_create_debugfs_attr("fail_gt_reset", root,
> &gt_reset_failure);
> -#endif
> -
>  }
> diff --git a/drivers/gpu/drm/xe/xe_gt.h b/drivers/gpu/drm/xe/xe_gt.h
> index 8b1a5027dcf2..ee138e9768a2 100644
> --- a/drivers/gpu/drm/xe/xe_gt.h
> +++ b/drivers/gpu/drm/xe/xe_gt.h
> @@ -6,6 +6,8 @@
>  #ifndef _XE_GT_H_
>  #define _XE_GT_H_
>  
> +#include <linux/fault-inject.h>
> +
>  #include <drm/drm_util.h>
>  
>  #include "xe_device.h"
> @@ -19,19 +21,11 @@
>  
>  #define CCS_MASK(gt) (((gt)->info.engine_mask &
> XE_HW_ENGINE_CCS_MASK) >> XE_HW_ENGINE_CCS0)
>  
> -#ifdef CONFIG_FAULT_INJECTION
> -#include <linux/fault-inject.h> /* XXX: fault-inject.h is broken */
>  extern struct fault_attr gt_reset_failure;
>  static inline bool xe_fault_inject_gt_reset(void)
>  {
>  	return should_fail(&gt_reset_failure, 1);
>  }
> -#else
> -static inline bool xe_fault_inject_gt_reset(void)
> -{
> -	return false;
> -}
> -#endif
>  
>  struct xe_gt *xe_gt_alloc(struct xe_tile *tile);
>  int xe_gt_init_hwconfig(struct xe_gt *gt);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ