The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>, o-takashi@sakamocchi.jp
Cc: oe-kbuild-all@lists.linux.dev,
	linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Subject: Re: [PATCH] firewire: core-card: fix ROM length mismatch and strengthen descriptor validation
Date: Tue, 11 Aug 2026 23:03:58 +0800	[thread overview]
Message-ID: <202608112235.mPi5BN2l-lkp@intel.com> (raw)
In-Reply-To: <20260720144913.5840-1-sreekuttan2156239@gmail.com>

Hi Sreeraj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ieee1394-linux1394/for-linus]
[cannot apply to ieee1394-linux1394/for-next next-20260810]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sreeraj-S-Kurup/firewire-core-card-fix-ROM-length-mismatch-and-strengthen-descriptor-validation/20260811-151106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git for-linus
patch link:    https://lore.kernel.org/r/20260720144913.5840-1-sreekuttan2156239%40gmail.com
patch subject: [PATCH] firewire: core-card: fix ROM length mismatch and strengthen descriptor validation
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20260811/202608112235.mPi5BN2l-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608112235.mPi5BN2l-lkp@intel.com/

New smatch warnings:
drivers/firewire/core-card.c:146 generate_config_rom() warn: inconsistent indenting

Old smatch warnings:
drivers/firewire/core-card.c:514 bm_work() warn: always true condition '(root_node->max_hops < (16 / 1 + (0))) => (0-15 < 16)'

vim +146 drivers/firewire/core-card.c

    88	
    89	static void generate_config_rom(struct fw_card *card, __be32 *config_rom)
    90	{
    91		struct fw_descriptor *desc;
    92		int i, j, k, length;
    93	
    94		/*
    95		 * Initialize contents of config rom buffer.  On the OHCI
    96		 * controller, block reads to the config rom accesses the host
    97		 * memory, but quadlet read access the hardware bus info block
    98		 * registers.  That's just crack, but it means we should make
    99		 * sure the contents of bus info block in host memory matches
   100		 * the version stored in the OHCI registers.
   101		 */
   102	
   103		config_rom[0] = cpu_to_be32(
   104			BIB_CRC_LENGTH(4) | BIB_INFO_LENGTH(4) | BIB_CRC(0));
   105		config_rom[1] = cpu_to_be32(BIB_BUS_NAME);
   106		config_rom[2] = cpu_to_be32(
   107			BIB_LINK_SPEED(card->link_speed) |
   108			BIB_GENERATION(card->config_rom_generation++ % 14 + 2) |
   109			BIB_MAX_ROM(2) |
   110			BIB_MAX_RECEIVE(card->max_receive) |
   111			BIB_BMC | BIB_ISC | BIB_CMC | BIB_IRMC);
   112		config_rom[3] = cpu_to_be32(card->guid >> 32);
   113		config_rom[4] = cpu_to_be32(card->guid);
   114	
   115		/* Generate root directory. */
   116		config_rom[6] = cpu_to_be32(NODE_CAPABILITIES);
   117		i = 7;
   118		j = 7 + descriptor_count;
   119	
   120		/* Generate root directory entries for descriptors. */
   121		list_for_each_entry (desc, &descriptor_list, link) {
   122			if (desc->immediate > 0)
   123				config_rom[i++] = cpu_to_be32(desc->immediate);
   124			config_rom[i] = cpu_to_be32(desc->key | (j - i));
   125			i++;
   126			j += desc->length;
   127		}
   128	
   129		/* Update root directory length. */
   130		config_rom[5] = cpu_to_be32((i - 5 - 1) << 16);
   131	
   132		/* End of root directory, now copy in descriptors. */
   133		list_for_each_entry (desc, &descriptor_list, link) {
   134			for (k = 0; k < desc->length; k++)
   135				config_rom[i + k] = cpu_to_be32(desc->data[k]);
   136			i += desc->length;
   137		}
   138	
   139		/* Calculate CRCs for all blocks in the config rom.  This
   140		 * assumes that CRC length and info length are identical for
   141		 * the bus info block, which is always the case for this
   142		 * implementation. */
   143		for (i = 0; i < j; i += length + 1)
   144			length = fw_compute_block_crc(config_rom + i);
   145	
 > 146	     if (j != config_rom_length) {
   147	        pr_warn("FireWire ROM length mismatch: expected %zu, got %d\n",
   148	            config_rom_length, j);
   149	        config_rom_length = j;
   150	     }
   151	}
   152	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2026-08-11 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 14:49 [PATCH] firewire: core-card: fix ROM length mismatch and strengthen descriptor validation Sreeraj S Kurup
2026-08-11 15:03 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608112235.mPi5BN2l-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=o-takashi@sakamocchi.jp \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sreekuttan2156239@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox