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: <202210130542.c3bwiLa7-lkp@intel.com>
Date:   Thu, 13 Oct 2022 05:11:41 +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/ftrace/minimal-regs 2/5]
 arch/x86/include/asm/ftrace.h:72:14: error: invalid use of undefined type
 'struct ftrace_regs'

Hi Mark,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/ftrace/minimal-regs
head:   a6fb93c9bc584bf123d18caa80dd6f7a083c272b
commit: 232e6c0b017984c54270b4a7805504a20db4c4df [2/5] ftrace: pass fregs to arch_ftrace_set_direct_caller()
config: i386-randconfig-a001
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=232e6c0b017984c54270b4a7805504a20db4c4df
        git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
        git fetch --no-tags mark arm64/ftrace/minimal-regs
        git checkout 232e6c0b017984c54270b4a7805504a20db4c4df
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 prepare

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

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

   In file included from include/linux/ftrace.h:23,
                    from include/linux/kvm_host.h:32,
                    from arch/x86/kernel/../kvm/vmx/vmx.h:5,
                    from arch/x86/kernel/asm-offsets.c:22:
>> arch/x86/include/asm/ftrace.h:69:57: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      69 | static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr)
         |                                                         ^~~~~~~~~~~
   arch/x86/include/asm/ftrace.h: In function 'arch_ftrace_set_direct_caller':
>> arch/x86/include/asm/ftrace.h:72:14: error: invalid use of undefined type 'struct ftrace_regs'
      72 |         fregs->regs.orig_ax = addr;
         |              ^~
   make[2]: *** [scripts/Makefile.build:118: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:1270: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:231: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +72 arch/x86/include/asm/ftrace.h

    61	
    62	/*
    63	 * When a ftrace registered caller is tracing a function that is
    64	 * also set by a register_ftrace_direct() call, it needs to be
    65	 * differentiated in the ftrace_caller trampoline. To do this, we
    66	 * place the direct caller in the ORIG_AX part of pt_regs. This
    67	 * tells the ftrace_caller that there's a direct caller.
    68	 */
  > 69	static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr)
    70	{
    71		/* Emulate a call */
  > 72		fregs->regs.orig_ax = addr;
    73	}
    74	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ