Linux Kernel Selftest development
 help / color / mirror / Atom feed
* Re: [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
       [not found] <202503050109.t5Ab93hX-lkp@intel.com>
@ 2025-03-05  0:47 ` David Disseldorp
  2025-03-05 12:56   ` David Disseldorp
  0 siblings, 1 reply; 4+ messages in thread
From: David Disseldorp @ 2025-03-05  0:47 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Christian Brauner, Christian Brauner,
	linux-kselftest, kunit-dev

[cc'ing linux-kselftest and kunit-dev]

Hi,

On Wed, 5 Mar 2025 01:47:55 +0800, kernel test robot wrote:

> tree:   https://github.com/brauner/linux.git vfs.all
> head:   ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4
> commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking
> config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-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/202503050109.t5Ab93hX-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
> 
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x30 (section: .data) -> initramfs_test_fname_overrun (section: .init.text)
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x60 (section: .data) -> initramfs_test_data (section: .init.text)
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x90 (section: .data) -> initramfs_test_csum (section: .init.text)
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xc0 (section: .data) -> initramfs_test_hardlink (section: .init.text)
> >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xf0 (section: .data) -> initramfs_test_many (section: .init.text)  

These new warnings are covered in the commit message. The
kunit_test_init_section_suites() registered tests aren't in the .init
section as debugfs entries are retained for results reporting (without
an ability to rerun them).
IIUC, the __kunit_init_test_suites->CONCATENATE(..., _probe) suffix is
intended to suppress the modpost warning - @kunit-dev: any ideas why
this isn't working as intended?

Thanks, David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
  2025-03-05  0:47 ` [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text) David Disseldorp
@ 2025-03-05 12:56   ` David Disseldorp
  2025-03-05 20:55     ` Shuah Khan
  2025-03-06  9:13     ` David Gow
  0 siblings, 2 replies; 4+ messages in thread
From: David Disseldorp @ 2025-03-05 12:56 UTC (permalink / raw)
  To: linux-kselftest, kunit-dev
  Cc: kernel test robot, oe-kbuild-all, Christian Brauner,
	Christian Brauner, Stephen Rothwell

On Wed, 5 Mar 2025 11:47:01 +1100, David Disseldorp wrote:

> [cc'ing linux-kselftest and kunit-dev]
> 
> Hi,
> 
> On Wed, 5 Mar 2025 01:47:55 +0800, kernel test robot wrote:
> 
> > tree:   https://github.com/brauner/linux.git vfs.all
> > head:   ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4
> > commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking
> > config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-lkp@intel.com/config)
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-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/202503050109.t5Ab93hX-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>, old ones prefixed by <<):
> >   
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x30 (section: .data) -> initramfs_test_fname_overrun (section: .init.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x60 (section: .data) -> initramfs_test_data (section: .init.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x90 (section: .data) -> initramfs_test_csum (section: .init.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xc0 (section: .data) -> initramfs_test_hardlink (section: .init.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xf0 (section: .data) -> initramfs_test_many (section: .init.text)    
> 
> These new warnings are covered in the commit message. The
> kunit_test_init_section_suites() registered tests aren't in the .init
> section as debugfs entries are retained for results reporting (without
> an ability to rerun them).
> IIUC, the __kunit_init_test_suites->CONCATENATE(..., _probe) suffix is
> intended to suppress the modpost warning - @kunit-dev: any ideas why
> this isn't working as intended?

Stephen Rothwell (cc'ed) mentioned that we might be able to use
__refdata for initramfs_test_cases. The __ref* description in init.h
does indicate that it's suitable, and I now see that it's present in
kunit-example-test.c . I'll propose a patch which can be squashed in
with the existing commit.

Thanks, David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
  2025-03-05 12:56   ` David Disseldorp
@ 2025-03-05 20:55     ` Shuah Khan
  2025-03-06  9:13     ` David Gow
  1 sibling, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2025-03-05 20:55 UTC (permalink / raw)
  To: David Disseldorp, linux-kselftest, kunit-dev, Brendan Higgins,
	David Gow
  Cc: kernel test robot, oe-kbuild-all, Christian Brauner,
	Christian Brauner, Stephen Rothwell

On 3/5/25 05:56, David Disseldorp wrote:
> On Wed, 5 Mar 2025 11:47:01 +1100, David Disseldorp wrote:
> 
>> [cc'ing linux-kselftest and kunit-dev]

+ Adding David and Brendan

David, Brendan, Any thoughts on how this can be fixed?

>>
>> Hi,
>>
>> On Wed, 5 Mar 2025 01:47:55 +0800, kernel test robot wrote:
>>
>>> tree:   https://github.com/brauner/linux.git vfs.all
>>> head:   ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4
>>> commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking
>>> config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-lkp@intel.com/config)
>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-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/202503050109.t5Ab93hX-lkp@intel.com/
>>>
>>> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>>>    
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x30 (section: .data) -> initramfs_test_fname_overrun (section: .init.text)
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x60 (section: .data) -> initramfs_test_data (section: .init.text)
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x90 (section: .data) -> initramfs_test_csum (section: .init.text)
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xc0 (section: .data) -> initramfs_test_hardlink (section: .init.text)
>>>>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xf0 (section: .data) -> initramfs_test_many (section: .init.text)
>>
>> These new warnings are covered in the commit message. The
>> kunit_test_init_section_suites() registered tests aren't in the .init
>> section as debugfs entries are retained for results reporting (without
>> an ability to rerun them).
>> IIUC, the __kunit_init_test_suites->CONCATENATE(..., _probe) suffix is
>> intended to suppress the modpost warning - @kunit-dev: any ideas why
>> this isn't working as intended?
> 
> Stephen Rothwell (cc'ed) mentioned that we might be able to use
> __refdata for initramfs_test_cases. The __ref* description in init.h
> does indicate that it's suitable, and I now see that it's present in
> kunit-example-test.c . I'll propose a patch which can be squashed in
> with the existing commit.
> 
> Thanks, David
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
  2025-03-05 12:56   ` David Disseldorp
  2025-03-05 20:55     ` Shuah Khan
@ 2025-03-06  9:13     ` David Gow
  1 sibling, 0 replies; 4+ messages in thread
From: David Gow @ 2025-03-06  9:13 UTC (permalink / raw)
  To: David Disseldorp
  Cc: linux-kselftest, kunit-dev, kernel test robot, oe-kbuild-all,
	Christian Brauner, Christian Brauner, Stephen Rothwell

[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]

On Wed, 5 Mar 2025 at 20:56, David Disseldorp <ddiss@suse.de> wrote:
>
> On Wed, 5 Mar 2025 11:47:01 +1100, David Disseldorp wrote:
>
> > [cc'ing linux-kselftest and kunit-dev]
> >
> > Hi,
> >
> > On Wed, 5 Mar 2025 01:47:55 +0800, kernel test robot wrote:
> >
> > > tree:   https://github.com/brauner/linux.git vfs.all
> > > head:   ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4
> > > commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking
> > > config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-lkp@intel.com/config)
> > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/202503050109.t5Ab93hX-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/202503050109.t5Ab93hX-lkp@intel.com/
> > >
> > > All warnings (new ones prefixed by >>, old ones prefixed by <<):
> > >
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x30 (section: .data) -> initramfs_test_fname_overrun (section: .init.text)
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x60 (section: .data) -> initramfs_test_data (section: .init.text)
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x90 (section: .data) -> initramfs_test_csum (section: .init.text)
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xc0 (section: .data) -> initramfs_test_hardlink (section: .init.text)
> > > >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xf0 (section: .data) -> initramfs_test_many (section: .init.text)
> >
> > These new warnings are covered in the commit message. The
> > kunit_test_init_section_suites() registered tests aren't in the .init
> > section as debugfs entries are retained for results reporting (without
> > an ability to rerun them).
> > IIUC, the __kunit_init_test_suites->CONCATENATE(..., _probe) suffix is
> > intended to suppress the modpost warning - @kunit-dev: any ideas why
> > this isn't working as intended?
>
> Stephen Rothwell (cc'ed) mentioned that we might be able to use
> __refdata for initramfs_test_cases. The __ref* description in init.h
> does indicate that it's suitable, and I now see that it's present in
> kunit-example-test.c . I'll propose a patch which can be squashed in
> with the existing commit.
>

Yup: __refdata for the test cases array is the way to work around this.

As noted, this is in the example, but probably needs to be documented better.

Cheers,
-- David

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5281 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-06  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202503050109.t5Ab93hX-lkp@intel.com>
2025-03-05  0:47 ` [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text) David Disseldorp
2025-03-05 12:56   ` David Disseldorp
2025-03-05 20:55     ` Shuah Khan
2025-03-06  9:13     ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox