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:   Wed, 19 Oct 2022 23:17:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jani Nikula <jani.nikula@...el.com>
Subject: [linux-stable-rc:linux-5.19.y 3411/3412]
 drivers/gpu/drm/i915/display/intel_bios.c:369:26: error: 'i915->display' is
 a pointer; did you mean to use '->'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.19.y
head:   d7a862282feb3dc7e8a5fd673a2d01de9ef93612
commit: 04847e96772c3cf2406da9414a68f6403f1491d5 [3411/3412] drm/i915/bios: Use hardcoded fp_timing size for generating LFP data pointers
config: x86_64-defconfig
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=04847e96772c3cf2406da9414a68f6403f1491d5
        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.19.y
        git checkout 04847e96772c3cf2406da9414a68f6403f1491d5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make 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/display/intel_bios.c: In function 'generate_lfp_data_ptrs':
>> drivers/gpu/drm/i915/display/intel_bios.c:369:26: error: 'i915->display' is a pointer; did you mean to use '->'?
     369 |         if (i915->display.vbt.version < 155)
         |                          ^
         |                          ->


vim +369 drivers/gpu/drm/i915/display/intel_bios.c

   354	
   355	static void *generate_lfp_data_ptrs(struct drm_i915_private *i915,
   356					    const void *bdb)
   357	{
   358		int i, size, table_size, block_size, offset, fp_timing_size;
   359		struct bdb_lvds_lfp_data_ptrs *ptrs;
   360		const void *block;
   361		void *ptrs_block;
   362	
   363		/*
   364		 * The hardcoded fp_timing_size is only valid for
   365		 * modernish VBTs. All older VBTs definitely should
   366		 * include block 41 and thus we don't need to
   367		 * generate one.
   368		 */
 > 369		if (i915->display.vbt.version < 155)
   370			return NULL;
   371	
   372		fp_timing_size = 38;
   373	
   374		block = find_raw_section(bdb, BDB_LVDS_LFP_DATA);
   375		if (!block)
   376			return NULL;
   377	
   378		drm_dbg_kms(&i915->drm, "Generating LFP data table pointers\n");
   379	
   380		block_size = get_blocksize(block);
   381	
   382		size = fp_timing_size + sizeof(struct lvds_dvo_timing) +
   383			sizeof(struct lvds_pnp_id);
   384		if (size * 16 > block_size)
   385			return NULL;
   386	
   387		ptrs_block = kzalloc(sizeof(*ptrs) + 3, GFP_KERNEL);
   388		if (!ptrs_block)
   389			return NULL;
   390	
   391		*(u8 *)(ptrs_block + 0) = BDB_LVDS_LFP_DATA_PTRS;
   392		*(u16 *)(ptrs_block + 1) = sizeof(*ptrs);
   393		ptrs = ptrs_block + 3;
   394	
   395		table_size = sizeof(struct lvds_pnp_id);
   396		size = make_lfp_data_ptr(&ptrs->ptr[0].panel_pnp_id, table_size, size);
   397	
   398		table_size = sizeof(struct lvds_dvo_timing);
   399		size = make_lfp_data_ptr(&ptrs->ptr[0].dvo_timing, table_size, size);
   400	
   401		table_size = fp_timing_size;
   402		size = make_lfp_data_ptr(&ptrs->ptr[0].fp_timing, table_size, size);
   403	
   404		if (ptrs->ptr[0].fp_timing.table_size)
   405			ptrs->lvds_entries++;
   406		if (ptrs->ptr[0].dvo_timing.table_size)
   407			ptrs->lvds_entries++;
   408		if (ptrs->ptr[0].panel_pnp_id.table_size)
   409			ptrs->lvds_entries++;
   410	
   411		if (size != 0 || ptrs->lvds_entries != 3) {
   412			kfree(ptrs);
   413			return NULL;
   414		}
   415	
   416		size = fp_timing_size + sizeof(struct lvds_dvo_timing) +
   417			sizeof(struct lvds_pnp_id);
   418		for (i = 1; i < 16; i++) {
   419			next_lfp_data_ptr(&ptrs->ptr[i].fp_timing, &ptrs->ptr[i-1].fp_timing, size);
   420			next_lfp_data_ptr(&ptrs->ptr[i].dvo_timing, &ptrs->ptr[i-1].dvo_timing, size);
   421			next_lfp_data_ptr(&ptrs->ptr[i].panel_pnp_id, &ptrs->ptr[i-1].panel_pnp_id, size);
   422		}
   423	
   424		table_size = sizeof(struct lvds_lfp_panel_name);
   425	
   426		if (16 * (size + table_size) <= block_size) {
   427			ptrs->panel_name.table_size = table_size;
   428			ptrs->panel_name.offset = size * 16;
   429		}
   430	
   431		offset = block - bdb;
   432	
   433		for (i = 0; i < 16; i++) {
   434			ptrs->ptr[i].fp_timing.offset += offset;
   435			ptrs->ptr[i].dvo_timing.offset += offset;
   436			ptrs->ptr[i].panel_pnp_id.offset += offset;
   437		}
   438	
   439		if (ptrs->panel_name.table_size)
   440			ptrs->panel_name.offset += offset;
   441	
   442		return ptrs_block;
   443	}
   444	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ