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] [day] [month] [year] [list]
Message-ID: <201811031928.Eg204A1T%fengguang.wu@intel.com>
Date:   Sat, 3 Nov 2018 19:11:37 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc:     kbuild-all@...org, linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        James Bottomley <James.Bottomley@...senPartnership.com>,
        Tomas Winkler <tomas.winkler@...el.com>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Peter Huewe <peterhuewe@....de>,
        Jason Gunthorpe <jgg@...pe.ca>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] tpm: move tpm_validate_commmand() to tpm2-space.c

Hi Jarkko,

I love your patch! Perhaps something to improve:

[auto build test WARNING on jss-tpmdd/next]
[also build test WARNING on next-20181102]
[cannot apply to v4.19]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jarkko-Sakkinen/Detach-TPM-space-code-from-tpm_transmit-flow/20181103-183010
base:   git://git.infradead.org/users/jjs/linux-tpmdd next
config: i386-randconfig-x002-201843 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/char/tpm/tpm2-space.c: In function 'tpm2_prepare_space':
>> drivers/char/tpm/tpm2-space.c:335:16: warning: 'cc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     chip->last_cc = cc;
     ~~~~~~~~~~~~~~^~~~

vim +/cc +335 drivers/char/tpm/tpm2-space.c

   302	
   303	int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u8 *cmd,
   304			       size_t cmdsiz)
   305	{
   306		int rc;
   307		int cc;
   308	
   309		if (!space)
   310			return 0;
   311	
   312		cc = tpm_validate_command(chip, space, cmd, cmdsiz);
   313		if (cc < 0)
   314			return cc;
   315	
   316		memcpy(&chip->work_space.context_tbl, &space->context_tbl,
   317		       sizeof(space->context_tbl));
   318		memcpy(&chip->work_space.session_tbl, &space->session_tbl,
   319		       sizeof(space->session_tbl));
   320		memcpy(chip->work_space.context_buf, space->context_buf, PAGE_SIZE);
   321		memcpy(chip->work_space.session_buf, space->session_buf, PAGE_SIZE);
   322	
   323		rc = tpm2_load_space(chip);
   324		if (rc) {
   325			tpm2_flush_space(chip);
   326			return rc;
   327		}
   328	
   329		rc = tpm2_map_command(chip, cc, cmd);
   330		if (rc) {
   331			tpm2_flush_space(chip);
   332			return rc;
   333		}
   334	
 > 335		chip->last_cc = cc;
   336		return 0;
   337	}
   338	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (31098 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ