[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208211050.Lgvya5QM-lkp@intel.com>
Date: Sun, 21 Aug 2022 10:13:45 +0800
From: kernel test robot <lkp@...el.com>
To: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Daniel Vetter <daniel.vetter@...ll.ch>
Subject: [linux-stable-rc:linux-5.15.y 3230/9817]
drivers/gpu/drm/i915/gt/intel_gt.c:966:2: error: format string is not a
string literal (potentially insecure)
Hi Tvrtko,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
head: decfb75fa34c3fc79f494f44b36d56d1d744edd5
commit: 8a17a077e7e9ecce25c95dbdb27843d2d6c2f0f7 [3230/9817] drm/i915: Flush TLBs before releasing backing store
config: x86_64-randconfig-r011-20220815 (https://download.01.org/0day-ci/archive/20220821/202208211050.Lgvya5QM-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6afcc4a459ead8809a0d6d9b4bf7b64bcc13582b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=8a17a077e7e9ecce25c95dbdb27843d2d6c2f0f7
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.15.y
git checkout 8a17a077e7e9ecce25c95dbdb27843d2d6c2f0f7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/gt/intel_gt.c:966:2: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
GEM_TRACE("\n");
^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_gem.h:76:24: note: expanded from macro 'GEM_TRACE'
#define GEM_TRACE(...) trace_printk(__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:366:3: note: expanded from macro 'trace_printk'
do_trace_printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:380:30: note: expanded from macro 'do_trace_printk'
__trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \
^~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_gt.c:966:2: note: treat the string as an argument to avoid this
drivers/gpu/drm/i915/i915_gem.h:76:24: note: expanded from macro 'GEM_TRACE'
#define GEM_TRACE(...) trace_printk(__VA_ARGS__)
^
include/linux/kernel.h:366:3: note: expanded from macro 'trace_printk'
do_trace_printk(fmt, ##__VA_ARGS__); \
^
include/linux/kernel.h:380:30: note: expanded from macro 'do_trace_printk'
__trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \
^
1 error generated.
vim +966 drivers/gpu/drm/i915/gt/intel_gt.c
927
928 void intel_gt_invalidate_tlbs(struct intel_gt *gt)
929 {
930 static const i915_reg_t gen8_regs[] = {
931 [RENDER_CLASS] = GEN8_RTCR,
932 [VIDEO_DECODE_CLASS] = GEN8_M1TCR, /* , GEN8_M2TCR */
933 [VIDEO_ENHANCEMENT_CLASS] = GEN8_VTCR,
934 [COPY_ENGINE_CLASS] = GEN8_BTCR,
935 };
936 static const i915_reg_t gen12_regs[] = {
937 [RENDER_CLASS] = GEN12_GFX_TLB_INV_CR,
938 [VIDEO_DECODE_CLASS] = GEN12_VD_TLB_INV_CR,
939 [VIDEO_ENHANCEMENT_CLASS] = GEN12_VE_TLB_INV_CR,
940 [COPY_ENGINE_CLASS] = GEN12_BLT_TLB_INV_CR,
941 };
942 struct drm_i915_private *i915 = gt->i915;
943 struct intel_uncore *uncore = gt->uncore;
944 struct intel_engine_cs *engine;
945 enum intel_engine_id id;
946 const i915_reg_t *regs;
947 unsigned int num = 0;
948
949 if (I915_SELFTEST_ONLY(gt->awake == -ENODEV))
950 return;
951
952 if (GRAPHICS_VER(i915) == 12) {
953 regs = gen12_regs;
954 num = ARRAY_SIZE(gen12_regs);
955 } else if (GRAPHICS_VER(i915) >= 8 && GRAPHICS_VER(i915) <= 11) {
956 regs = gen8_regs;
957 num = ARRAY_SIZE(gen8_regs);
958 } else if (GRAPHICS_VER(i915) < 8) {
959 return;
960 }
961
962 if (drm_WARN_ONCE(&i915->drm, !num,
963 "Platform does not implement TLB invalidation!"))
964 return;
965
> 966 GEM_TRACE("\n");
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists