Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Will Deacon <will@kernel.org>,
	Michael Shavit <mshavit@google.com>
Subject: [linux-next:master 9356/11707] include/kunit/test.h:444:undefined reference to `kunit_kmalloc_array'
Date: Wed, 8 May 2024 03:30:02 +0800	[thread overview]
Message-ID: <202405080300.iTZpE1xH-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   93a39e4766083050ca0ecd6a3548093a3b9eb60c
commit: 56e1a4cc2588a7cb9664457a62fd7a77e005aa01 [9356/11707] iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry
config: arm64-randconfig-r023-20221023 (https://download.01.org/0day-ci/archive/20240508/202405080300.iTZpE1xH-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080300.iTZpE1xH-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/202405080300.iTZpE1xH-lkp@intel.com/

All errors (new ones prefixed by >>):

   aarch64-linux-ld: Unexpected GOT/PLT entries detected!
   aarch64-linux-ld: Unexpected run-time procedure linkages detected!
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: in function `kunit_kmalloc':
>> include/kunit/test.h:444:(.text+0x440): undefined reference to `kunit_kmalloc_array'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: in function `arm_smmu_test_writer_record_syncs':
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:77:(.text+0x598): undefined reference to `kunit_unary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_unary_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:77:(.text+0x598): dangerous relocation: unsupported relocation
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:77:(.text+0x5a0): undefined reference to `kunit_unary_assert_format'
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:77:(.text+0x5b0): undefined reference to `__kunit_do_failed_assertion'
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:58:(.text+0x5ec): undefined reference to `kunit_binary_ptr_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_binary_ptr_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:58:(.text+0x5ec): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:58:(.text+0x5f4): undefined reference to `kunit_binary_ptr_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:58:(.text+0x604): undefined reference to `__kunit_do_failed_assertion'
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:58:(.text+0x60c): undefined reference to `__kunit_abort'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: in function `arm_smmu_v3_test_cd_expect_transition':
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:322:(.text+0x728): undefined reference to `kunit_mem_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_mem_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:322:(.text+0x728): dangerous relocation: unsupported relocation
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:322:(.text+0x734): undefined reference to `kunit_mem_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:322:(.text+0x748): undefined reference to `__kunit_do_failed_assertion'
>> aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:320:(.text+0x850): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_binary_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:320:(.text+0x850): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:320:(.text+0x854): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:320:(.text+0x868): undefined reference to `__kunit_do_failed_assertion'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:321:(.text+0x898): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_binary_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:321:(.text+0x898): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:321:(.text+0x8a0): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:321:(.text+0x8b0): undefined reference to `__kunit_do_failed_assertion'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: in function `arm_smmu_v3_test_ste_expect_transition':
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:144:(.text+0xcd4): undefined reference to `kunit_mem_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_mem_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:144:(.text+0xcd4): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:144:(.text+0xce4): undefined reference to `kunit_mem_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:144:(.text+0xcf8): undefined reference to `__kunit_do_failed_assertion'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:142:(.text+0xdf4): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_binary_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:142:(.text+0xdf4): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:142:(.text+0xdf8): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:142:(.text+0xe08): undefined reference to `__kunit_do_failed_assertion'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:143:(.text+0xe38): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kunit_binary_assert_format' which may bind externally can not be used when making a shared object; recompile with -fPIC
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:143:(.text+0xe38): dangerous relocation: unsupported relocation
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:143:(.text+0xe40): undefined reference to `kunit_binary_assert_format'
   aarch64-linux-ld: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c:143:(.text+0xe50): undefined reference to `__kunit_do_failed_assertion'


vim +444 include/kunit/test.h

7122debb4367ee Daniel Latypov  2021-05-03  430  
7122debb4367ee Daniel Latypov  2021-05-03  431  /**
7122debb4367ee Daniel Latypov  2021-05-03  432   * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.
7122debb4367ee Daniel Latypov  2021-05-03  433   * @test: The test context object.
7122debb4367ee Daniel Latypov  2021-05-03  434   * @size: The size in bytes of the desired memory.
7122debb4367ee Daniel Latypov  2021-05-03  435   * @gfp: flags passed to underlying kmalloc().
7122debb4367ee Daniel Latypov  2021-05-03  436   *
7122debb4367ee Daniel Latypov  2021-05-03  437   * See kmalloc() and kunit_kmalloc_array() for more information.
57e3cded99e9c8 David Gow       2023-05-25  438   *
57e3cded99e9c8 David Gow       2023-05-25  439   * Note that some internal context data is also allocated with GFP_KERNEL,
57e3cded99e9c8 David Gow       2023-05-25  440   * regardless of the gfp passed in.
7122debb4367ee Daniel Latypov  2021-05-03  441   */
7122debb4367ee Daniel Latypov  2021-05-03  442  static inline void *kunit_kmalloc(struct kunit *test, size_t size, gfp_t gfp)
7122debb4367ee Daniel Latypov  2021-05-03  443  {
7122debb4367ee Daniel Latypov  2021-05-03 @444  	return kunit_kmalloc_array(test, 1, size, gfp);
7122debb4367ee Daniel Latypov  2021-05-03  445  }
0a756853586ce1 Brendan Higgins 2019-09-23  446  

:::::: The code at line 444 was first introduced by commit
:::::: 7122debb4367ee5c89237e5d36dcc0007d7ec43c kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers

:::::: TO: Daniel Latypov <dlatypov@google.com>
:::::: CC: Shuah Khan <skhan@linuxfoundation.org>

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


                 reply	other threads:[~2024-05-07 19:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202405080300.iTZpE1xH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jgg@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=mshavit@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=will@kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).