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:   Tue, 4 Oct 2022 09:09:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Manisha Chinthapally <manisha.chinthapally@...el.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mchinth:sep_linux_v6.0-rc7 2/2]
 drivers/platform/x86/sepdk/sep/apic.c:96:13: error: implicit declaration of
 function 'read_apic_id' is invalid in C99

tree:   https://github.com/mchinth/linux sep_linux_v6.0-rc7
head:   4c704363910aa00df3243bcb1658edf3fb9919c9
commit: 4c704363910aa00df3243bcb1658edf3fb9919c9 [2/2] Merge SEP5.36 into Linux tree
config: i386-randconfig-a005-20221003
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/mchinth/linux/commit/4c704363910aa00df3243bcb1658edf3fb9919c9
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_linux_v6.0-rc7
        git checkout 4c704363910aa00df3243bcb1658edf3fb9919c9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/sep/

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

All errors (new ones prefixed by >>):

>> drivers/platform/x86/sepdk/sep/apic.c:96:13: error: implicit declaration of function 'read_apic_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   apic_id = read_apic_id();
                             ^
   drivers/platform/x86/sepdk/sep/apic.c:66:1: warning: no previous prototype for function 'apic_Get_APIC_ID' [-Wmissing-prototypes]
   apic_Get_APIC_ID(S32 cpu)
   ^
   drivers/platform/x86/sepdk/sep/apic.c:65:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   VOID
   ^
   static 
   1 warning and 1 error generated.


vim +/read_apic_id +96 drivers/platform/x86/sepdk/sep/apic.c

    55	
    56	/*!
    57	 * @fn          VOID apic_Get_APIC_ID(S32 cpu)
    58	 *
    59	 * @brief       Obtain APIC ID
    60	 *
    61	 * @param       S32 cpuid - cpu index
    62	 *
    63	 * @return      U32 APIC ID
    64	 */
    65	VOID
    66	apic_Get_APIC_ID(S32 cpu)
    67	{
    68		U32       apic_id = 0;
    69		CPU_STATE pcpu;
    70	
    71		SEP_DRV_LOG_TRACE_IN("CPU: %d.", cpu);
    72		pcpu = &pcb[cpu];
    73	
    74	#if defined(CONFIG_XEN_DOM0) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
    75		if (xen_initial_domain()) {
    76			S32                    ret = 0;
    77			struct xen_platform_op op  = {
    78				 .cmd                   = XENPF_get_cpuinfo,
    79				 .interface_version     = XENPF_INTERFACE_VERSION,
    80				 .u.pcpu_info.xen_cpuid = cpu,
    81			};
    82	
    83	#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
    84			ret = HYPERVISOR_platform_op(&op);
    85	#else
    86			ret = HYPERVISOR_dom0_op(&op);
    87	#endif
    88			if (ret) {
    89				SEP_DRV_LOG_ERROR("apic_Get_APIC_ID: Error in reading APIC ID on Xen PV.");
    90				apic_id = 0;
    91			} else {
    92				apic_id = op.u.pcpu_info.apic_id;
    93			}
    94		} else {
    95	#endif
  > 96			apic_id = read_apic_id();
    97	#if defined(CONFIG_XEN_DOM0) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
    98		}
    99	#endif
   100	
   101		CPU_STATE_apic_id(pcpu) = apic_id;
   102	
   103		SEP_DRV_LOG_TRACE_OUT("Apic_id[%d] is %d.", cpu,
   104				      CPU_STATE_apic_id(pcpu));
   105	}
   106	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ