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]
Date:   Wed, 27 Oct 2021 13:36:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Frederic Weisbecker <frederic@...nel.org>
Subject: [frederic-dynticks:preempt/arm-v2 2/4]
 arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for
 function 'arch_static_call_transform'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git preempt/arm-v2
head:   5700542b609d9ab640210d7dd93621c7967688e6
commit: ede0a4b67ffccf492192c29ee88076d2abb8119b [2/4] arm64: implement support for static call trampolines
config: arm64-randconfig-r003-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=ede0a4b67ffccf492192c29ee88076d2abb8119b
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks preempt/arm-v2
        git checkout ede0a4b67ffccf492192c29ee88076d2abb8119b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for function 'arch_static_call_transform' [-Wmissing-prototypes]
   void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
        ^
   arch/arm64/kernel/patching.c:93:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
   ^
   static 
   1 warning generated.


vim +/arch_static_call_transform +93 arch/arm64/kernel/patching.c

    92	
  > 93	void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
    94	{
    95		/*
    96		 * -0x8	<literal>
    97		 *  0x0	bti c		<--- trampoline entry point
    98		 *  0x4	<branch or nop>
    99		 *  0x8	ldr x16, <literal>
   100		 *  0xc	cbz x16, 20
   101		 * 0x10	br x16
   102		 * 0x14	ret
   103		 */
   104		struct {
   105			u64	literal;
   106			__le32	insn[2];
   107		} insns;
   108		u32 insn;
   109		int ret;
   110	
   111		insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_BTIC);
   112		insns.literal = (u64)func;
   113		insns.insn[0] = cpu_to_le32(insn);
   114	
   115		if (!func) {
   116			insn = aarch64_insn_gen_branch_reg(AARCH64_INSN_REG_LR,
   117							   AARCH64_INSN_BRANCH_RETURN);
   118		} else {
   119			insn = aarch64_insn_gen_branch_imm((u64)tramp + 4, (u64)func,
   120							   AARCH64_INSN_BRANCH_NOLINK);
   121	
   122			/*
   123			 * Use a NOP if the branch target is out of range, and rely on
   124			 * the indirect call instead.
   125			 */
   126			if (insn == AARCH64_BREAK_FAULT)
   127				insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_NOP);
   128		}
   129		insns.insn[1] = cpu_to_le32(insn);
   130	
   131		ret = __aarch64_insn_write(tramp - 8, &insns, sizeof(insns));
   132		if (!WARN_ON(ret))
   133			caches_clean_inval_pou((u64)tramp - 8, sizeof(insns));
   134	}
   135	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (41826 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ