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>] [day] [month] [year] [list]
Date:   Sun, 18 Sep 2022 05:49:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Lucas Stach <l.stach@...gutronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Chunming Zhou <david1.zhou@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Dominik Behr <dbehr@...omium.org>,
        Stéphane Marchesin <marcheu@...omium.org>
Subject: [jsarha:backport/cros-v4.14-intel-audio 5865/9999]
 include/drm/spsc_queue.h:73:37: sparse: sparse: non size-preserving integer
 to pointer cast

tree:   https://github.com/jsarha/linux backport/cros-v4.14-intel-audio
head:   ed5b3159902598be61b23ef22a235d9b1eaa9ad8
commit: 52aaed9959cd536358da38dccd48968216c57d7a [5865/9999] BACKPORT: drm: move amd_gpu_scheduler into common location
config: mips-randconfig-s041-20220918
compiler: mips-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/jsarha/linux/commit/52aaed9959cd536358da38dccd48968216c57d7a
        git remote add jsarha https://github.com/jsarha/linux
        git fetch --no-tags jsarha backport/cros-v4.14-intel-audio
        git checkout 52aaed9959cd536358da38dccd48968216c57d7a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ drivers/gpu/drm/scheduler/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/scheduler/gpu_scheduler.c: note: in included file (through include/drm/gpu_scheduler.h):
>> include/drm/spsc_queue.h:73:37: sparse: sparse: non size-preserving integer to pointer cast

vim +73 include/drm/spsc_queue.h

3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  64  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  65  static inline bool spsc_queue_push(struct spsc_queue *queue, struct spsc_node *node)
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  66  {
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  67  	struct spsc_node **tail;
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  68  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  69  	node->next = NULL;
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  70  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  71  	preempt_disable();
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  72  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12 @73  	tail = (struct spsc_node **)atomic_long_xchg(&queue->tail, (long)&node->next);
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  74  	WRITE_ONCE(*tail, node);
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  75  	atomic_inc(&queue->job_count);
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  76  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  77  	/*
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  78  	 * In case of first element verify new node will be visible to the consumer
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  79  	 * thread when we ping the kernel thread that there is new work to do.
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  80  	 */
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  81  	smp_wmb();
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  82  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  83  	preempt_enable();
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  84  
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  85  	return tail == &queue->head;
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  86  }
3314ab2f02d2c9 drivers/gpu/drm/amd/scheduler/spsc_queue.h Andrey Grodzovsky 2017-10-12  87  

:::::: The code at line 73 was first introduced by commit
:::::: 3314ab2f02d2c93407fc1c351a7ff982bbd95402 UPSTREAM: drm/amdgpu: Add SPSC queue to scheduler.

:::::: TO: Andrey Grodzovsky <Andrey.Grodzovsky@....com>
:::::: CC: chrome-bot <chrome-bot@...omium.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (90630 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ