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>] [day] [month] [year] [list]
Message-ID: <202208311723.EHYAyN1V-lkp@intel.com>
Date:   Wed, 31 Aug 2022 17:17:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mark:arm64/insn/rework 9/12] arch/arm64/lib/insn.c:23:5: warning:
 no previous prototype for 'imm_roundtrip_adr'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/insn/rework
head:   aa20030472589328b028642d0f2135085ab56777
commit: baf838c0872b7f459fe5026ba2cc82203121e64b [9/12] HACK: immediate roundtrip tests
config: arm64-alldefconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=baf838c0872b7f459fe5026ba2cc82203121e64b
        git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
        git fetch --no-tags mark arm64/insn/rework
        git checkout baf838c0872b7f459fe5026ba2cc82203121e64b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> arch/arm64/lib/insn.c:23:5: warning: no previous prototype for 'imm_roundtrip_adr' [-Wmissing-prototypes]
      23 | u32 imm_roundtrip_adr(const u32 orig)
         |     ^~~~~~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm26' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:56:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      56 | IMM_ROUNDTRIP(imm26);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm26' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:56:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      56 | IMM_ROUNDTRIP(imm26);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm19' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:57:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      57 | IMM_ROUNDTRIP(imm19);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm19' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:57:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      57 | IMM_ROUNDTRIP(imm19);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm14' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:58:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      58 | IMM_ROUNDTRIP(imm14);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm14' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:58:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      58 | IMM_ROUNDTRIP(imm14);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm12' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:59:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      59 | IMM_ROUNDTRIP(imm12);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm12' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:59:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      59 | IMM_ROUNDTRIP(imm12);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm9' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:60:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      60 | IMM_ROUNDTRIP(imm9);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm9' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:60:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      60 | IMM_ROUNDTRIP(imm9);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm7_15' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:61:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      61 | IMM_ROUNDTRIP(imm7_15);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm7_15' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:61:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      61 | IMM_ROUNDTRIP(imm7_15);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm7_14' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:62:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      62 | IMM_ROUNDTRIP(imm7_14);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm7_14' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:62:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      62 | IMM_ROUNDTRIP(imm7_14);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm6_16' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:63:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      63 | IMM_ROUNDTRIP(imm6_16);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm6_16' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:63:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      63 | IMM_ROUNDTRIP(imm6_16);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm6_15' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:64:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      64 | IMM_ROUNDTRIP(imm6_15);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm6_15' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:64:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      64 | IMM_ROUNDTRIP(imm6_15);
         | ^~~~~~~~~~~~~
>> arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imm6_10' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:65:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      65 | IMM_ROUNDTRIP(imm6_10);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imm6_10' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:65:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      65 | IMM_ROUNDTRIP(imm6_10);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_imms' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:66:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      66 | IMM_ROUNDTRIP(imms);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_imms' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:66:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      66 | IMM_ROUNDTRIP(imms);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_immn' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:67:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      67 | IMM_ROUNDTRIP(immn);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_immn' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:67:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      67 | IMM_ROUNDTRIP(immn);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_adr_immlo' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:68:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      68 | IMM_ROUNDTRIP(adr_immlo);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_adr_immlo' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:68:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      68 | IMM_ROUNDTRIP(adr_immlo);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_adr_immhi' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:69:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      69 | IMM_ROUNDTRIP(adr_immhi);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_adr_immhi' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:69:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      69 | IMM_ROUNDTRIP(adr_immhi);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:35:5: warning: no previous prototype for 'imm_roundtrip_unsigned_sf' [-Wmissing-prototypes]
      35 | u32 imm_roundtrip_unsigned_##imm(const u32 orig)                        \
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:70:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      70 | IMM_ROUNDTRIP(sf);
         | ^~~~~~~~~~~~~
   arch/arm64/lib/insn.c:45:5: warning: no previous prototype for 'imm_roundtrip_signed_sf' [-Wmissing-prototypes]
      45 | u32 imm_roundtrip_signed_##imm(const u32 orig)                          \
         |     ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/lib/insn.c:70:1: note: in expansion of macro 'IMM_ROUNDTRIP'
      70 | IMM_ROUNDTRIP(sf);
         | ^~~~~~~~~~~~~


vim +/imm_roundtrip_adr +23 arch/arm64/lib/insn.c

    22	
  > 23	u32 imm_roundtrip_adr(const u32 orig)
    24	{
    25		u32 insn = orig;
    26		s64 imm = aarch64_insn_decode_adr_imm(orig);
    27	
    28		BUG_ON(!aarch64_insn_try_encode_adr_imm(&insn, imm));
    29		BUG_ON(insn != orig);
    30	
    31		return insn;
    32	}
    33	
    34	#define IMM_ROUNDTRIP(imm)						\
  > 35	u32 imm_roundtrip_unsigned_##imm(const u32 orig)			\
    36	{									\
    37		u32 insn = orig;						\
    38		u64 imm = aarch64_insn_decode_unsigned_##imm(orig);		\
    39										\
    40		BUG_ON(!aarch64_insn_try_encode_unsigned_##imm(&insn, imm));	\
    41		BUG_ON(insn != orig);						\
    42										\
    43		return insn;							\
    44	}									\
  > 45	u32 imm_roundtrip_signed_##imm(const u32 orig)				\
    46	{									\
    47		u32 insn = orig;						\
    48		s64 imm = aarch64_insn_decode_signed_##imm(orig);		\
    49										\
    50		BUG_ON(!aarch64_insn_try_encode_signed_##imm(&insn, imm));	\
    51		BUG_ON(insn != orig);						\
    52										\
    53		return insn;							\
    54	}
    55	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (45288 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ