linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jarkko Sakkinen <jarkko@kernel.org>, linux-integrity@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Stefano Garzarella <sgarzare@redhat.com>,
	Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>,
	Stefan Berger <stefanb@linux.ibm.com>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	David Howells <dhowells@redhat.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Mimi Zohar <zohar@linux.ibm.com>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH v10 1/4] tpm: Make TPM buffer allocations more robust
Date: Sun, 21 Sep 2025 16:53:39 +0800	[thread overview]
Message-ID: <202509211636.ZaHdTpHP-lkp@intel.com> (raw)
In-Reply-To: <20250921020804.1088824-2-jarkko@kernel.org>

Hi Jarkko,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20250919]
[cannot apply to char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.17-rc6 v6.17-rc5 v6.17-rc4 v6.17-rc6]
[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/Jarkko-Sakkinen/tpm-Make-TPM-buffer-allocations-more-robust/20250921-102024
base:   next-20250919
patch link:    https://lore.kernel.org/r/20250921020804.1088824-2-jarkko%40kernel.org
patch subject: [PATCH v10 1/4] tpm: Make TPM buffer allocations more robust
config: x86_64-buildonly-randconfig-001-20250921 (https://download.01.org/0day-ci/archive/20250921/202509211636.ZaHdTpHP-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250921/202509211636.ZaHdTpHP-lkp@intel.com/reproduce)

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/202509211636.ZaHdTpHP-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/char/tpm/tpm-buf.c:20:9: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
      19 |                         WARN(1, "%s: size mismatch: %u != %u\n", __func__, buf_size,
         |                                                           ~~
         |                                                           %lu
      20 |                              buf->capacity + sizeof(*buf));
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:141:29: note: expanded from macro 'WARN'
     141 |                 __WARN_printf(TAINT_WARN, format);                      \
         |                                           ^~~~~~
   include/asm-generic/bug.h:112:17: note: expanded from macro '__WARN_printf'
     112 |                 __warn_printk(arg);                                     \
         |                               ^~~
   1 warning generated.


vim +20 drivers/char/tpm/tpm-buf.c

     9	
    10	static void __tpm_buf_size_invariant(struct tpm_buf *buf, u16 buf_size)
    11	{
    12		if (!buf->capacity) {
    13			if (buf_size > TPM_BUF_MAX_SIZE) {
    14				WARN(1, "%s: size overflow: %u\n", __func__, buf_size);
    15				buf->flags |= TPM_BUF_ERROR;
    16			}
    17		} else {
    18			if (buf_size != buf->capacity + sizeof(*buf)) {
    19				WARN(1, "%s: size mismatch: %u != %u\n", __func__, buf_size,
  > 20				     buf->capacity + sizeof(*buf));
    21				buf->flags |= TPM_BUF_ERROR;
    22			}
    23		}
    24	}
    25	

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

  reply	other threads:[~2025-09-21  8:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-21  2:08 [PATCH v10 0/4] tpm: robust stack allocations Jarkko Sakkinen
2025-09-21  2:08 ` [PATCH v10 1/4] tpm: Make TPM buffer allocations more robust Jarkko Sakkinen
2025-09-21  8:53   ` kernel test robot [this message]
2025-09-22  8:44   ` Stefano Garzarella
2025-09-23 14:30     ` Jarkko Sakkinen
2025-09-24 10:10       ` Stefano Garzarella
2025-09-21  2:08 ` [PATCH v10 2/4] tpm, tpm1-cmd: Use stack for trivial cases Jarkko Sakkinen
2025-09-21  2:08 ` [PATCH v10 3/4] tpm, tpm2-cmd: " Jarkko Sakkinen
2025-09-21  2:08 ` [PATCH v10 4/4] tpm_vpm_proxy: Use stack for TPM_CC_SET_LOCALITY Jarkko Sakkinen
2025-09-22  8:46   ` Stefano Garzarella
2025-09-23 14:30     ` Jarkko Sakkinen
2025-09-21 12:54 ` [PATCH v10 0/4] tpm: robust stack allocations Jarkko Sakkinen

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=202509211636.ZaHdTpHP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=dhowells@redhat.com \
    --cc=jarkko.sakkinen@opinsys.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paul@paul-moore.com \
    --cc=peterhuewe@gmx.de \
    --cc=serge@hallyn.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanb@linux.ibm.com \
    --cc=zohar@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).