public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>,
	Valentin Schneider <vschneid@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 3/3] objtool: Add noinstr validation for static branches/calls
Date: Mon, 25 Nov 2024 16:00:47 +0800	[thread overview]
Message-ID: <202411251530.5P17DWTE-lkp@intel.com> (raw)
In-Reply-To: <b5746646456eb030673cdb62c23d69ed83c2702a.1732326588.git.jpoimboe@kernel.org>

Hi Josh,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.12 next-20241125]
[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/Josh-Poimboeuf/jump_label-Add-annotations-for-validating-noinstr-usage/20241125-105905
base:   linus/master
patch link:    https://lore.kernel.org/r/b5746646456eb030673cdb62c23d69ed83c2702a.1732326588.git.jpoimboe%40kernel.org
patch subject: [PATCH 3/3] objtool: Add noinstr validation for static branches/calls
config: m68k-bvme6000_defconfig (https://download.01.org/0day-ci/archive/20241125/202411251530.5P17DWTE-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241125/202411251530.5P17DWTE-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/202411251530.5P17DWTE-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/static_key.h:1,
                    from include/linux/alloc_tag.h:15,
                    from include/linux/percpu.h:5,
                    from include/linux/percpu_counter.h:14,
                    from include/linux/mm_types.h:21,
                    from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from mm/usercopy.c:13:
>> include/linux/jump_label.h:388:9: warning: data definition has no type or storage class
     388 |         ANNOTATE_NOINSTR_ALLOWED(name)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/usercopy.c:204:8: note: in expansion of macro 'DEFINE_STATIC_KEY_FALSE_RO'
     204 | static DEFINE_STATIC_KEY_FALSE_RO(bypass_usercopy_checks);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/jump_label.h:388:9: error: type defaults to 'int' in declaration of 'ANNOTATE_NOINSTR_ALLOWED' [-Wimplicit-int]
     388 |         ANNOTATE_NOINSTR_ALLOWED(name)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/usercopy.c:204:8: note: in expansion of macro 'DEFINE_STATIC_KEY_FALSE_RO'
     204 | static DEFINE_STATIC_KEY_FALSE_RO(bypass_usercopy_checks);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/jump_label.h:371:39: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
     371 | #define STATIC_KEY_FALSE_INIT (struct static_key_false){ .key = STATIC_KEY_INIT_FALSE, }
         |                                       ^~~~~~~~~~~~~~~~
   include/linux/jump_label.h:387:56: note: in expansion of macro 'STATIC_KEY_FALSE_INIT'
     387 |         struct static_key_false name __ro_after_init = STATIC_KEY_FALSE_INIT;   \
         |                                                        ^~~~~~~~~~~~~~~~~~~~~
   mm/usercopy.c:204:8: note: in expansion of macro 'DEFINE_STATIC_KEY_FALSE_RO'
     204 | static DEFINE_STATIC_KEY_FALSE_RO(bypass_usercopy_checks);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +388 include/linux/jump_label.h

   369	
   370	#define STATIC_KEY_TRUE_INIT  (struct static_key_true) { .key = STATIC_KEY_INIT_TRUE,  }
 > 371	#define STATIC_KEY_FALSE_INIT (struct static_key_false){ .key = STATIC_KEY_INIT_FALSE, }
   372	
   373	#define DEFINE_STATIC_KEY_TRUE(name)	\
   374		struct static_key_true name = STATIC_KEY_TRUE_INIT
   375	
   376	#define DEFINE_STATIC_KEY_TRUE_RO(name)						\
   377		struct static_key_true name __ro_after_init = STATIC_KEY_TRUE_INIT;	\
   378		ANNOTATE_NOINSTR_ALLOWED(name)
   379	
   380	#define DECLARE_STATIC_KEY_TRUE(name)	\
   381		extern struct static_key_true name
   382	
   383	#define DEFINE_STATIC_KEY_FALSE(name)	\
   384		struct static_key_false name = STATIC_KEY_FALSE_INIT
   385	
   386	#define DEFINE_STATIC_KEY_FALSE_RO(name)					\
   387		struct static_key_false name __ro_after_init = STATIC_KEY_FALSE_INIT;	\
 > 388		ANNOTATE_NOINSTR_ALLOWED(name)
   389	

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

  parent reply	other threads:[~2024-11-25  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23  1:52 [PATCH 0/3] objtool: noinstr validation for static branches/calls Josh Poimboeuf
2024-11-23  1:52 ` [PATCH 1/3] jump_label: Add annotations for validating noinstr usage Josh Poimboeuf
2024-11-23  1:54   ` Josh Poimboeuf
2024-11-23  1:52 ` [PATCH 2/3] static_call: Add read-only-after-init static calls Josh Poimboeuf
2024-11-23  1:52 ` [PATCH 3/3] objtool: Add noinstr validation for static branches/calls Josh Poimboeuf
2024-11-25  7:08   ` kernel test robot
2024-11-25  8:00   ` kernel test robot [this message]
2024-11-25 10:47   ` kernel test robot

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=202411251530.5P17DWTE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=vschneid@redhat.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